/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --navy:        #00284d;
  --navy-deep:   #001b35;
  --orange:      #b44305;   /* links and text accents on light backgrounds */
  --orange-mid:  #d4550a;   /* rules, markers and other non-text accents */
  --orange-light:#f0700f;   /* accent on navy */
  --cream:       #faf6eb;
  --cream-warm:  #f3ecdb;

  --ink:         #00284d;
  --ink-soft:    #3c5772;
  --ink-mute:    #556a82;
  --rule:        rgba(0, 40, 77, 0.14);
  --rule-soft:   rgba(0, 40, 77, 0.08);

  --on-dark:      #f4efe2;
  --on-dark-soft: #a9c0d6;
  --on-dark-mute: #8aa5c0;
  --rule-dark:    rgba(244, 239, 226, 0.18);

  --sans: 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', sans-serif;

  --wide: 900px;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}
section[id] { scroll-margin-top: 1rem; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; margin: 0 0 .6em; }
h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.45rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 1.4rem;
}
h3 { font-size: 1rem; line-height: 1.3; margin-bottom: .3rem; letter-spacing: -0.005em; }

/* Short orange rule above each section heading. */
h2::before {
  content: "";
  display: block;
  width: 2.2rem; height: 3px;
  background: var(--orange-mid);
  margin-bottom: .9rem;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--orange); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

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

:focus-visible { outline: 2px solid var(--orange-mid); outline-offset: 3px; border-radius: 2px; }

/* Parked off-screen with clip rather than a large negative offset, which can
   widen the scrollable area. */
.skip {
  position: absolute;
  width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
  background: var(--navy); color: var(--on-dark);
  padding: .8rem 1.2rem; z-index: 200;
}
.skip:focus {
  left: 0; top: 0;
  width: auto; height: auto; overflow: visible;
  clip-path: none;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.wrap { width: min(100% - 2.5rem, var(--wide)); margin-inline: auto; }

section { padding-block: 3.2rem; }
section + section { border-top: 1px solid var(--rule-soft); }

.muted { color: var(--ink-mute); font-size: .95rem; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--cream);
  border-bottom: 2px solid var(--orange-mid);
  transition: box-shadow .3s ease, background-color .3s ease;
}
.site-header.is-stuck {
  background: rgba(250, 246, 235, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  box-shadow: 0 8px 24px rgba(0, 40, 77, 0.09);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1rem;
  min-height: 68px;
  transition: min-height .3s ease;
}
.site-header.is-stuck .wrap { min-height: 56px; }
.brand { margin-right: auto; display: flex; }
.brand img {
  height: 26px; width: auto;
  transition: height .3s ease;
}
.site-header.is-stuck .brand img { height: 22px; }

.site-header nav { display: flex; align-items: center; gap: 1.4rem; }
.site-header nav a {
  color: var(--ink-soft); text-decoration: none;
  font-size: .92rem;
}
.site-header nav a:hover { color: var(--orange); }

.lang { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--ink-mute); }
.lang a { color: var(--ink-mute); text-decoration: none; }
.lang a:hover { color: var(--orange); }
.lang [aria-current] { color: var(--orange); font-weight: 700; }

@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; gap: .6rem 1rem; padding-block: .8rem; min-height: 0; }
  .site-header nav { order: 3; width: 100%; gap: 1.1rem; flex-wrap: wrap; }
}

/* ── Intro ──────────────────────────────────────────────────────────────── */
.intro { padding-block: 3.5rem 3rem; }
.intro h1::after {
  content: "";
  display: block;
  width: 3.5rem; height: 4px;
  background: var(--orange-mid);
  margin-top: 1.4rem;
}
.intro-grid { display: flex; align-items: flex-start; gap: 2.5rem; }
.intro-grid > div:first-child { flex: 1; }
.intro p { max-width: 58ch; color: var(--ink-soft); font-size: 1.05rem; }
.intro-badge { width: 120px; flex: none; }

@media (max-width: 640px) { .intro-badge { display: none; } }

.contact-line {
  margin-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .4rem 1.4rem;
  font-size: 1rem;
}
.contact-line a { color: var(--ink); text-decoration-color: var(--orange-mid); }
.contact-line a:hover { color: var(--orange); }

/* ── Services ───────────────────────────────────────────────────────────── */
.cols { display: grid; gap: 1.7rem 2.5rem; }
@media (min-width: 660px) { .cols { grid-template-columns: 1fr 1fr; } }
.cols > div { border-top: 2px solid var(--rule); padding-top: .9rem; }
.cols h3 { color: var(--navy); }
.cols p { color: var(--ink-soft); font-size: .95rem; margin: 0; }

