/* ============================================================
   PORTFOLIO DESIGN SYSTEM
   Shared stylesheet for index + project pages
   ============================================================ */

/* ---- Tokens ---- */
:root {
  /* Surfaces */
  --bg:          #0c0f0d;
  --panel:       #14191680;
  --panel-solid: #161b18;
  --line:        #283029;

  /* Text */
  --ink:       #e6ebe7;
  --ink-dim:   #8a948c;
  --ink-faint: #4f574f;

  /* Highlight — phosphor green */
  --hi:        #00e676;
  --hi-bright: #5cffa8;
  --hi-deep:   #0a3d24;

  /* Status */
  --warn: #f5c451;
  --crit: #ff5d5d;

  /* Type */
  --display: 'Space Grotesk', sans-serif;
  --body:    'Inter', sans-serif;
  --mono:    'JetBrains Mono', monospace;

  /* Layout */
  --space:  clamp(1rem, 0.6rem + 2vw, 2rem);
  --radius: 4px;
  --maxw:   1080px;
}

/* ---- Reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: inherit; transition: color 0.15s ease; }
a:hover { color: var(--hi); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space);
  position: relative;
}

/* ---- Reusable: eyebrow / mono labels ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hi);
  display: inline-flex;
  align-items: center;
  gap: 0.60em;
}

/* ============================================================
   DEV BANNER (temp_prod only — remove when the page is finished)
   ============================================================ */
.dev-banner {
  background: var(--crit);
  color: #240505;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(0.9rem, 0.7rem + 1vw, 1.35rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 1.1rem var(--space);
  border-bottom: 2px solid #240505;
}

/* Quieter sibling — a tinted strip rather than a solid fill */
.wip-banner {
  background: color-mix(in srgb, var(--warn) 12%, var(--bg));
  color: var(--warn);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.55rem var(--space);
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent);
}

/* ============================================================
   NAVIGATION (shared)
   ============================================================ */
.nav {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav .brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav .brand span { color: var(--hi); }
.nav .links {
  display: flex;
  gap: 1.6rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.nav .links a {
  text-decoration: none;
  color: var(--ink-dim);
  transition: color 0.15s ease;
}
.nav .links a:hover { color: var(--hi); }

/* ============================================================
   SECTION SCAFFOLDING (shared)
   ============================================================ */
section {
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-bottom: 1px solid var(--line);
}
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.sec-head .idx {
  font-family: var(--mono);
  color: var(--hi);
  font-size: 0.8rem;
  font-weight: 700;
}
.sec-head h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.01em;
}
.sec-head .desc {
  color: var(--ink-dim);
  font-size: 0.9rem;
  margin-left: auto;
  max-width: 36ch;
}

/* ============================================================
   INTRO (index)
   ============================================================ */
.hero { padding: clamp(3rem, 8vw, 5.5rem) 0; border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 1.2rem 0;
}
.hero h1 .accent { color: var(--hi); }
.hero .lede {
  max-width: 50ch;
  color: var(--ink-dim);
  font-size: 1.08rem;
  margin-bottom: 2rem;
}
.hero .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.4rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.hero .meta-row b {
  color: var(--ink);
  font-weight: 500;
  display: block;
  font-size: 0.95rem;
}

/* Headshot frame — instrument styling */
.headshot {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  overflow: hidden;
}
.headshot img { width: 100%; height: 100%; object-fit: cover; }
.headshot .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}
.headshot .placeholder svg { width: 42px; height: 42px; opacity: 0.5; }
/* corner ticks */
.headshot::before, .headshot::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border-color: var(--hi);
  border-style: solid;
  z-index: 2;
}
.headshot::before { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.headshot::after  { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }

/* ============================================================
   FEATURED PROJECTS (index)
   ============================================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.project-card:hover {
  border-color: var(--hi);
  transform: translateY(-3px);
}
.project-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1d231f;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
}
.project-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block;}
.project-card .body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.project-card .body .pc-eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hi);
  margin-bottom: 0.6rem;
}
.project-card h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.project-card p { color: var(--ink-dim); font-size: 0.9rem; flex: 1; }
.project-card .arrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--hi);
  margin-top: 1.2rem;
}
/* temp_prod: tiles with no arrow — don't stretch the description into the
   space the arrow used to occupy. */
.project-card--static .body p { flex: 0 1 auto; }

/* ============================================================
   TIMELINE — education + experience (index)
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}
.col-title {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hi);
  margin-bottom: 1.6rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.entry {
  position: relative;
  padding-left: 1.4rem;
  padding-bottom: 1.8rem;
}
.entry::before {
  content: "";
  position: absolute;
  left: 0; top: 0.4rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--hi);
}
.entry::after {
  content: "";
  position: absolute;
  left: 3px; top: 1.1rem;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.entry:last-child { padding-bottom: 0; }
.entry:last-child::after { display: none; }
.entry .when {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.entry h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0.2rem 0;
}
.entry .org { color: var(--hi); font-size: 0.9rem; font-weight: 500; }
.entry p { color: var(--ink-dim); font-size: 0.88rem; margin-top: 0.4rem; }

/* ============================================================
   CONTACT (index)
   ============================================================ */
.contact-wrap { text-align: center; max-width: 560px; margin: 0 auto; }
.contact-wrap h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.02em;
  margin: 1rem 0 1.2rem;
}
.contact-wrap h2 .accent { color: var(--hi); }
.contact-wrap p { color: var(--ink-dim); margin-bottom: 2rem; }
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

