* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark Theme */
  --bg-primary: #0a0e27;
  --bg-secondary: #12172d;
  --bg-tertiary: #1a1f3a;
  --text-primary: #e8eef5;
  --text-secondary: #b0b8cc;
  --text-tertiary: #7d8499;
  --accent: #0ea5e9;
  --accent-light: #06b6d4;
  --accent-dark: #0284c7;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #2a2f4a;

  /* Light Theme (will override) */
  --light-bg-primary: #f8f9fc;
  --light-bg-secondary: #ffffff;
  --light-bg-tertiary: #f3f4f8;
  --light-text-primary: #0f172a;
  --light-text-secondary: #475569;
  --light-text-tertiary: #94a3b8;
  --light-border: #e2e8f0;
}

body.light-mode {
  --bg-primary: #f8f9fc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f3f4f8;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --border: #e2e8f0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
  position: fixed;
  left: 0;
  top: 0;
  width: 392px;
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: hidden;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 40px 25px;
  transition: all 0.3s ease;
}

.header-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.profile-section {
  text-align: center;
  margin-bottom: 40px;
}

.profile-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  padding: 3px;
  margin: 0 auto 20px;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--accent);
}

.profile-img img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-name h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.profile-title {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  font-size: 16px;
}

.social-links a:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-3px);
}

nav {
  flex: 1;
}

nav ul {
  list-style: none;
  margin-top: 50px;
}

nav ul li {
  margin-bottom: 15px;
}

nav ul a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  position: relative;
}

nav ul a:hover,
nav ul a.active {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  border-left-color: var(--accent);
}

nav ul a i {
  font-size: 18px;
}

.theme-toggle {
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.toggle-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.toggle-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ===== MAIN CONTENT ===== */
main {
  margin-left: 392px;
  min-height: 100vh;
}

section {
  padding: 80px 60px;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

.breadcrumb span {
  color: var(--text-tertiary);
}

/* ===== PROJECT HERO ===== */
.project-hero {
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.project-hero h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 44px;
  font-weight: 700;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #06b6d4, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-meta {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-item i {
  color: var(--accent);
  font-size: 18px;
}

.meta-item span {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== PROJECT GALLERY ===== */
.gallery {
  margin-bottom: 60px;
}

.gallery-main {
  width: 100%;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.thumbnail {
  width: 100%;
  height: 150px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: var(--text-tertiary);
}

.thumbnail:hover,
.thumbnail.active {
  border-color: var(--accent);
}
/* ===== THUMBNAILS FIX ===== */


.gallery-thumbnails img {
  width: 100%;          /* thumbnail width */
  height: 150px;         /* thumbnail height */
  object-fit: cover;    /* crop instead of stretch */
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
  border: 2px solid #eee;
}

.gallery-thumbnails img:hover {
  transform: scale(1.05);
  border-color: #ccc;
}


/* ===== PROJECT DETAILS GRID ===== */
.details-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.project-description h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.project-description p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
  text-align: justify;
}

/* ===== FEATURES ===== */
.features-list {
  list-style: none;
  margin-top: 30px;
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border-left: 4px solid var(--accent);
}

.features-list i {
  color: var(--accent);
  font-size: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.features-list span {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== PROJECT INFO ===== */
.project-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.info-card {
  background: var(--bg-secondary);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.info-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

.info-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===== TECHNOLOGIES ===== */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-badge {
  background: var(--bg-tertiary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===== RESULTS & METRICS ===== */
.results-section {
  background: linear-gradient(
    135deg,
    rgba(14, 165, 233, 0.1) 0%,
    rgba(2, 132, 199, 0.05) 100%
  );
  padding: 60px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 60px;
}

.results-section h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--text-primary);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.metric {
  text-align: center;
}

.metric-number {
  font-family: "Space Grotesk", sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.metric-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===== CTA SECTION ===== */
.cta-section {
  text-align: center;
  padding: 60px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.cta-section h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  margin-right: 15px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ===== NAVIGATION BACK ===== */
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 40px;
  transition: all 0.3s ease;
}

.nav-back:hover {
  gap: 12px;
  color: var(--accent-light);
}

.nav-back i {
  font-size: 16px;
}

/* ===== FOOTER ===== */
footer {
  margin-left: 392px;
  padding: 40px 60px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .header {
    width: 350px;
    padding: 30px 20px;
  }

  main,
  footer {
    margin-left: 350px;
  }

  section {
    padding: 60px 40px;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header {
    position: fixed;
    left: -100%;
    width: 70%;
    max-width: 250px;
    transition: left 0.3s ease;
    z-index: 2000;
  }

  .header.active {
    left: 0;
  }

  main,
  footer {
    margin-left: 0;
  }

  section {
    padding: 50px 20px;
  }

  .project-hero h1 {
    font-size: 28px;
  }

  .gallery-main {
    height: 300px;
    font-size: 60px;
  }

  .gallery-thumbnails {
    grid-template-columns: repeat(3, 1fr);
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .project-meta {
    gap: 20px;
  }

  .cta-section {
    padding: 40px 20px;
  }

  .btn-primary {
    margin-right: 0;
    margin-bottom: 10px;
    display: block;
    width: 100%;
  }

  .btn-secondary {
    width: 100%;
  }

  .menu-toggle {
    display: block;
  }
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  z-index: 1999;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.menu-toggle:hover {
  transform: scale(1.1);
}

.menu-toggle i {
  transition: transform 0.3s ease;
}

.menu-toggle.active i {
  transform: rotate(90deg);
}
/* ===== IMAGE POPUP MODAL ===== */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
}

.image-modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.image-modal-close {
  position: absolute;
  top: 25px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.image-modal-close:hover {
  color: #ddd;
}
