/* ?This is where reusable styling of this template will be. 
   !Will contain things like:
   * Button styling
   * Background color styling
   * padding and margin
*/

.container {
  max-width: var(--width-medium);
  margin: 0 auto;
  padding: 1rem 2rem;
}

h1::selection,
h2::selection {
  color: #111;
  background: var(--primary-color);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.9rem;
  border-radius: 30px;
  text-transform: uppercase;
  font-size: 0.82rem;
  transition: 0.3s;
}

.btn-primary {
  background: var(--primary-color);
  color: #000000;
}

.btn-secondary {
  margin: 5px 0;
  background-color: var(--bg-secondary);
  color: var(--bg-primary);
}

/* add hover to resume button */
.btn-primary:hover {
  background: var(--secondary-color);
}

/* Dark mode toggle */
#switch {
  display: none;
}

.toggle-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.toggle-icons > img {
  transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  width: 30px;
}

.moon {
  transform: rotate(10deg);
}

#switch:checked + .toggle-icons .moon {
  transform: rotate(250deg);
}

#switch:checked + .toggle-icons .sun {
  transform: rotate(100deg);
}

/* Header Container */
.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 8rem;
  padding: 1rem;
}

.header-container > div {
  margin-top: 1rem;
}

.content-text {
  text-align: center;
  margin: 1.5rem 0;
}

.content-text h2 {
  font-size: 3rem;
  line-height: 1.2;
  transition: 0.2s ease-in-out;
}

.content-text p {
  padding: 0.5rem;
  margin: 0 auto;
  max-width: 700px;
}

/* Project cards */
.card {
  padding: 1rem;
  background: var(--card-background);
  color: #ffffff;
  border-radius: 5px;
  transition: 0.4s ease-in-out;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.card a {
  color: #ffffff;
  transition: 0.25s ease-in-out;
  font-size: 1.1rem;
  margin-right: 0.3rem;
  text-decoration: none;
}

.card a:hover {
  color: var(--primary-color);
}

.card:hover {
  box-shadow: inset 0 100px 1000px 10px rgba(0, 0, 0, 0.8);
}

.card:hover .project-info {
  opacity: 1;
}

/* Prevent nested links from triggering card click */
.project-link a {
  pointer-events: auto;
}

.project-link a:hover {
  color: var(--primary-color) !important;
}

/* ============================================
   PROJECT CARD IMAGES
   ============================================

   HOW TO ADD A NEW PROJECT:

   1. Add project image to: assets/images/projects/{project-name}/
   2. Add CSS class below following the pattern:

   .card-{project-name} {
     background: url(../assets/images/projects/{project-name}/{image-file});
     background-size: contain;
     background-position: center;
   }

   3. Use this class in your HTML:
   <div class="card card-{project-name}" onclick="window.location.href='...'">

   ============================================ */

/* El-Mal El-Halaal Podcast Semantic Search */
.card-elmal {
  background: url(../assets/images/projects/podcast/live.png);
  background-size: contain;
  background-position: center;
}

/* BERT Arabic Hate Speech Detector */
.card-hate {
  background: url(../assets/images/projects/bert/one.png);
  background-size: contain;
  background-position: center;
}

/* Pneumonia X-ray Classifier */
.card-xray {
  background: url(../assets/images/projects/xray/main.png);
  background-size: contain;
  background-position: center;
}

/* Customer Churn Predictor */
.card-churn {
  background: url(../assets/images/projects/churn/main.png);
  background-size: contain;
  background-position: center;
}

/* Farming+ IoT Greenhouse */
.card-farmingplus {
  background: url(../assets/images/projects/farmingplus/Dashboard.gif);
  background-size: contain;
  background-position: center;
}

/* ============================================
   ADD YOUR NEW PROJECT CSS BELOW THIS LINE
   ============================================ */

/* Production AI System (Edulga) */
.card-production-ai {
  background: url(../assets/images/projects/GraphRAG/GraphRag2024-BlogHeroFeature-1400x788-1.png);
  background-size: cover;
  background-position: center;
}

/* Project Detail Page Styles */
.project-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--card-background);
}

.project-title {
  font-size: 2.5rem;
  font-weight: var(--weight-bold);
  color: var(--text-color);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.project-date {
  font-size: 1rem;
  color: var(--text-color);
  opacity: 0.7;
  font-weight: var(--weight-small);
}

.project-section {
  margin-bottom: 3rem;
}

.project-section h2 {
  font-size: 1.8rem;
  font-weight: var(--weight-semibold);
  color: var(--text-color);
  margin-bottom: 1rem;
  position: relative;
}

.project-section h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.project-section p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.project-images {
  margin: 2rem 0;
}

.image-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  grid-template-rows: repeat(2, 1fr);
}

.main-image {
  grid-row: span 2;
}

.main-image img,
.side-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.main-image img:hover,
.side-image img:hover {
  transform: scale(1.02);
}

.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.project-links .btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.skill-tag {
  background: var(--card-background);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: var(--weight-semibold);
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: var(--primary-color);
  color: #000000;
  transform: translateY(-2px);
}

.back-button {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--card-background);
}

.back-button .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Media Queries */
@media (max-width: 768px) {
  .header-container {
    margin-top: 7rem;
    text-align: center;
  }

  .content-text h2 {
    font-size: 2.5rem;
  }

  .project-title {
    font-size: 2rem;
  }

  .image-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .main-image {
    grid-row: span 1;
  }

  .project-links {
    flex-direction: column;
  }

  .project-links .btn {
    justify-content: center;
  }

  .card::before {
    display: none !important;
    background: none !important;
  }
  .card:hover,
  .card:active {
    box-shadow: none !important;
  }
}

@media (max-width: 600px) {
  .project {
    grid-template-columns: 1fr;
  }

  .header-container .btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
  }

  .scroll-to-top {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    bottom: 1.2rem;
    right: 1.2rem;
  }
}

@media (min-width: 769px) {
  .card:hover {
    box-shadow: inset 0 100px 1000px 10px rgba(0, 0, 0, 0.8);
  }

  .card:hover .project-info {
    opacity: 1;
  }
}

/* Scroll-to-top button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: #000;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1000;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.scroll-to-top:hover {
  background: var(--secondary-color);
  color: #222;
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
}

/* Accessibility: Keyboard Focus Indicators */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
.hamburger:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  .profile-image,
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
