/* ==========================================================================
   Jane Yim — Portfolio Stylesheet
   Editorial, minimal. Cream / navy / muted blue.
   ========================================================================== */

:root {
  --color-bg: #fbf8f1;
  --color-bg-alt: #f1eee7;
  --color-surface: #fffdf8;
  --color-border: #ddd9cd;
  --color-text: #10233f;
  --color-text-muted: #5c6a7c;
  --color-accent: #56799d;
  --color-accent-dark: #19395e;
  --color-accent-light: #e8eff4;
  --radius: 4px;
  --max-width: 1080px;
  --measure: 640px;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(25, 57, 94, 0.28);
  transition: border-color 0.15s ease, color 0.15s ease;
}
a:hover { color: var(--color-accent); border-color: currentColor; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 0.5em;
  color: var(--color-text);
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; }

h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 0.9em; }
h3 { font-size: 1.2rem; }
h4 { font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; }

p { margin: 0 0 1em; color: var(--color-text); }
p a, li a { border-bottom: 1px solid rgba(25, 57, 94, 0.3); }

.text-muted { color: var(--color-text-muted); }

.section {
  padding: 84px 0;
  border-bottom: 1px solid var(--color-border);
}
.section:last-of-type { border-bottom: none; }
.section-alt { background: var(--color-bg-alt); }

.section-heading { margin-bottom: 8px; }
.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  display: block;
}
.section-intro {
  max-width: var(--measure);
  color: var(--color-text-muted);
  margin-bottom: 36px;
}

/* ---------------- Navigation ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 241, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
  border-bottom: none;
}
.nav-brand:hover { color: var(--color-accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--color-text);
  margin: 0 auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.92rem;
  border-bottom: none;
  padding-bottom: 2px;
}
.nav-menu a:hover { color: var(--color-accent); border-bottom: 1px solid currentColor; }
.nav-cta { color: var(--color-accent-dark); font-weight: 600; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--color-accent-dark);
  color: #fff;
  border-bottom: none;
}
.btn-primary:hover { background: var(--color-accent); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
  border-bottom: none;
}
.btn-secondary:hover { border-color: var(--color-accent-dark); color: var(--color-accent-dark); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }

/* ---------------- Hero ----------------
   Palette below is scoped to .hero only (local custom properties), inspired
   by a warm editorial reference — not applied to the rest of the site. */
.hero {
  --h-ivory: #F5EFE7;
  --h-blush: #E9DED2;
  --h-sage: #7A806A;
  --h-olive: #343D2E;
  --h-gold: #B6A078;
  --h-charcoal: #34352F;
  background: var(--h-ivory);
  padding: 76px 0 0;
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-areas: "copy portrait" "actions portrait";
  column-gap: 64px;
  row-gap: 10px;
  align-items: center;
  padding-bottom: 52px;
}
.hero-copy-top { grid-area: copy; }
.hero-copy-actions { grid-area: actions; margin-top: 4px; }

.hero-script {
  display: block;
  font-family: 'Parisienne', cursive;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 400;
  color: var(--h-gold);
  margin-bottom: 2px;
}

.hero h1 {
  color: var(--h-charcoal);
  font-size: clamp(2.7rem, 5.6vw, 4.4rem);
  line-height: 1;
  margin-bottom: 0.22em;
}
.hero-role {
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  color: var(--h-olive);
  font-weight: 600;
  margin-bottom: 2px;
}
.hero-edu {
  font-size: 0.94rem;
  color: var(--h-sage);
  font-weight: 500;
  margin-bottom: 20px;
}
.hero-intro { max-width: 500px; font-size: 1.02rem; color: rgba(52, 53, 47, 0.78); }

.hero-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 4px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--h-sage);
  border-bottom: none;
}
.hero-linkedin span { font-size: 0.8em; }
.hero-linkedin:hover { color: var(--h-olive); }

/* Hero-only button treatment (does not touch the shared .btn-primary /
   .btn-secondary classes used in the Resume section and elsewhere). */
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.hero-btn:hover { text-decoration: none; }
.hero-btn-primary { background: var(--h-olive); color: var(--h-ivory); border-bottom: none; }
.hero-btn-primary:hover { background: var(--h-charcoal); color: var(--h-ivory); }
.hero-btn-secondary { background: transparent; color: var(--h-charcoal); border-color: var(--h-charcoal); border-bottom: none; }
.hero-btn-secondary:hover { border-color: var(--h-olive); color: var(--h-olive); }

