/* ==========================================================
   DESIGN TOKENS
   ========================================================== */
:root {
  --ivory: #FAF7F1;
  --paper: #FFFFFF;
  --ink: #211E1A;
  --graphite: #5B564C;
  --graphite-soft: #8C8578;
  --amber: #A2732A;
  --amber-soft: #C99A54;
  --line: #E4DDCF;
  --line-strong: #D2C9B6;
  --tag-bg: #F1EBDD;

  --font-display: 'Fraunces', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 1180px;
  --gutter: clamp(24px, 5vw, 64px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

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

/* ==========================================================
   SHARED UTILITIES
   ========================================================== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 14px;
}

.idx {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--graphite-soft);
  letter-spacing: 0.05em;
}

.btn-solid,
.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 2px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-solid {
  background: var(--ink);
  color: var(--ivory);
  border: 1px solid var(--ink);
}
.btn-solid:hover { background: var(--amber); border-color: var(--amber); }

.btn-line {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-line:hover { border-color: var(--amber); color: var(--amber); }

section { padding: 0 var(--gutter); }

.section-head {
  max-width: var(--max);
  margin: 0 auto 56px;
  padding-top: 96px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 18px;
  row-gap: 6px;
  align-items: baseline;
}
.section-head .idx { grid-row: 1; }
.section-head h2 {
  grid-row: 1;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin: 0;
  letter-spacing: -0.01em;
}
.section-head .section-note {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  max-width: 46ch;
  color: var(--graphite);
  font-size: 0.98rem;
}

/* ==========================================================
   TOP BAR
   ========================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px var(--gutter);
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}

.mark {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: 6px 10px;
  border-radius: 2px;
}

.topnav {
  display: flex;
  gap: 18px;
  margin: 0 auto 0 32px;
  flex: 1;
  flex-wrap: nowrap;
}
.topnav a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--graphite);
  white-space: nowrap;
  transition: color 0.2s ease;
}
.topnav a:hover { color: var(--amber); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-toggle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--graphite);
  padding: 7px 11px;
  border-radius: 2px;
  cursor: pointer;
}
.lang-toggle:hover { border-color: var(--amber); color: var(--amber); }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink);
}

/* ==========================================================
   MASTHEAD
   ========================================================== */
.masthead {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: clamp(56px, 9vw, 108px);
  padding-bottom: 64px;
  border-bottom: 1px solid var(--line);
}

.masthead-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 7.2rem);
  line-height: 0.96;
  letter-spacing: -0.015em;
  margin: 0 0 48px;
}

.masthead-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line-strong);
}

.role-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  margin: 0 0 12px;
  max-width: 30ch;
}

.role-sub {
  color: var(--graphite);
  max-width: 44ch;
  margin: 0;
}

.masthead-meta dl { margin: 0; }
.masthead-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.masthead-meta div:last-child { border-bottom: none; }
.masthead-meta dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite-soft);
}
.masthead-meta dd {
  margin: 0;
  text-align: right;
  font-size: 0.92rem;
}
.masthead-meta a { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.masthead-meta a:hover { border-color: var(--amber); color: var(--amber); }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 7px 12px;
  color: var(--graphite);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

/* ==========================================================
   ABOUT
   ========================================================== */
.about {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 80px;
  padding-bottom: 80px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.about-index { display: flex; align-items: flex-start; gap: 10px; }
.idx-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite-soft);
}
.about-body { max-width: 68ch; }
.lede {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.45;
  margin: 0 0 24px;
  letter-spacing: -0.005em;
}
.about-body p { color: var(--graphite); }
.about-facts {
  display: flex;
  gap: 48px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.about-facts dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite-soft);
  margin-bottom: 4px;
}
.about-facts dd { margin: 0; font-size: 0.92rem; color: var(--ink); }

/* ==========================================================
   SELECTED WORK — CASE STUDIES
   ========================================================== */
.work { padding-bottom: 40px; }