/* ============================================================
   BUTTONS (shared)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.75em 1.4em;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--hi);
  transition: all 0.18s ease;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.btn-primary { background: var(--hi); color: #04140b; }
.btn-primary:hover { background: var(--hi-bright); box-shadow: 0 0 20px #00e67644; }
.btn-ghost { background: transparent; color: var(--hi); }
.btn-ghost:hover { background: var(--hi-deep); }
.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---- Tag pills (shared) ---- */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.32em 0.75em;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-dim);
}
.tag-pill.hot { border-color: var(--hi); color: var(--hi); }

/* ============================================================
   PROJECT PAGE
   ============================================================ */
.proj-hero {
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(1.25rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.back-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-dim);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.9rem;
  transition: color 0.15s ease;
}
.back-link:hover { color: var(--hi); }
.proj-hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0.1rem 0 0.45rem;
}
.proj-hero .project-type {
  display: inline-block;
  margin: 0 0 0.45rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--hi) 35%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--hi) 10%, transparent);
  color: var(--hi-bright);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.proj-hero .summary {
  width: 100%;
  color: var(--ink-dim);
  font-size: 1.1rem;
  margin: 1.2rem 0 1.8rem;
}

/* Spec sheet — key facts as a mono readout */
.spec-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2rem 0;
}
.spec-sheet .cell { background: var(--panel-solid); padding: 1.1rem; }
.spec-sheet .cell .k {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 0.4rem;
}
.spec-sheet .cell .v {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
}

/* Hero image / media frame */
.media-frame {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  overflow: hidden;
  margin: 0;
  position: relative;
}
/* Default fill behavior for any image dropped straight into a .media-frame */
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Aspect-ratio modifiers — opt-in variants for galleries/comparisons */
.media-frame--16x10 { aspect-ratio: 16 / 10; }
.media-frame--4x3    { aspect-ratio: 4 / 3; }
.media-frame--1x1    { aspect-ratio: 1 / 1; }
.media-frame--contain img { object-fit: contain; }

/* Compare grid — side-by-side image comparisons, 2 or 3 columns */
.compare-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
  margin: 0 auto;
}
.compare-grid--2 {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  max-width: 900px;
  justify-items: center;
}
.compare-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1200px;
}
.compare-item { width: 100%; }
.compare-grid--2 .compare-item { max-width: 420px; }
.compare-grid--3 .compare-item { max-width: 400px; }

.carousel-shell {
  margin: 1.25rem auto 0;
  max-width: 80%;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
  width: 100%;
}
.results-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.results-card .media-frame {
  aspect-ratio: auto;
  height: 22rem;
  background: transparent;
  border: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.results-card .media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.results-subtitle {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0;
  text-align: center;
}
.carousel {
  display: flex;
  flex-direction: column;
  position: relative;
}
.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: 1px solid color-mix(in srgb, var(--hi) 35%, var(--line));
  background: color-mix(in srgb, var(--panel-solid) 88%, transparent);
  color: var(--hi-bright);
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.carousel-btn:hover {
  border-color: var(--hi);
  color: var(--hi);
  background: color-mix(in srgb, var(--hi) 10%, var(--panel-solid));
}
.carousel-btn.prev { left: 0.75rem; }
.carousel-btn.next { right: 0.75rem; }
.carousel-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex: 0 0 100%;
  display: block;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  padding: 0.9rem 0 0;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  z-index: 3;
}
.carousel-caption {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 0.5rem 0 0;
  margin: 0;
  background: transparent;
}
.hero-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}
.skip-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}
.skip-links .skip-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.skip-links .separator {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  margin: 0 0.15rem;
}
.skip-links a {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.skip-links a:hover {
  color: var(--hi);
  border-color: var(--hi);
}
.carousel-dots .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-dim) 45%, transparent);
  border: 1px solid color-mix(in srgb, var(--line) 35%, transparent);
  padding: 0;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  opacity: 0.7;
}
.carousel-dots .dot:hover {
  background: color-mix(in srgb, var(--ink-dim) 60%, transparent);
  border-color: color-mix(in srgb, var(--line) 50%, transparent);
}
.carousel-dots .dot.active {
  background: color-mix(in srgb, var(--hi) 35%, transparent);
  border-color: color-mix(in srgb, var(--hi) 25%, var(--line));
  transform: scale(1.02);
  opacity: 1;
}