/* ── Featured work ──────────────────────────────────────────────────────── */
.featured {
  background: var(--cream-warm);
  border-left: 4px solid var(--orange-mid);
  padding: 1.8rem 1.8rem 2rem;
}
.featured + .featured { margin-top: 2rem; }
.featured .kicker {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange); margin: 0 0 .5rem;
}
.featured-title {
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  letter-spacing: -0.015em;
  margin-bottom: .2rem;
}
.featured .when { color: var(--ink-mute); font-size: .88rem; margin: 0 0 1.2rem; }
.featured p { color: var(--ink-soft); font-size: .97rem; }

.featured-fig { margin: 0; }
.featured-fig img { border: 1px solid var(--rule); }
.featured-fig figcaption {
  margin-top: .5rem; font-size: .82rem; color: var(--ink-mute);
}
.featured-fig--wide { margin-top: 1.6rem; }

.featured-grid { display: grid; gap: 1.5rem; }
@media (min-width: 720px) {
  .featured-grid { grid-template-columns: 1fr 1fr; align-items: start; gap: 2rem; }
}

.more { font-weight: 700; text-decoration-thickness: 2px; }

/* ── CV-style rows ──────────────────────────────────────────────────────── */
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { padding: 1rem 0; border-top: 1px solid var(--rule-soft); }
.rows li:first-child { border-top: 0; padding-top: 0; }
.rows .when {
  display: block;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  color: var(--orange); margin-bottom: .15rem;
}
.rows .what { font-weight: 700; }
.rows .where { color: var(--ink-soft); font-size: .97rem; }
@media (min-width: 660px) {
  .rows li { display: grid; grid-template-columns: 11rem 1fr; gap: 1.5rem; align-items: baseline; }
  .rows .when { margin: 0; }
}

/* ── Publications ───────────────────────────────────────────────────────── */
.pubs { margin: 0; padding: 0; list-style: none; }
.pubs li { padding: 1rem 0; border-top: 1px solid var(--rule-soft); }
.pubs li:first-child { border-top: 0; padding-top: 0; }
.pubs .title { margin: 0 0 .2rem; font-weight: 700; font-size: .98rem; line-height: 1.35; }
.pubs .title a { color: var(--ink); text-decoration-color: var(--orange-mid); }
.pubs .title a:hover { color: var(--orange); }
.pubs .meta { margin: 0; font-size: .86rem; color: var(--ink-mute); }

/* ── Thesis page ────────────────────────────────────────────────────────── */
.shot { margin: 2rem 0; }
.shot img { border: 1px solid var(--rule); background: #fff; }
.shot figcaption {
  margin-top: .6rem; font-size: .88rem; color: var(--ink-mute);
  border-left: 3px solid var(--orange-mid); padding-left: .7rem;
}
.shot--narrow img { max-width: min(340px, 100%); }

/* A photo that breaks out past the text column. Deliberately not full-bleed:
   this image is 2.45:1, so at viewport width it would either tower over the
   page or have to be cropped through the rig. */
.photo {
  margin: 2.5rem auto;
  width: min(100% - 2.5rem, 1120px);
}
.photo img {
  width: 100%;
  border: 1px solid var(--rule);
}
.photo figcaption {
  margin-top: .6rem;
  font-size: .85rem;
  color: var(--ink-mute);
  border-left: 3px solid var(--orange-mid);
  padding-left: .7rem;
}

/* ── Motion ────────────────────────────────────────────────────────────── */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22, .7, .25, 1);
}
.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media print {
  .js-reveal [data-reveal] { opacity: 1 !important; transform: none !important; }
  .site-header { position: static; }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-deep); color: var(--on-dark-soft);
  border-top: 4px solid var(--orange-mid);
  padding-block: 2.5rem;
  font-size: .9rem;
  margin-top: 1rem;
}
.site-footer img { height: 22px; width: auto; margin-bottom: 1.2rem; }
.site-footer a { color: var(--on-dark-soft); }
.site-footer a:hover { color: var(--orange-light); }
.site-footer p { margin: 0 0 .5rem; }
.site-footer .legal {
  margin-top: 1.5rem; padding-top: 1.2rem;
  border-top: 1px solid var(--rule-dark);
  color: var(--on-dark-mute); font-size: .82rem;
}