.case {
  max-width: var(--max);
  margin: 0 auto 96px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: start;
}
.case-reverse { grid-template-columns: 1fr 1.15fr; }
.case-reverse .case-media { order: 2; }
.case-reverse .case-body { order: 1; }

.case-media {
  border: 1px solid var(--line-strong);
  overflow: hidden;
  position: sticky;
  top: 90px;
}
.case-media img { width: 100%; display: block; }

.case-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 10px;
}
.case-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 2.4vw, 2.3rem);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.case-kicker {
  color: var(--graphite);
  font-size: 0.94rem;
  margin: 0 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.case-block { margin-bottom: 20px; }
.case-block p { margin: 0; }
.case-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite-soft);
  margin: 0 0 6px !important;
}
.case-block p:not(.case-label) { color: var(--graphite); }
.case-tools { color: var(--ink) !important; font-size: 0.92rem; }

.case-quote {
  margin: 28px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.case-quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 12px;
}
.case-quote cite {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--graphite-soft);
}

.case-result {
  margin: 20px 0 0;
  padding: 16px 18px;
  border-left: 2px solid var(--amber);
  background: var(--tag-bg);
}
.case-result .case-label { color: var(--amber); }
.case-result p:not(.case-label) { color: var(--ink); margin: 0; font-size: 0.94rem; }

.case-media-extra {
  margin-top: 16px;
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.case-media-extra img { width: 100%; display: block; }

.case-visit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--amber);
  border-bottom: 1px solid var(--amber-soft);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.case-visit:hover { color: var(--ink); border-color: var(--ink); }

/* ---- Expandable case accordion ---- */
.case-toggle {
  margin-top: 6px;
}
.case-toggle .hide-text { display: none; }
.case-toggle.open .show-text { display: none; }
.case-toggle.open .hide-text { display: inline; }
.case-toggle .chevron { transition: transform 0.25s ease; display: inline-block; }
.case-toggle.open .chevron { transform: rotate(180deg); }

.case-details {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s ease;
}
.case-details.open {
  max-height: 2400px;
}
.case-details-inner {
  padding-top: 22px;
}

/* ==========================================================
   FEATURED PROJECTS — compact-to-full case reveal
   ========================================================== */
.featured-project {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
}
.featured-project:first-of-type { padding-top: 4px; }
.featured-project:last-of-type { border-bottom: none; padding-bottom: 8px; }

.featured-col-text { min-width: 0; }

.featured-num { font-family: var(--font-mono); font-size: 0.7rem; color: var(--amber); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 10px; }
.featured-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 2.6vw, 2.1rem); margin: 0 0 10px; letter-spacing: -0.01em; }
.featured-category { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--graphite-soft); margin: 0 0 14px; }
.featured-desc { font-size: 0.95rem; line-height: 1.6; color: var(--graphite); margin: 0 0 22px; max-width: 46ch; }

.featured-toggle {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--graphite);
  padding: 0 0 3px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.featured-toggle:hover { color: var(--amber); border-color: var(--amber); }
.featured-toggle .label-hide { display: none; }
.featured-project.open .featured-toggle .label-show { display: none; }
.featured-project.open .featured-toggle .label-hide { display: inline; }

.featured-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease;
}
.featured-project.open .featured-body {
  max-height: 3200px;
}
.featured-body-inner {
  padding-top: 32px;
}
.featured-body-inner .case-block { margin-bottom: 26px; }
.featured-body-inner .case-block:last-child { margin-bottom: 0; }
.featured-body-inner .case-block p:not(.case-label) { font-size: 1rem; line-height: 1.7; }

.featured-col-image { width: 100%; }
.featured-col-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.featured-img-extra {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s ease, opacity 0.4s ease, margin-top 0.4s ease;
}
.featured-img-extra img { margin-top: 16px; }
.featured-project.open .featured-img-extra {
  max-height: 1600px;
  opacity: 1;
}

/* ==========================================================
   OTHER SELECTED WORK — curated visual archive / gallery grid
   ========================================================== */
.ow-head .section-note { max-width: 56ch; }

