/* ================================================================
   PORTFOLIO STYLESHEET
   ================================================================
   CUSTOMIZE GUIDE:
   • All colours live in the :root and .dark-mode blocks at the top.
     Change --accent to any navy shade you prefer.
   • All font sizes use rem; adjust --base-font-size to scale everything.
   • Section padding controlled by --section-padding.
   ================================================================ */

/* ─── Google Fonts are loaded in index.html ─── */

/* ================================================================
   CSS CUSTOM PROPERTIES (design tokens)
   ================================================================ */
:root {
  /* Colours — light mode */
  --bg:          #F7F7F5;
  --bg-alt:      #EFEFED;
  --surface:     #FFFFFF;
  --text:        #111111;
  --text-muted:  #6B6B6B;
  --accent:      #1B3A6B;   /* ← CUSTOMIZE: your preferred navy */
  --accent-hover:#0E2347;
  --accent-light:#E8EEF6;   /* pale navy for tag backgrounds */
  --border:      #DEDEDA;
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.10);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.13);
  --nav-blur:    rgba(247,247,245,0.88);

  /* Trail dot colour */
  --trail-color: #1B3A6B;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Outfit', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --section-padding: 7rem 0;
  --container-max:   1160px;
  --container-pad:   2rem;
  --nav-height:      72px;

  /* Animation */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
}

/* Dark mode overrides */
.dark-mode {
  --bg:          #0C0C0C;
  --bg-alt:      #141414;
  --surface:     #161616;
  --text:        #F2F2F2;
  --text-muted:  #888888;
  --accent:      #5B8FC4;
  --accent-hover:#7AAAD8;
  --accent-light:#0E1E30;
  --border:      #242424;
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.35);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.45);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.55);
  --nav-blur:    rgba(12,12,12,0.88);
  --trail-color: #5B8FC4;
}


/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background-color 0.35s ease, color 0.35s ease;
  overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }


/* ================================================================
   SCROLL PROGRESS BAR
   ================================================================ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 9999;
  transition: width 0.08s linear;
}


/* ================================================================
   LAYOUT UTILITIES
   ================================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: var(--section-padding);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.section-number {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  padding-top: 0.35rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
  align-self: flex-end;
  padding-bottom: 0.3rem;
}


/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.75rem;
  border-radius: 3px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  text-transform: uppercase;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27, 58, 107, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.dark-mode .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(91, 143, 196, 0.3);
}


/* ================================================================
   NAVIGATION
   ================================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: var(--nav-blur);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.nav-logo:hover { opacity: 0.7; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 0.8rem;
  border-radius: 2px;
  position: relative;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0.8rem; right: 0.8rem;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}

.nav-link:hover,
.nav-link.active { color: var(--text); }

.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: 1.5rem;
}

/* CHANGE #1 (CSS) — Direct Resume PDF link in the navbar */
.nav-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(27, 58, 107, 0.2);
  border-radius: 20px;
  padding: 0.34rem 0.85rem;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}
.nav-resume-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}
.dark-mode .nav-resume-btn {
  border-color: rgba(91, 143, 196, 0.28);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
  white-space: nowrap;
}
.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}
.theme-icon { font-size: 0.8rem; }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 32px;
}
.hamburger span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 4px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -4px); }


/* ================================================================
   HOME / HERO SECTION
   ================================================================ */
/* ================================================================
   CHANGE #2 (CSS) — UPDATED HERO LAYOUT FOR REFERENCES CAROUSEL
   ────────────────────────────────────────────────────────────────
   Stacks .hero-content and .hero-references vertically inside the
   landing section so the main intro remains the primary focal point
   while the semi-transparent references strip sits subtly below it.
   ================================================================ */
.home-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1.85rem; /* ← CUSTOMIZE: vertical space between social icons and references carousel */
  padding: calc(var(--nav-height) + 2.25rem) var(--container-pad) 3.25rem;
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.hero-content {
  flex: 1;
  max-width: 680px;
  padding-right: 2rem;
  z-index: 1;
}

/* Eyebrow row: dash + label */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
  animation: fadeUp 0.8s var(--ease-out) 0.1s both;
}
.eyebrow-line {
  display: block;
  width: 40px;
  height: 1.5px;
  background: var(--accent);
}
.eyebrow-text {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Typing effect heading */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s var(--ease-out) 0.2s both;
  min-height: 1.1em;
}