/* Arched editorial portrait: rounded top, clean flat bottom, thin antique-gold
   outline, an offset blush panel behind for depth. No plants, no glow,
   no heavy shadow, no circle. */
.portrait-frame { position: relative; max-width: 340px; margin-left: auto; }
.portrait-frame::before {
  content: "";
  position: absolute;
  top: -18px;
  left: -18px;
  width: 100%;
  height: 100%;
  background: var(--h-blush);
  border-radius: 50% 50% 4px 4px / 30% 30% 3px 3px;
  z-index: 0;
}
.portrait-photo-wrap {
  position: relative;
  z-index: 1;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--h-blush);
  border: 1.5px solid var(--h-gold);
  border-radius: 50% 50% 4px 4px / 30% 30% 3px 3px;
}
.portrait-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  transform: scale(1.75);
  transform-origin: 50% 100%;
  display: block;
}

/* Optional credential strip — accurate facts only, full-bleed muted-sage band. */
.hero-credential-strip { background: var(--h-sage); }
.hero-credential-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 16px 24px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--h-ivory);
  letter-spacing: 0.01em;
}

/* ---------------- Fade-in animation (restrained) ---------------- */
.fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- Featured projects (editorial list) ---------------- */
.project-list { display: flex; flex-direction: column; }
.project-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--color-border);
}
.project-list .project-row:first-child { border-top: none; }
.project-row-reverse { grid-template-columns: 1fr 1.1fr; }
.project-row-reverse .project-row-media { order: 2; }
.project-row-reverse .project-row-copy { order: 1; }

.project-row-media { display: block; border-bottom: none; }
.project-row-thumb {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: opacity 0.2s ease;
}
.project-row-media:hover .project-row-thumb { opacity: 0.88; }
.project-row-thumb-text {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-style: italic;
  text-align: center;
  padding: 24px;
}

.project-row-copy h3 { margin-bottom: 14px; }
.project-row-copy h3 a { border-bottom: none; color: var(--color-text); }
.project-row-copy h3 a:hover { color: var(--color-accent-dark); }
.project-row-question, .project-row-result { color: var(--color-text-muted); font-size: 0.96rem; }
.project-row-question strong, .project-row-result strong {
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.project-row-tools { font-size: 0.86rem; color: var(--color-text-muted); font-style: italic; margin: 16px 0 10px; }
.project-row-link { font-weight: 600; border-bottom: none; }
.project-row-link:hover { border-bottom: 1px solid currentColor; }

/* ---------------- Experience ---------------- */
.timeline-item {
  padding: 26px 0;
  border-top: 1px solid var(--color-border);
}
.timeline-item:first-of-type { border-top: none; }
.timeline-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.timeline-role { font-weight: 700; font-size: 1.04rem; }
.timeline-org { color: var(--color-text-muted); font-size: 0.92rem; }
.timeline-dates { color: var(--color-text-muted); font-size: 0.88rem; white-space: nowrap; }
.timeline-item ul { margin: 12px 0 0; padding-left: 18px; color: var(--color-text-muted); max-width: var(--measure); }
.timeline-item li { margin-bottom: 6px; }

/* ---------------- Skills ---------------- */
.skills-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 8px; }
.skills-col h3 { font-size: 0.95rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 12px; }
.skills-line { color: var(--color-text-muted); font-size: 0.94rem; margin: 0; }

/* ---------------- Education ---------------- */
.edu-item { padding: 22px 0; border-top: 1px solid var(--color-border); }
.education-section .edu-item:first-of-type,
#education .edu-item:first-of-type { border-top: none; }
.edu-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.edu-head h3 { margin-bottom: 2px; font-size: 1.08rem; }
.edu-meta { color: var(--color-text-muted); font-size: 0.85rem; white-space: nowrap; }
.edu-org { color: var(--color-text-muted); font-size: 0.94rem; }
.edu-classes { color: var(--color-text-muted); font-size: 0.9rem; margin-top: 6px; max-width: var(--measure); }