.other-work-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px 32px;
}
.ow-card { background: none; }
.ow-card--feature { grid-column: span 2; }
.ow-card--feature .ow-media { aspect-ratio: 16/8; }
.ow-card--feature .ow-name { font-size: 1.5rem; }
.ow-media { position: relative; aspect-ratio: 4/3; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.ow-media img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top;
  opacity: 0;
  transform: translateX(14px) scale(1.01);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.ow-media img.active { opacity: 1; transform: translateX(0) scale(1); }
.ow-dots {
  position: absolute;
  bottom: 10px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.ow-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
}
.ow-dots span.active { background: #fff; }

.ow-caption { padding: 16px 1px 0; }
.ow-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.ow-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.12rem;
  margin: 0;
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.ow-toggle {
  flex: none;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: none;
  color: var(--graphite);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.3s ease;
}
.ow-toggle:hover { border-color: var(--amber); color: var(--amber); }
.ow-toggle.open { transform: rotate(45deg); border-color: var(--amber); color: var(--amber); }
.ow-meta {
  margin: 7px 0 2px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  color: var(--graphite-soft);
}
.ow-context {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--amber);
}
.ow-visit {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  color: var(--graphite);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}
.ow-visit:hover { color: var(--amber); border-color: var(--amber); }
.ow-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.ow-details.open { max-height: 260px; }
.ow-details p {
  margin: 0;
  padding-top: 10px;
  margin-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--graphite);
  /*max-width: 40ch;*/
}
.ow-details .ow-visit { margin-top: 10px; }

/* ==========================================================
   MORE WORK
   ========================================================== */
.more-work { padding-bottom: 40px; }

.more-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.more-item {
  background: var(--ivory);
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.more-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
  filter: grayscale(35%);
  transition: filter 0.3s ease;
}
.more-item:hover img { filter: grayscale(0%); }
.more-item-info { padding: 18px 20px 24px; }
.more-item-info h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  margin: 0 0 6px;
}
.more-item-info p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--graphite-soft);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

/* ==========================================================
   EXPERIENCE / TIMELINE
   ========================================================== */
.experience { padding-bottom: 40px; }

.timeline {
  max-width: var(--max);
  margin: 0 auto;
  list-style: none;
  padding: 0;
}

.tjob {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.tjob:first-child { border-top: 1px solid var(--line-strong); }

.tjob-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--graphite-soft);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
}

.tjob-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 4px;
}
.tjob-company {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--amber);
  margin: 0 0 14px;
}
.tjob-body p { color: var(--graphite); margin: 0 0 14px; }
.tjob-body ul {
  margin: 0;
  padding-left: 18px;
  color: var(--graphite);
}
.tjob-body ul li { margin-bottom: 6px; }

.tjob-toggle-row {
  border-top: 1px solid var(--line);
  padding: 28px 0 0;
  display: block;
}

.older-jobs {
  display: none;
}
.older-jobs.open { display: block; }

/* ==========================================================
   CAPABILITIES
   ========================================================== */
.capabilities { padding-bottom: 40px; }

.cap-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 56px;
}

.cap-group {
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
}
.cap-group h3 {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite-soft);
  margin: 0 0 16px;
  font-weight: 500;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 0.86rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 8px 13px;
  color: var(--ink);
  background: var(--paper);
}

.lang-license {
  max-width: var(--max);
  margin: 48px auto 0;
  display: flex;
  gap: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.lang-license dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite-soft);
  margin-bottom: 4px;
}
.lang-license dd { margin: 0; font-size: 0.92rem; }

/* ==========================================================
   AI-ASSISTED WORKFLOWS
   ========================================================== */
.ai-workflows { padding-bottom: 40px; }

.ai-statement {
  max-width: var(--max);
  margin: 0 auto 48px;
  padding: 28px 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.ai-statement p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.5;
  margin: 0;
  max-width: 52ch;
}

.ai-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
}

.ai-group h3 {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--graphite-soft);
  margin: 0 0 16px;
  font-weight: 500;
}

/* ==========================================================
   EDUCATION
   ========================================================== */
.education { padding-bottom: 40px; }

