/* ==========================================================================
   LayneH.github.io — one plain stylesheet (no Sass, no framework).

   Layout idea: every page is a two-column index card. The narrow left column
   holds the photo and the section labels; the right column holds the content.
   It collapses to one column on phones.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------- */
:root {
  /* One main color: a deep moss green (GreenMIM's green, muted). */
  --bg: #faf9f5;
  --surface: #ffffff;
  --text: #24261f;
  --heading: #121410;
  --muted: #5f6358;
  --faint: #8b8f84;
  --rule: #e4e2da;
  --rule-strong: #d0cdc3;
  --accent: #3d6b2c;
  --accent-hover: #2a4d1d;
  --on-accent: #ffffff;
  --accent-soft: rgba(61, 107, 44, 0.08);
  --accent-line: rgba(61, 107, 44, 0.32);
  --live: #3d6b2c;
  --thumb-bg: #ffffff;
  --bg-glass: rgba(250, 249, 245, 0.8);
  --nav-h: 3.6rem;
  --thumb-filter: none;
  --photo-filter: none;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --page-w: 62rem;
  --label-w: 10.5rem;
  --col-gap: clamp(1.75rem, 4vw, 3rem);
  --measure: 66ch;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #111412;
  --surface: #171b18;
  --text: #d8dcd4;
  --heading: #f1f3ee;
  --muted: #9ba196;
  --faint: #6e7469;
  --rule: #262b26;
  --rule-strong: #363c35;
  --accent: #a6cf8a;
  --accent-hover: #c4e3ad;
  --on-accent: #111412;
  --accent-soft: rgba(166, 207, 138, 0.1);
  --accent-line: rgba(166, 207, 138, 0.36);
  --live: #a6cf8a;
  --thumb-bg: #e9e9e6;
  --bg-glass: rgba(17, 20, 18, 0.8);
  --thumb-filter: brightness(0.9);
  --photo-filter: brightness(0.9);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111412;
    --surface: #171b18;
    --text: #d8dcd4;
    --heading: #f1f3ee;
    --muted: #9ba196;
    --faint: #6e7469;
    --rule: #262b26;
    --rule-strong: #363c35;
    --accent: #a6cf8a;
    --accent-hover: #c4e3ad;
    --on-accent: #111412;
    --accent-soft: rgba(166, 207, 138, 0.1);
    --accent-line: rgba(166, 207, 138, 0.36);
    --live: #a6cf8a;
    --thumb-bg: #e9e9e6;
    --bg-glass: rgba(17, 20, 18, 0.8);
    --thumb-filter: brightness(0.9);
    --photo-filter: brightness(0.9);
    color-scheme: dark;
  }
}

/* ---- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  overflow-x: clip;   /* the full-bleed intro background must not cause sideways scroll */
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv11" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; margin: 0; font-weight: 600; }
p { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 0.18em; }
strong { color: var(--heading); font-weight: 600; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--accent-soft); }

code, pre { font-family: var(--font-mono); font-size: 0.9em; }
code { background: var(--accent-soft); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem; overflow-x: auto; }
pre code { background: none; padding: 0; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10; padding: 0.5rem 0.9rem; background: var(--heading); color: var(--bg); }
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Page frame --------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--page-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* The two-column index-card row used by every section. */
.row {
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr);
  column-gap: var(--col-gap);
}

/* ---- Header ------------------------------------------------------------- */
/* Sticky and slim. The green line on top is a reading-progress bar: a faint
   hairline at rest that fills in as you scroll. Links are set in the mono layer. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
          backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.site-progress { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent-line); overflow: hidden; }
.site-progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--nav-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.01em;
}
.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 1.55rem; height: 1.55rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.76rem;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--heading); text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 1.9rem); }
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding-block: 0.35rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.25s ease;
}
.site-nav a:hover { color: var(--heading); text-decoration: none; }
.site-nav a:hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--heading); }
.site-nav a[aria-current="page"]::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--accent); }
/* Recruiting link: the one coloured item in the nav, with a small "live" dot. */
.site-nav a.nav-join { color: var(--accent); }
.site-nav a.nav-join:hover { color: var(--accent-hover); }
.site-nav a.nav-join[aria-current="page"]::before { display: none; }
.nav-join__dot { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 3px var(--accent-soft); }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2rem; height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--heading); background: var(--accent-soft); }
.theme-toggle svg { width: 1.05rem; height: 1.05rem; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* ---- Intro (homepage top) ----------------------------------------------- */
.intro {
  grid-template-areas:
    "photo head"
    "photo body";
  grid-template-rows: auto 1fr;
  row-gap: 1.25rem;
  padding-top: clamp(1.5rem, 5vw, 3.5rem);
}
.intro__photo {
  grid-area: photo;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--surface);
  filter: var(--photo-filter);
}
.intro__head { grid-area: head; }
@media (min-width: 761px) {
  .intro__photo { margin-top: 0.55rem; }   /* line the photo up with the name's cap height */
}
.intro__body { grid-area: body; }
.intro__name {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1;
}
.intro__role { margin-top: 0.6rem; color: var(--muted); font-size: 1.0625rem; line-height: 1.5; }
.intro__role strong { color: var(--text); font-weight: 500; }
.intro__role a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 0.18em; }
.intro__role a:hover { color: var(--accent); text-decoration-color: var(--accent-line); }