.cursor-blink {
  display: inline-block;
  color: var(--accent);
  font-weight: 300;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Subtitle */
.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  animation: fadeUp 0.8s var(--ease-out) 0.3s both;
}

/* CTA buttons row */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  animation: fadeUp 0.8s var(--ease-out) 0.4s both;
}

/* Social icons */
.hero-socials {
  display: flex;
  gap: 1rem;
  animation: fadeUp 0.8s var(--ease-out) 0.5s both;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: all 0.22s;
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(27,58,107,0.18);
}

.hero-decoration {
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;    /* ← was 55% */
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
  z-index: 0;     /* ← add this so it sits behind the text */
}

#hero-canvas {
  width: 100%;
  height: 100%;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  right: var(--container-pad);
  left: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: fadeUp 0.8s var(--ease-out) 0.8s both;
  z-index: 1;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
.scroll-indicator span {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}


/* ================================================================
   ABOUT SECTION
   ================================================================ */
.about-section { background: var(--bg-alt); }

.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 5rem;
  align-items: start;
}

/* Photo carousel card */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease-out);
  position: relative;
}
.profile-card:hover { transform: rotate(0deg) scale(1.01); }

.profile-pics-container {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-alt);
}

.profile-pic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
}
.profile-pic.active { opacity: 1; }

/* Nav dots */
.profile-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 1rem;
}
.profile-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.profile-dot.active,
.profile-dot:hover { background: var(--accent); transform: scale(1.3); }

/* Bio text */
.about-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 600;
  margin-bottom: 1.25rem;
  line-height: 1.1;
}

.about-bio {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 520px;
}

/* Fact rows */
.about-facts {
  border-top: 1px solid var(--border);
  margin-bottom: 2rem;
}
.fact-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.fact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 90px;
}
.fact-value {
  font-size: 0.92rem;
  color: var(--text);
}

/* Stat chips */
.about-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.9rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  min-width: 90px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-desc {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}


/* ================================================================
   PROJECTS SECTION
   ================================================================ */
.projects-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}

/* Project list */
.project-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  position: relative;
}
.project-item::before {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.35s var(--ease-out);
}
.project-item:hover::before { width: 100%; }
.project-item:hover { padding-left: 0.75rem; }

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 100px;
}
.project-category {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.project-year {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}
.project-name {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
}
.project-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.3s var(--ease-out), color 0.2s;
}
.project-item:hover .project-arrow {
  transform: translateX(8px);
  color: var(--accent);
}

/* Hover stats card */
.project-stats-card {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.35s var(--ease-out);
  min-height: 260px;
}
.project-stats-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-preview-image-container {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-alt);
}
.project-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.project-stats-card:hover .project-preview-img { transform: scale(1.04); }

.project-stats-content {
  padding: 1.4rem;
}
.project-stats-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.stat-item { margin-bottom: 0.85rem; }
.stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.stat-value {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
}
.tech-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.3rem;
}
.tech-icon {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* Placeholder state */
.stats-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
}
.placeholder-icon {
  font-size: 2rem;
  color: var(--border);
}
.stats-placeholder p {
  font-size: 0.82rem;
  color: var(--text-muted);
}


/* ================================================================
   PROJECT MODALS
   ================================================================ */
.project-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 2rem;
}
.project-modal.active { display: flex; align-items: flex-start; justify-content: center; }

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 700px;
  width: 100%;
  margin: auto;
  padding: 2.5rem;
  position: relative;
  animation: modalIn 0.4s var(--ease-out);
  box-shadow: var(--shadow-lg);
}
.modal-media.portrait {
  aspect-ratio: 3/4;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px; height: 36px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-header { margin-bottom: 1.75rem; }
.modal-category {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.modal-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* Image carousel */
.modal-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.75rem;
}
.modal-image {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.modal-image.active { opacity: 1; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  z-index: 1;
}
.carousel-btn:hover { background: rgba(0,0,0,0.7); }
.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }

.slide-counter {
  position: absolute;
  bottom: 0.75rem;
  right: 1rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.45);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
}

/* Modal tags */
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.modal-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--accent);
  letter-spacing: 0.03em;
}

.modal-link { align-self: flex-start; }


/* ================================================================
   SKILLS SECTION
   ================================================================ */