.edu-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
.edu-card {
  background: var(--ivory);
  padding: 32px 28px;
}
.edu-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--amber);
  margin: 0 0 14px;
}
.edu-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0 0 10px;
  line-height: 1.3;
}
.edu-institution {
  margin: 0;
  font-size: 0.88rem;
  color: var(--graphite);
}

/* ==========================================================
   REFERENCES
   ========================================================== */
.references { padding-bottom: 40px; }

.ref-wrapper { max-width: var(--max); margin: 0 auto; position: relative; }
.ref-container { overflow: hidden; }
.ref-track {
  display: flex;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: transform 0.35s ease;
}

.ref-card {
  width: min(420px, 86vw);
  min-width: min(420px, 86vw);
  flex: 0 0 auto;
  background: var(--ivory);
  margin: 0;
  padding: 32px 30px;
  box-sizing: border-box;
}
.ref-card p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0 0 24px;
}
.ref-card cite {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ref-name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.ref-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--graphite-soft);
}

.ref-btn {
  position: absolute;
  top: -52px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  background: var(--ivory);
  color: var(--ink);
  border-radius: 2px;
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.ref-btn:hover { border-color: var(--amber); color: var(--amber); }
.ref-prev { right: 50px; }
.ref-next { right: 0; }

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 96px;
  padding-bottom: 64px;
  border-top: 1px solid var(--line);
}
.site-footer h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin: 0 0 32px;
  letter-spacing: -0.01em;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  margin-bottom: 36px;
}
.footer-grid a { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.footer-grid a:hover { border-color: var(--amber); color: var(--amber); }
.footer-grid span { color: var(--graphite-soft); }

.footer-cv { margin-bottom: 56px; }

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--graphite-soft);
  margin: 0;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media screen and (max-width: 900px) {
  .topnav {
    display: none;
    position: fixed;
    top: 65px;
    left: 0;
    width: 100vw;
    flex-direction: column;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    margin: 0;
    box-sizing: border-box;
    z-index: 60;
  }
  .topnav.open { display: flex; }
  .topnav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .topnav a:last-child { border-bottom: none; }
  .nav-burger { display: flex; }
  .nav-burger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-burger.active span:nth-child(2) { opacity: 0; }
  .nav-burger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav-burger span { transition: transform 0.2s ease, opacity 0.2s ease; }

  .masthead-grid { grid-template-columns: 1fr; gap: 28px; }
  .about { grid-template-columns: 1fr; }
  .about-index { margin-bottom: 8px; }

  .case,
  .case-reverse {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .case-reverse .case-media,
  .case-reverse .case-body,
  .case-media, .case-body { order: initial; }
  .case-media { position: static; }

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

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

  .featured-project { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
  .featured-col-image { order: -1; }
  .featured-name { font-size: 1.4rem; }
  .featured-body-inner { padding-top: 24px; }

  .other-work-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }

  .ai-grid { grid-template-columns: 1fr; gap: 32px; }

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

  .tjob { grid-template-columns: 1fr; gap: 8px; }
  .tjob-date { flex-direction: row; gap: 8px; }
}

@media screen and (max-width: 560px) {
  .more-grid { grid-template-columns: 1fr; }
  section { padding: 0 20px; }
  .section-head { padding-top: 72px; grid-template-columns: auto 1fr; }
  .footer-grid { flex-direction: column; }
  .ref-card { min-width: 88vw; }
  .other-work-grid { grid-template-columns: 1fr; gap: 40px; }
  .ow-card--feature { grid-column: auto; }
  .ow-card--feature .ow-media { aspect-ratio: 4/3; }
}

/* ==========================================================
   PRINT (website — reference only; the CV/Portfolio PDFs are
   separate purpose-built documents in /print)
   ========================================================== */
@media print {
  .topbar, .nav-burger, .hero-actions, .ref-btn, #toggleOlderJobs { display: none !important; }
  body { background: #fff; }
  .case-media { position: static; }
  section { padding: 0 20px; }
  a { color: inherit; text-decoration: none; }
}