.intro__bio { max-width: var(--measure); font-size: 1.0625rem; line-height: 1.65; }
.intro__bio p + p { margin-top: 0.8rem; }
.intro__bio a { text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 0.18em; }

.service {
  margin-top: 0.9rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}
.service__k { margin-right: 0.6rem; color: var(--faint); }
.recruit {
  display: inline-block;
  max-width: 100%;
  margin-top: 1.1rem;
  padding: 0.45rem 0.9rem 0.45rem 0.8rem;
  border-radius: 8px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  font-size: 0.95rem;
}
.recruit a { margin-left: 0.2rem; white-space: nowrap; }
.recruit__dot {
  display: inline-block;
  width: 0.5rem; height: 0.5rem;
  margin-right: 0.55rem;
  vertical-align: 0.08em;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}
.profile-links a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); }
.profile-links a:hover { color: var(--accent); text-decoration: none; }
.profile-links svg { width: 1rem; height: 1rem; flex: none; }
@media (max-width: 560px) {
  /* Phones: an icon row; the names stay available to screen readers. */
  .profile-links { gap: 0.15rem; margin-top: 1rem; margin-left: -0.6rem; }
  .profile-links a { padding: 0.6rem; border-radius: 999px; }
  .profile-links a:hover { background: var(--accent-soft); }
  .profile-links svg { width: 1.2rem; height: 1.2rem; }
  .profile-links__label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* ---- Self-improvement field behind the intro (homepage) ----------------- */
/* Full-bleed, faint, and faded out under the text so the bio stays crisp. */
.intro { position: relative; isolation: isolate; }
.intro__bg {
  position: absolute;
  z-index: -1;
  top: -1.5rem;
  bottom: -2.5rem;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 62%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 62%, transparent 100%);
}
.intro__bg canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(ellipse 34% 48% at 55% 58%, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.28) 45%, #000 100%);
          mask-image: radial-gradient(ellipse 34% 48% at 55% 58%, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.28) 45%, #000 100%);
}
:root[data-theme="dark"] .intro__bg canvas { opacity: 0.42; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .intro__bg canvas { opacity: 0.42; } }
@media (max-width: 760px) {
  /* Phones: keep the field behind the photo and name only. */
  .intro__bg {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 22%, transparent 40%);
            mask-image: linear-gradient(to bottom, transparent 0%, #000 8%, #000 22%, transparent 40%);
  }
  .intro__bg canvas { opacity: 0.4; -webkit-mask-image: none; mask-image: none; }
}

/* ---- Sections ----------------------------------------------------------- */
.section {
  margin-top: clamp(2.75rem, 7vw, 4.25rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.section__label { margin-bottom: 1rem; }
.section__label h2,
.section__title {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.6;
}
.section__more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
  font-size: 0.875rem;
}
.section__more svg { width: 0.85em; height: 0.85em; }
.section__count {
  margin: 0.35rem 0 0.15rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.section__count [data-current] { color: var(--heading); }
@media (min-width: 761px) {
  .section__label { position: sticky; top: calc(var(--nav-h) + 1.25rem); align-self: start; margin-bottom: 0; }
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.6vw, 1.4rem);
  line-height: 1.4;
  color: var(--heading);
  max-width: 40ch;
}

/* ---- Research themes ---------------------------------------------------- */
.themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.theme { padding-top: 0.8rem; border-top: 1px solid var(--heading); }
.theme__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  letter-spacing: 0.04em;
}
.theme__title { font-size: 1.05rem; margin-top: 0.2rem; }
.theme__desc { margin-top: 0.35rem; color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }

/* ---- News --------------------------------------------------------------- */
.news { margin: 0; padding: 0; list-style: none; }
.news li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.45rem 0;
}
.news time {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 0.2rem;
}
.news a { text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 0.18em; }
.news-more summary {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--accent);
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
}
.news-more summary::-webkit-details-marker { display: none; }
.news-more summary:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.news-more[open] summary { display: none; }

/* ---- Publications ------------------------------------------------------- */
.pubs { display: grid; gap: 0; }
.pub {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}
.pub:first-child { padding-top: 0.25rem; border-top: 0; }
.pub:target { background: var(--accent-soft); box-shadow: 0 0 0 0.75rem var(--accent-soft); border-radius: 2px; }

.pub__media {
  position: relative;
  display: block;
  align-self: start;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--thumb-bg);
}
.pub__media img,
.pub__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--thumb-filter);
}
/* Entries without a teaser yet: a quiet venue/year card. */
.pub__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
}
.pub__placeholder span + span { font-family: var(--font-sans); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--muted); }
.pub__badge {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem; height: 1.35rem;
  border-radius: 50%;
  background: rgba(17, 18, 21, 0.72);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.pub__badge svg { width: 0.55rem; height: 0.55rem; margin-left: 0.1rem; }
.pub.is-playing .pub__badge { opacity: 0; }

.pub__venue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.pub__idx { margin-right: 0.35rem; color: var(--faint); }
.pub__award {
  padding: 0.05rem 0.4rem;
  border: 1px solid var(--accent-line);
  border-radius: 3px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pub__title { margin-top: 0.2rem; font-size: 1.0625rem; line-height: 1.35; letter-spacing: -0.005em; }
.pub__title a { color: var(--heading); }
.pub__title a:hover { color: var(--accent); text-decoration: none; }
.pub__authors { margin-top: 0.3rem; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.pub__authors strong { color: var(--heading); font-weight: 600; }
.pub__tagline { margin-top: 0.4rem; font-size: 0.9375rem; line-height: 1.5; }
.pub__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin-top: 0.55rem; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.01em; }
/* Key figures in the one-liners: mono, tabular, accent. */
.pub__tagline code {
  padding: 0;
  background: none;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
/* Hover: a precise outline on the teaser and an arrow on the title. */
.pub__media { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.pub:hover .pub__media { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pub__title a::after {
  content: "\2197";
  display: inline-block;
  margin-left: 0.3em;
  color: var(--accent);
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.pub:hover .pub__title a::after, .pub__title a:focus-visible::after { opacity: 1; transform: none; }

/* ---- Join --------------------------------------------------------------- */
.join-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem 2rem;
  padding: clamp(1.1rem, 3vw, 1.6rem) clamp(1.1rem, 3vw, 1.75rem);
  border-radius: 8px;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.join-banner__title { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 600; line-height: 1.3; color: var(--heading); }
.join-banner__text { margin-top: 0.35rem; max-width: 52ch; color: var(--muted); font-size: 0.9375rem; }
.join-banner__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow .recruit__dot { margin-right: 0; }
.join-more { margin-top: 1.25rem; }
.join-apply { font-size: 1.0625rem; }
.apply-list { margin: 0.5rem 0 0; padding-left: 1.3rem; font-size: 1.0625rem; }
.apply-list li + li { margin-top: 0.3rem; }
.apply-list li::marker { color: var(--accent); font-weight: 600; }
.join-apply__cta { margin-top: 1.4rem; }
.positions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 2rem;
  margin: 1.4rem 0 0;
}
.positions div { padding-top: 0.7rem; border-top: 1px solid var(--accent-line); }
.positions dt { font-weight: 600; color: var(--heading); }
.positions dd { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.positions a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 0.18em; }
.positions a:hover { color: var(--accent); text-decoration-color: var(--accent-line); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.9375rem;
  font-weight: 600;
}
.button:hover { color: var(--on-accent); background: var(--accent-hover); text-decoration: none; }
.button svg { width: 1rem; height: 1rem; }
.button--ghost { background: none; color: var(--heading); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.button--ghost:hover { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }

/* ---- Interior pages ----------------------------------------------------- */
.page-head { padding-top: clamp(1.5rem, 5vw, 3rem); }
.page-head h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-head__lead { margin-top: 0.6rem; color: var(--muted); max-width: var(--measure); }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }

.year .section__label h2 {
  color: var(--heading);
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  line-height: 1.2;
}

/* CV entries: a light date/role list. */
.cv ul { margin: 0; padding: 0; list-style: none; }
.cv > ul > li { padding: 0.65rem 0; border-top: 1px solid var(--rule); }
.cv > ul > li:first-child { padding-top: 0; border-top: 0; }
.cv ul ul { margin-top: 0.15rem; }
.cv ul ul li { color: var(--muted); font-size: 0.9375rem; }
.cv-pubs { margin: 0; padding-left: 1.6rem; }
.cv-pubs li { padding-left: 0.3rem; margin: 0 0 0.6rem; font-size: 0.9375rem; }
.cv-pubs li::marker { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.cv-pubs em { color: var(--muted); }

/* Blog index */
.post-list { margin: 0; padding: 0; list-style: none; }
.post-list li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; padding: 0.6rem 0; }
.post-list time { color: var(--faint); font-family: var(--font-mono); font-size: 0.8rem; font-variant-numeric: tabular-nums; padding-top: 0.1rem; }
.post-list h2 { font-size: 1.0625rem; }
.post-list h2 a { color: var(--heading); }
.post-list h2 a:hover { color: var(--accent); text-decoration: none; }
.post-list p { margin-top: 0.2rem; color: var(--muted); font-size: 0.9375rem; }

/* Long-form prose: posts, privacy, sitemap. */
.prose { max-width: var(--measure); font-size: 1.0625rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 2.2rem; font-size: 1.35rem; }
.prose h3 { margin-top: 1.8rem; font-size: 1.125rem; }
.prose a { text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 0.18em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.3rem; }
.prose blockquote { margin-inline: 0; padding-left: 1rem; border-left: 2px solid var(--rule-strong); color: var(--muted); }
.prose img { border-radius: 4px; }
.post-meta { margin-top: 0.6rem; color: var(--faint); font-size: 0.9375rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 2.5rem; font-size: 0.9375rem; }
.back-link svg { width: 0.9em; height: 0.9em; transform: rotate(180deg); }

.error-page { padding-block: clamp(3rem, 12vw, 7rem); text-align: center; }
.error-page h1 { font-family: var(--font-serif); font-size: clamp(3rem, 12vw, 5rem); }
.error-page p { margin-top: 0.75rem; color: var(--muted); }
.error-page .button { margin-top: 1.5rem; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { margin-top: clamp(3.5rem, 9vw, 6rem); border-top: 1px solid var(--rule); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.6rem 2.2rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .themes { grid-template-columns: 1fr; gap: 1.1rem; }
  .theme { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); column-gap: 0.75rem; }
  .theme__num { grid-row: span 2; padding-top: 0.15rem; }
  .theme__title { margin-top: 0; }
}

@media (max-width: 760px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .intro {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    grid-template-areas:
      "photo head"
      "body  body";
    column-gap: 1.1rem;
    align-items: center;
  }
  .intro__photo { aspect-ratio: 1; object-position: 50% 20%; border-radius: 50%; }
  .intro__role { margin-top: 0.4rem; font-size: 0.9375rem; }
  .section__label { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
  .section__count { display: none; }
  .section__more { margin-top: 0; }
  .positions { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .pub { grid-template-columns: 7.25rem minmax(0, 1fr); gap: 0.9rem; }
  /* Homepage on phones: a feed — full-width teaser above each entry. */
  .pubs--featured .pub { grid-template-columns: minmax(0, 1fr); gap: 0.85rem; padding: 1.5rem 0; }
  .pubs--featured .pub:first-child { padding-top: 0.25rem; }
  .pub__title { font-size: 1rem; }
  .pub__authors, .pub__tagline { font-size: 0.875rem; }
  .news li, .post-list li { grid-template-columns: 1fr; gap: 0; }
  :root { --nav-h: 3.25rem; }
  .site-nav { gap: 0.85rem; }
  .site-nav a { font-size: 0.68rem; letter-spacing: 0.05em; }
  .site-nav a[aria-current="page"]::before { display: none; }
  .brand__name { display: none; }
}

@media print {
  .site-header, .site-footer, .theme-toggle, .pub__badge { display: none !important; }
  .section__label { position: static; }
  body { background: #fff; color: #000; }
}