/* ---------------- Resume section ---------------- */
.resume-box {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.resume-embed {
  flex: 1 1 340px;
  min-width: 280px;
  height: 460px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.resume-copy { flex: 1 1 260px; max-width: 340px; padding-top: 4px; }

/* ---------------- Contact ---------------- */
.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
}
.contact-row a { color: var(--color-text); }
.contact-row a:hover { color: var(--color-accent-dark); }
.contact-sep { color: var(--color-text-muted); }

/* ---------------- Footer ---------------- */
.site-footer {
  padding: 30px 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.site-footer p { margin: 0; color: inherit; }

/* ---------------- Project detail page ---------------- */
.project-hero {
  padding: 52px 0 36px;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.breadcrumb { font-size: 0.85rem; margin-bottom: 18px; color: var(--color-text-muted); }
.breadcrumb a { border-bottom: 1px solid rgba(25,57,94,0.25); }
.project-hero h1 { margin-bottom: 12px; font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.project-tags { display: flex; flex-wrap: wrap; gap: 0; margin-top: 16px; }

.detail-section { padding: 48px 0; border-top: 1px solid var(--color-border); }
.detail-section:first-of-type { border-top: none; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
}
.fact-card { padding-top: 14px; border-top: 1px solid var(--color-border); }
.fact-card h4 { margin-bottom: 6px; color: var(--color-text-muted); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; font-weight: 700; }

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}
.chart-figure { margin: 0; }
.chart-figure img { border-radius: var(--radius); border: 1px solid var(--color-border); margin-bottom: 10px; }
.chart-figure figcaption { color: var(--color-text-muted); font-size: 0.86rem; }

.metric-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}
.metric-table th, .metric-table td {
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 14px 10px 0;
  text-align: left;
}
.metric-table th { font-weight: 700; color: var(--color-text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

.lp-block {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 26px 30px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.94rem;
  overflow-x: auto;
  line-height: 1.9;
}
.lp-block .lp-title { color: #93c5fd; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.74rem; margin-bottom: 10px; }
.lp-block .lp-line { white-space: pre; }
.lp-block + .lp-block { margin-top: 16px; }

.limitations-list, .contribution-box {
  border-left: 2px solid var(--color-border);
  padding: 4px 0 4px 20px;
}
.limitations-list ul { margin: 0; padding-left: 18px; }
.limitations-list li { margin-bottom: 8px; color: var(--color-text-muted); }

.links-list { list-style: none; padding: 0; margin: 0; }
.links-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--color-border);
}
.links-list li:first-child { border-top: none; }
.links-list .link-name { font-weight: 600; }
.links-list .link-desc { color: var(--color-text-muted); font-size: 0.85rem; }

.badge-note {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-left: 2px solid var(--color-border);
  padding-left: 10px;
}
.tag-chip {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  position: relative;
}
.tag-chip + .tag-chip::before { content: "\00b7"; margin: 0 10px; color: var(--color-border); }

/* ---------------- Leadership and community ----------------
   Palette below is scoped to the community section (and the photo/lightbox
   elements that only ever appear inside it) — deep olive, not navy. */
.community-section {
  --c-bg: #343D2E;
  --c-panel: #465040;
  --c-ivory: #F5EFE7;
  --c-beige: #DDD5C8;
  --c-sage: #AAB09A;
  --c-gold: #B6A078;
  --c-divider: rgba(245, 239, 231, 0.16);
  background: var(--c-bg);
  color: var(--c-ivory);
}
.community-section h2,
.community-section h3,
.community-section h4,
.community-section p { color: inherit; }
.community-section .section-intro { color: var(--c-beige); max-width: 640px; }
.impact-feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; overflow: hidden; border-radius: var(--radius); background: var(--c-panel); margin: 40px 0 28px; }
.impact-copy { padding: 42px; align-self: center; }
.impact-copy h3 { font-family: var(--font-display); font-size: 1.9rem; margin-top: 8px; }
.impact-copy p { color: var(--c-beige); }
.card-label { display: inline-block; color: var(--c-gold); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; }
.date-line { color: var(--c-sage) !important; font-size: 0.86rem; font-weight: 600; }
.experience-photo { width: 100%; min-height: 230px; height: 100%; object-fit: cover; }
.community-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.community-card { display: flex; flex-direction: column; }
.community-card .experience-photo-wrap { margin-bottom: 16px; }
.community-card h3 { margin-top: 10px; font-size: 1.08rem; }
.community-card p:last-child { color: var(--c-beige); font-size: 0.92rem; }
.service-strip { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--c-divider); }
.service-strip h3 { font-family: var(--font-display); font-size: 1.1rem; }
.service-line { color: var(--c-beige); font-size: 0.92rem; max-width: 720px; }
.recognition-panel { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--c-divider); }
.recognition-panel > h3 { margin-bottom: 24px; }
.recognition-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.recognition-list article { padding-top: 14px; border-top: 1px solid var(--c-divider); }
.recognition-list h4 { font-size: 0.98rem; margin-bottom: 6px; }
.recognition-list p { color: var(--c-beige); font-size: 0.88rem; }

