/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
  --bg: #000000;
  --bg-alt: #111113;
  --bg-card: #1c1c1e;
  --text: #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary: #6e6e73;
  --accent: #2997ff;
  --accent-hover: #62b3ff;
  --divider: rgba(255, 255, 255, 0.14);
  --divider-soft: rgba(255, 255, 255, 0.08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max-width: 1100px;
  --section-pad: clamp(4rem, 10vw, 8rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

p { margin: 0; }

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

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

button { font-family: inherit; }

::selection { background: var(--accent); color: #fff; }


/* ==========================================================================
   STAT STRIP
   ========================================================================== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
  margin-top: 5rem;       /* Increased from 4rem to push it away from the bio */
  margin-bottom: 5rem;    /* NEW: Pushes the coursework head down */
}

/* ==========================================================================
   COURSEWORK TICKER
   ========================================================================== */
.subjects-ticker-section { overflow: hidden; }

.ticker-mask {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 55s linear infinite;
}

.subjects-ticker-section:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-list {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.6rem;
  padding-right: 0.6rem;
}

.ticker-list li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  white-space: nowrap;
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.ticker-list li:hover {
  border-color: var(--accent);
  color: var(--text);
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-10%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-mask { overflow-x: auto; }
}

@media (max-width: 600px) {
  .ticker-list li { font-size: 0.78rem; padding: 0.35rem 0.8rem; }
}


/* ==========================================================================
   NAV — fixed, blurred, apple-style
   ========================================================================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 52px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.stretched-link::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  content: "";
}

.site-nav.is-scrolled {
  border-bottom-color: var(--divider-soft);
}

.site-nav .nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav .brand {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a:not(.pill-btn) {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-links a:not(.pill-btn):hover,
.nav-links a:not(.pill-btn):focus-visible,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}

/* ==========================================================================
   PILL BUTTONS
   ========================================================================== */
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85rem;
  font-weight: 400;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.pill-btn--primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

.pill-btn--primary:hover,
.pill-btn--primary:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.pill-btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--divider);
}

.pill-btn--ghost:hover,
.pill-btn--ghost:focus-visible {
  border-color: var(--text-secondary);
}

.pill-btn--lg {
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
}

.link-chevron {
  color: var(--accent);
  font-size: 1.02rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  transition: gap 0.15s ease;
}

.link-chevron:hover,
.link-chevron:focus-visible { gap: 0.5em; color: var(--accent-hover); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  padding: calc(52px + 7rem) 1.5rem 5rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero .eyebrow {
  display: block;
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 0%, #a9a9ae 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .role {
  display: block;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--text-secondary);
  margin-top: 0.9rem;
  font-weight: 400;
}

.hero .lede {
  max-width: 60ch;
  margin: 1.75rem auto 0;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.hero .hero-actions {
  margin-top: 2.25rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section {
  padding: var(--section-pad) 1.5rem;
  border-top: 1px solid var(--divider-soft);
}

.section--alt { background: var(--bg-alt); }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-head {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-head .eyebrow {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.section-head h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 1rem;
}

/* scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3.5rem;
  align-items: center;
}

.about-grid .portrait {
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg-card);
}

.about-grid .bio h3 {
  font-size: 1.6rem;
  margin-bottom: 1.1rem;
}

.about-grid .bio p {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  font-size: 1.02rem;
}

.about-grid .bio p:last-child { margin-bottom: 0; }

/* ==========================================================================
   STAT STRIP
   ========================================================================== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
  margin-top: 4rem;
}

.stat-strip .stat-num {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  color: var(--text);
}

.stat-strip .stat-label {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.4rem;
}

/* ==========================================================================
   HOBBY CARDS
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.hobby-card {
  background: var(--bg-card);
  border: 1px solid var(--divider-soft);
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.hobby-card:hover { transform: translateY(-6px); border-color: var(--divider); }

.hobby-card .hobby-photo-frame {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.hobby-card .hobby-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hobby-card:hover .hobby-photo-frame img { transform: scale(1.04); }

.hobby-card .hobby-content {
  padding: 1.75rem 1.85rem 2rem;
}

.hobby-card .hobby-icon {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
  display: block;
}

.hobby-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.hobby-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
}

/* ==========================================================================
   PROJECTS
   ========================================================================== */
.project-block {
  padding: var(--section-pad) 1.5rem;
  border-top: 1px solid var(--divider-soft);
}

.project-block--alt { background: var(--bg-alt); }

.project-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.project-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.project-head .eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  display: block;
  margin-bottom: 0.6rem;
}

.project-head h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.project-head .tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 0.9rem;
}

.project-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.project-body .summary p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.project-body .summary p:last-child { margin-bottom: 0; }

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

.spec-grid .spec {
  background: var(--bg-card);
  border: 1px solid var(--divider-soft);
  border-radius: 16px;
  padding: 1rem 1.2rem;
}

.spec .spec-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.spec .spec-value {
  font-size: 0.98rem;
  color: var(--text);
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1.5rem 0 0;
}

.tags li {
  font-size: 0.78rem;
  color: var(--text-secondary);
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}

/* ==========================================================================
   GALLERY — edge-to-edge masonry wall
   ========================================================================== */
.gallery-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gallery-row {
  display: flex;
  gap: 6px;
}

.gallery-item {
  position: relative;
  display: block;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

.thumb-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-card);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
}