.skills-section { background: var(--bg-alt); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}
.skill-category:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.skill-category-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.skill-tag {
  font-size: 0.8rem;
  font-weight: 400;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  background: var(--bg);
  transition: all 0.2s;
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}


/* ================================================================
   RESUME SECTION
   ================================================================ */
.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.resume-btn { margin-left: auto; }

.resume-column-title {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.resume-column-title--spaced { margin-top: 3rem; }

/* Timeline */
.timeline-item {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
  position: relative;
}

.timeline-marker {
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  margin-top: 0.55rem;
  position: relative;
  transition: background 0.2s;
}
.timeline-item:hover .timeline-marker { background: var(--accent); }

.timeline-marker::after {
  content: '';
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: calc(100% + 1.8rem);
  background: var(--border);
}
.timeline-item:last-child .timeline-marker::after { display: none; }

.timeline-body { flex: 1; }

.timeline-date {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.timeline-role {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.timeline-company a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.timeline-company {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.company-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

.timeline-company a:hover {
  border-color: var(--accent);
}
.timeline-desc {
  list-style: none;
  padding: 0;
}
.timeline-desc li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
  margin-bottom: 0.25rem;
}
.timeline-desc li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
}


/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.footer-socials { display: flex; gap: 1.5rem; }
.footer-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* ================================================================
   CURSOR TRAIL
   ================================================================ */
.cursor-trail {
  position: fixed;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--trail-color);
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  will-change: left, top, opacity;
}


/* ================================================================
   SCROLL-REVEAL ANIMATIONS
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ================================================================
   RESPONSIVE — MOBILE
   ================================================================ */
@media (max-width: 900px) {
  :root {
    --section-padding: 5rem 0;
    --container-pad:   1.25rem;
  }

  /* Nav */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--nav-blur);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem var(--container-pad);
    border-bottom: 1px solid var(--border);
    gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-link { font-size: 0.9rem; padding: 0.6rem 0; }
  .hamburger { display: flex; }

  /* Hero */
  .home-section { padding: 6rem var(--container-pad) 4rem; min-height: auto; }
  .hero-content { 
    padding-right: 0; max-width: 100%; 
    z-index: 1;
    position: relative;
  }
  .hero-decoration { display: none; }
  .scroll-indicator { display: none; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .profile-card { max-width: 320px; margin: 0 auto; }

  /* Projects */
  .projects-layout { grid-template-columns: 1fr; }
  .project-stats-card { display: none; } /* preview hidden on mobile; modals still work */

  /* Resume */
  .resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;    /* ← add this */
}

  /* Section header */
  .section-header { flex-wrap: wrap; }
  .section-subtitle { margin-left: 0; }
  .resume-btn { margin-left: 0; width: 100%; }
}

@media (max-width: 560px) {
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .about-stats { justify-content: space-between; }
  .stat-chip { flex: 1; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
}

/* ================================================================
   CHANGE #3 (CSS) — SUBTLE HORIZONTAL REFERENCES CAROUSEL
   ────────────────────────────────────────────────────────────────
   CUSTOMIZE GUIDE FOR REFERENCES CAROUSEL:
   • --ref-idle-opacity:  Overall transparency when not hovered (default: 0.64).
                          Lower = more subtle/transparent; higher = more prominent.
   • --ref-hover-opacity: Overall opacity when the user hovers/interacts (default: 0.98).
   • --ref-card-width:    Width of each quote card in the horizontal track (default: 470px).
   • --ref-card-bg:       Translucent card fill (glassmorphism effect).
   ================================================================ */
.hero-references {
  --ref-idle-opacity:  0.64;  /* ← CUSTOMIZE: resting transparency of the carousel (0.4 to 0.85) */
  --ref-hover-opacity: 0.98;  /* ← CUSTOMIZE: opacity when hovered */
  --ref-card-width:    470px; /* ← CUSTOMIZE: horizontal width of each quote card */
  --ref-card-bg:       rgba(255, 255, 255, 0.46); /* ← CUSTOMIZE: light-mode translucent background */
  --ref-card-border:   rgba(27, 58, 107, 0.14);

  width: 100%;
  z-index: 1;
  opacity: var(--ref-idle-opacity);
  transition: opacity 0.45s var(--ease-out);
  animation: fadeUp 0.9s var(--ease-out) 0.6s both;
  margin-top: 0.15rem;
}

.dark-mode .hero-references {
  --ref-card-bg:     rgba(22, 22, 22, 0.50); /* ← CUSTOMIZE: dark-mode translucent background */
  --ref-card-border: rgba(91, 143, 196, 0.18);
}

/* Brighten smoothly when a visitor hovers or focuses on the quotes */
.hero-references:hover,
.hero-references:focus-within {
  opacity: var(--ref-hover-opacity);
}

.references-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Soft horizontal fade on left & right edges so adjacent cards blend cleanly */
.references-viewport {
  width: 100%;
  overflow: hidden;
  padding: 0.25rem 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
}

.references-track {
  display: flex;
  align-items: stretch;
  gap: 1.1rem;
  transition: transform 0.65s var(--ease-out);
  will-change: transform;
}

/* Individual horizontal quote card (compact padding & slightly smaller text) */
.testimonial-card {
  flex: 0 0 var(--ref-card-width);
  max-width: calc(100vw - 4.5rem);
  background: var(--ref-card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--ref-card-border);
  border-left: 2.5px solid var(--accent);
  border-radius: 6px;
  padding: 0.85rem 1.2rem; /* ← CUSTOMIZE: compact card padding */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  opacity: 0.42; /* Flanking cards stay extra subtle until centered */
  transform: scale(0.96);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out),
              box-shadow 0.35s ease, border-color 0.35s ease;
}