/* ---------------- Community experience photos ----------------
   These classes only ever render inside the community section, so they are
   hard-coded to the same olive palette above (no cross-tree CSS variable
   inheritance from .community-section is possible here). */
.experience-photo-wrap { position: relative; overflow: hidden; min-height: 175px; background: #465040; border-radius: var(--radius); }
.experience-photo-wrap-large { min-height: 420px; }
.experience-photo-wrap .experience-photo { width: 100%; height: 100%; min-height: 0; object-fit: cover; transition: transform 0.4s ease; }
.experience-photo-wrap:hover .experience-photo { transform: scale(1.03); }

.gallery-view-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: rgba(52, 61, 46, 0.72);
  color: #F5EFE7;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid rgba(182, 160, 120, 0.6);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  font-family: var(--font-body);
}
.gallery-view-btn:hover,
.gallery-view-btn:focus-visible { background: rgba(52, 61, 46, 0.92); border-color: #B6A078; }
.gallery-view-btn svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ---------------- Lightbox (functionality unchanged) ---------------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(52, 61, 46, 0.92);
  padding: 24px;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.is-open { display: flex; }
body.lightbox-locked { overflow: hidden; }

.lightbox-modal {
  background: #465040;
  border-radius: 10px;
  max-width: 900px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(245, 239, 231, 0.16);
}
.lightbox-title { font-family: var(--font-display); font-weight: 700; color: #F5EFE7; font-size: 1.02rem; }
.lightbox-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(245, 239, 231, 0.12);
  color: #F5EFE7;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.lightbox-close:hover { background: #B6A078; color: #343D2E; }

.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #343D2E;
  min-height: 260px;
}
.lightbox-image { max-width: 100%; max-height: 62vh; object-fit: contain; display: block; margin: 0 auto; }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(245, 239, 231, 0.35);
  background: rgba(52, 61, 46, 0.55);
  color: #F5EFE7;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.lightbox-nav:hover { background: #B6A078; color: #343D2E; }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }

.lightbox-counter { text-align: center; padding: 10px 0 4px; font-size: 0.8rem; color: #DDD5C8; }

.lightbox-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 16px 16px;
  overflow-x: auto;
  background: #465040;
}
.lightbox-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.lightbox-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox-thumb.is-active,
.lightbox-thumb:hover { opacity: 1; border-color: #B6A078; }

/* ---------------- 404 page ---------------- */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.error-page h1 { font-size: 4.4rem; margin-bottom: 0; color: var(--color-accent-dark); }
.error-page p { color: var(--color-text-muted); max-width: 420px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .project-row, .project-row-reverse {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .project-row-reverse .project-row-media { order: 0; }
  .project-row-reverse .project-row-copy { order: 0; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-menu.is-open { max-height: 480px; }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: 14px 24px; width: 100%; border-bottom: 1px solid var(--color-border); }
  .nav-cta { margin: 0; }

  .skills-columns { grid-template-columns: 1fr; gap: 28px; }
  .contact-row { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 0; text-align: left; }
  .hero-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "portrait" "actions";
    row-gap: 28px;
    padding-bottom: 32px;
  }
  .hero-copy-actions { margin-top: 0; }
  .portrait-frame { max-width: 210px; margin: 0 auto; }
  .portrait-frame::before { top: -12px; left: -12px; }
  .hero-credential-inner { justify-content: flex-start; gap: 8px 20px; padding: 14px 24px; font-size: 0.74rem; }
  .impact-feature { grid-template-columns: 1fr; }
  .experience-photo-wrap-large { min-height: 260px; }
  .impact-copy { padding: 28px; }
  .community-grid { grid-template-columns: 1fr; }
  .recognition-list { grid-template-columns: 1fr; gap: 20px; }
  .resume-box { flex-direction: column; }
  .section { padding: 52px 0; }
  .edu-head { flex-direction: column; gap: 2px; }
}

@media (max-width: 480px) {
  .timeline-head { flex-direction: column; }
  .lp-block { padding: 20px 18px; font-size: 0.85rem; }

  .gallery-view-btn { right: 10px; bottom: 10px; padding: 7px 12px; font-size: 0.72rem; }
  .lightbox-overlay { padding: 0; }
  .lightbox-modal { max-height: 100vh; border-radius: 0; }
  .lightbox-image { max-height: 46vh; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 1.3rem; }
  .lightbox-thumb { width: 48px; height: 48px; }
}