/* once JS has measured real aspect ratios and sized each row, the image
   fills its box exactly rather than keeping its own intrinsic height */
.gallery.is-justified .gallery-item img {
  height: 100%;
  object-fit: cover;
}

/* quiet dim-and-lift on hover instead of a caption */
.thumb-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.gallery-item:hover .thumb-frame::before {
  background: rgba(0, 0, 0, 0.06);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* video / youtube — a slim ring rather than a solid disc */
.gallery-item[data-type="video"] .thumb-frame::after,
.gallery-item[data-type="youtube"] .thumb-frame::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.3s ease, background 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.gallery-item[data-type="video"]::after,
.gallery-item[data-type="youtube"]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(50% + 2px);
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent #fff;
  pointer-events: none;
  z-index: 3;
}

.gallery-item[data-type="video"]:hover .thumb-frame::after,
.gallery-item[data-type="youtube"]:hover .thumb-frame::after {
  transform: translate(-50%, -50%) scale(1.08);
  background: rgba(0, 0, 0, 0.34);
}

/* ==========================================================================
   PROJECT OVERVIEW GRID (projects.html)
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--divider-soft);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.project-card:hover {
  border-color: var(--divider);
  transform: translateY(-4px);
}

.project-card .card-photo-frame {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.project-card .card-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-card:hover .card-photo-frame img {
  transform: scale(1.045);
}

.project-card .card-content {
  padding: 1.6rem 1.75rem 1.85rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card .card-kind {
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
  margin-bottom: 0.55rem;
}

.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.55rem;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  flex: 1;
}

.project-card .card-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 1.1rem 0 0;
}

.project-card .card-tags li {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
}

.project-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--divider-soft);
}

.project-card .card-meta {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.project-card .card-arrow {
  color: var(--accent);
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

.project-card:hover .card-arrow {
  transform: translateX(3px);
}

.project-card--placeholder {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1.75rem;
  color: var(--text-tertiary);
  border-style: dashed;
}

.project-card--placeholder:hover {
  transform: none;
  border-color: var(--divider-soft);
}

.project-card--placeholder .card-kind { color: var(--text-tertiary); }

/* ==========================================================================
   PROJECT DETAIL HERO (individual project pages)
   ========================================================================== */
.project-hero {
  padding: calc(52px + 4.5rem) 1.5rem 3rem;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.project-hero .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  transition: color 0.15s ease, gap 0.15s ease;
}

.project-hero .back-link:hover {
  color: var(--text);
  gap: 0.6em;
}

.project-hero .eyebrow {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.project-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.project-hero .tagline {
  max-width: 56ch;
  margin: 1.1rem auto 0;
  font-size: 1.08rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   PROJECT PAGER (prev/next between detail pages)
   ========================================================================== */
.project-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4.5rem;
  border-top: 1px solid var(--divider-soft);
}

@media (max-width: 560px) {
  .project-pager { padding: 2.25rem 1.25rem 3.5rem; }
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}

.lightbox.is-open { display: flex; }

.lightbox-inner {
  max-width: min(90vw, 920px);
  max-height: 85vh;
  width: 100%;
  background: var(--bg-alt);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--divider-soft);
}