/* The currently centered / active quote card */
.testimonial-card.is-active {
  opacity: 1;
  transform: scale(1);
  box-shadow: var(--shadow-sm);
}

.testimonial-card:hover {
  border-color: var(--accent);
}

.testimonial-quote {
  font-family: var(--font-display);
  font-size: 0.86rem; /* ← CUSTOMIZE: slightly smaller quote font size to fit cleanly on screen */
  font-style: italic;
  color: var(--text);
  line-height: 1.48;
  margin-bottom: 0.55rem;
}

.testimonial-author {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  padding-top: 0.38rem;
  border-top: 1px solid rgba(136, 136, 136, 0.15);
}

.testimonial-name {
  font-size: 0.72rem; /* ← CUSTOMIZE: author name font size */
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.testimonial-role {
  font-size: 0.66rem; /* ← CUSTOMIZE: author role font size */
  color: var(--text-muted);
}

/* Subtle left/right navigation arrows */
.ref-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.25s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.hero-references:hover .ref-carousel-btn,
.hero-references:focus-within .ref-carousel-btn {
  opacity: 0.85;
}

.ref-carousel-btn:hover {
  opacity: 1 !important;
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.08);
}

.ref-prev { left: 0.25rem; }
.ref-next { right: 0.25rem; }

/* Minimal indicator dots below the horizontal track */
.references-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.ref-dot {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s var(--ease-out), opacity 0.3s ease;
  opacity: 0.7;
}

.ref-dot.active,
.ref-dot:hover {
  background: var(--accent);
  width: 24px;
  opacity: 1;
}

@media (max-width: 768px) {
  .hero-references {
    --ref-card-width: calc(100vw - 3.25rem);
    --ref-idle-opacity: 0.78;
  }
  .references-viewport {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .ref-carousel-btn {
    display: none; /* Swipe or tap dots on mobile */
  }
  .testimonial-author {
    flex-direction: column;
    gap: 0.1rem;
  }
}

/* Restore bullets and spacing inside project modal descriptions */
.modal-description ul {
  list-style-type: disc !important;
  margin-top: 0.75rem;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-description li {
  list-style-type: disc !important;
  display: list-item !important;
}

/* 1. Default all bolded keywords inside modal descriptions to crisp white */
.modal-description strong {
  color: #ffffff;
  font-weight: 600;
}

/* 2. Make ONLY the bullet dots and the leading category headers accent blue */
.modal-description li::marker,
.modal-description li > strong:first-child {
  color: var(--accent, #7b96d4);
}
/* Ensure the media container can anchor the overlay */
.modal-media {
  position: relative;
}

/* Semi-transparent top banner/pill for media captions */
.slide-caption {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 18, 25, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 10;
  pointer-events: none; /* Prevents blocking clicks on the image/video */
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: opacity 0.2s ease;
}

/* Automatically hide the banner if a slide doesn't have a caption */
.slide-caption:empty {
  opacity: 0;
}