/* Article body for project writeups */
.proj-hero + section { padding-top: 1.25rem; }
.article { width: 100%; max-width: none; }
.article > h1 {
  margin: 3.5rem 0 1.4rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--hi);
  line-height: 1.08;
  padding-top: 0.6rem;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--hi) 30%, var(--line));
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
}
.article h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 4.75rem 0 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
}
.article h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 1.8rem 0 0.8rem;
  color: var(--ink);
}
.article h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  margin: 1.2rem 0 0.55rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.flowchart-center {
  display: flex;
  justify-content: center;
  margin: 1rem 0 1.5rem;
}
.flowchart-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 66rem);
}
.flowchart-media .media-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 24rem;
  max-height: 32rem;
  background: transparent;
  border: none;
  padding: 0;
}
.flowchart-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.flowchart-media .results-subtitle {
  margin: 0.75rem 0 0;
  text-align: center;
  max-width: 100%;
}
.plate-solving-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 1.8rem;
}
.plate-solving-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.plate-solving-card .media-frame {
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 10rem;
  background: transparent;
  border: none;
  padding: 0;
}
.plate-solving-card .media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.plate-solving-card .results-subtitle {
  margin: 0;
  text-align: center;
}
@media (max-width: 700px) {
  .program-flow-layout {
    grid-template-columns: 1fr;
  }
  .program-flow-right {
    justify-content: flex-start;
  }
  .flowchart-main {
    width: 100%;
    min-width: 0;
  }
  .plate-solving-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.article p { color: var(--ink-dim); margin-bottom: 1.2rem; }
.article ul { color: var(--ink-dim); margin: 0 0 1.2rem 1.2rem; }
.article li { margin-bottom: 0.5rem; }
.article strong { color: var(--ink); font-weight: 600; }
.article code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  color: var(--hi-bright);
}
.article pre {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  overflow-x: auto;
  margin: 1.2rem 0;
}
.article pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.7;
}

/* Next-project footer nav on project pages */
.proj-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.proj-next .label { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.08em; }
.proj-next h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; }
.proj-next a { text-decoration: none; color: inherit; }
.proj-next a:hover h3 { color: var(--hi); }

/* ============================================================
   FULLSCREEN IMAGE (lightbox) — shared
   ============================================================ */
/* Subtle expand affordance on any zoomable media frame */
.media-frame.zoomable { cursor: zoom-in; }
.fs-trigger {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 4;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--hi) 35%, var(--line));
  background: color-mix(in srgb, var(--panel-solid) 78%, transparent);
  color: var(--hi-bright);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-2px);
  backdrop-filter: blur(4px);
  transition: opacity 0.18s ease, transform 0.18s ease,
              border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.media-frame:hover .fs-trigger,
.fs-trigger:focus-visible {
  opacity: 1;
  transform: translateY(0);
}
.fs-trigger:hover {
  border-color: var(--hi);
  color: var(--hi);
  background: color-mix(in srgb, var(--hi) 12%, var(--panel-solid));
}

/* Overlay */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  background: color-mix(in srgb, var(--bg) 80%, #000);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  max-width: min(1100px, 100%);
  max-height: 100%;
  margin: 0;
  transform: scale(0.98);
  transition: transform 0.22s ease;
}
.lightbox.open .lightbox-figure { transform: scale(1); }
.lightbox-figure img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
}
.lightbox-caption {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: center;
  max-width: 64ch;
  margin: 0;
}
.lightbox-close {
  position: absolute;
  top: clamp(1rem, 3vw, 1.75rem);
  right: clamp(1rem, 3vw, 1.75rem);
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--hi) 35%, var(--line));
  background: color-mix(in srgb, var(--panel-solid) 88%, transparent);
  color: var(--hi-bright);
  font-family: var(--mono);
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.lightbox-close:hover {
  border-color: var(--hi);
  color: var(--hi);
  background: color-mix(in srgb, var(--hi) 10%, var(--panel-solid));
}

/* ============================================================
   FOOTER (shared)
   ============================================================ */
.site-footer {
  padding: 2.5rem 0 4rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
}
.site-footer .hi { color: var(--hi); }

/* ============================================================
   ACCESSIBILITY + RESPONSIVE
   ============================================================ */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--hi-bright);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .headshot { max-width: 280px; }
  .nav .links { gap: 1rem; }
  .sec-head .desc { margin-left: 0; }
}

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