.lightbox-media {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: auto;
}

.lightbox-media img,
.lightbox-media video { max-width: 100%; max-height: 78vh; }

.lightbox-media iframe { width: 100%; height: 78vh; border: none; }

.lightbox-caption {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 0.9rem 1.2rem;
  border-top: 1px solid var(--divider-soft);
}

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  border: none;
  border-radius: 999px;
  width: 2.1rem;
  height: 2.1rem;
  font-size: 0.95rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 2.5rem;
}

.contact-methods .pill-btn--ghost {
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 640px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-form label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.4rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--divider);
  background: var(--bg-card);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.contact-form textarea { resize: vertical; min-height: 140px; }

.contact-form button {
  align-self: flex-start;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--divider-soft);
}

.site-footer p {
  color: var(--text-tertiary);
  font-size: 0.82rem;
}

.site-footer .footer-links {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.site-footer .footer-links a {
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.site-footer .footer-links a:hover { color: var(--text); }

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 860px) {
  .about-grid,
  .project-body {
    grid-template-columns: 1fr;
  }

  .about-grid .portrait { max-width: 260px; margin: 0 auto; }

  .stat-strip { grid-template-columns: 1fr; gap: 2.5rem; }

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

  .nav-toggle { display: inline-block; }

  .nav-links {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.5rem 1.25rem;
    display: none;
    border-bottom: 1px solid var(--divider-soft);
  }

  .nav-links.is-open { display: flex; }

  .nav-links a:not(.pill-btn) { padding: 0.75rem 0; width: 100%; }
  .nav-links .pill-btn { margin-top: 0.75rem; }
}

@media (max-width: 500px) {
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   RESUME PAGE
   ========================================================================== */
.resume-hero {
  padding: calc(52px + 4.5rem) 1.5rem 3rem;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
}

.resume-hero .eyebrow {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.resume-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.resume-hero .tagline {
  max-width: 56ch;
  margin: 1.1rem auto 0;
  font-size: 1.08rem;
  color: var(--text-secondary);
}

.resume-spread {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.resume-page-row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 230px;
  align-items: stretch;
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.resume-page-row:last-child { margin-bottom: 0; }

.resume-rail {
  position: relative;
}

.resume-page-img {
  display: block;
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.photo-pin {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  transform: translateY(-50%);
}

.photo-pin-frame {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--divider-soft);
  background: var(--bg-card);
  transition: border-color 0.25s ease;
}

.photo-pin-frame img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.photo-pin:hover .photo-pin-frame { border-color: var(--divider); }
.photo-pin:hover .photo-pin-frame img { transform: scale(1.04); }

.photo-pin-caption {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  line-height: 1.3;
}

.resume-rail--left .photo-pin-caption { text-align: right; }

.photo-pin--placeholder .photo-pin-frame {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  background: transparent;
}

.photo-pin--placeholder .placeholder-label {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-align: center;
  padding: 0 0.75rem;
}

.resume-cta {
  text-align: center;
  padding: var(--section-pad) 1.5rem;
}

.resume-cta p {
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

/* Confirm-to-download modal */
.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}

.confirm-modal.is-open { display: flex; }

.confirm-modal-box {
  background: var(--bg-card);
  border: 1px solid var(--divider-soft);
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  padding: 2rem;
  text-align: center;
}

.confirm-modal-box h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.confirm-modal-box p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 1.6rem;
}

.confirm-modal-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.page-label {
  display: none;
}

@media (max-width: 900px) {
  .resume-page-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .page-label {
    display: block;
    order: 0;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.9rem;
  }

  .resume-page-img { order: 1; }

  .resume-rail {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 0.75rem;
    margin-top: 1.1rem;
    padding-bottom: 0.35rem;
    order: 2;
  }

  .photo-pin {
    position: static;
    transform: none;
    flex: 0 0 auto;
    width: 130px;
    scroll-snap-align: start;
  }

  .resume-rail--left .photo-pin-caption,
  .resume-rail--right .photo-pin-caption {
    text-align: left;
    font-size: 0.66rem;
  }

  .resume-page-row {
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--divider-soft);
  }

  .resume-page-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

@media (max-width: 480px) {
  .photo-pin { width: 110px; }
}

