/* ==========================================================================
   corneliaschneider.github.io — shared stylesheet

   Palette and page architecture follow the design you liked (paper ground,
   burgundy accent, full-bleed images); the type scale and the section
   structure are the tighter ones from the first draft.

   All colours are variables in :root — change them here and the whole site
   follows.
   ========================================================================== */

:root {
  --paper:       #F7F6F2;   /* page ground                                  */
  --paper-deep:  #EEECE6;   /* alternating band                             */
  --surface:     #FFFFFF;   /* cards, tables                                */
  --ink:         #202429;   /* body text, dark footer ground                */
  --muted:       #626970;   /* secondary text, dates                        */
  --line:        #D9D8D2;   /* hairlines, borders                           */
  --accent:      #8B3038;   /* burgundy: kickers, rules, buttons            */
  --accent-dark: #682129;   /* links, hover                                 */
  --accent-soft: #F2E7E8;   /* tinted fills                                 */

  --shadow:   0 16px 44px rgba(31, 36, 41, .08);
  --shadow-s: 0 10px 28px rgba(31, 36, 41, .05);
  --radius: 14px;
  --content: 1120px;
  --measure: 68ch;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans:  Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(31, 36, 41, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 36, 41, .022) 1px, transparent 1px);
  background-size: 44px 44px;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.64;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { color: var(--accent); }

/* ---------- type scale (deliberately restrained) ---------- */

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.012em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 2.1vw, 1.95rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p  { margin: 0 0 1.05em; }

.lead     { font-size: 1.06rem; color: var(--muted); max-width: var(--measure); }
.big-copy { font-family: var(--serif); font-size: clamp(1.1rem, 1.5vw, 1.28rem); line-height: 1.55; }
.muted    { color: var(--muted); }
.small    { font-size: .88rem; }

.kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.rule { width: 46px; height: 3px; background: var(--accent); margin: 14px 0 20px; }

/* The site has one heading system: burgundy small caps.
   .xl = page title, .lg = section heading, plain = small label. */
.kicker.lg { font-size: 1.02rem; letter-spacing: .12em; margin-bottom: 4px; }
.kicker.xl { font-size: clamp(1.25rem, 1.8vw, 1.5rem); letter-spacing: .11em; margin-bottom: 4px; }

/* ---------- layout ---------- */

.container { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }

.section { padding-block: 68px; }
.section.compact { padding-block: 46px; }
.section.band { background: rgba(255,255,255,.7); border-block: 1px solid var(--line); }

.section > .container > p { max-width: var(--measure); }
.section-head { margin-bottom: 30px; }
.section-head p { max-width: var(--measure); margin: 0; color: var(--muted); }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; background: #fff; padding: 10px 16px; }
.skip-link:focus { top: 12px; }

/* ---------- header / navigation ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  border-bottom: 1px solid rgba(217, 216, 210, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
}
.nav-wrap { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav a { position: relative; color: #34383D; font-size: .92rem; text-decoration: none; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -7px;
  height: 2px; background: var(--accent); transition: right .2s ease;
}
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font: inherit; font-size: .88rem; }

/* ---------- hero (About page) ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  /* the hero keeps the photograph's own proportions, so the whole head and a
     little of the blouse stay in frame at every width */
  aspect-ratio: 2.75;
  min-height: 430px;
  max-height: 700px;
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(20,22,26,.92) 0%, rgba(20,22,26,.80) 30%, rgba(20,22,26,.30) 56%, rgba(20,22,26,0) 74%),
    url("hero-portrait.jpg");
  background-size: cover;
  background-position: 50% top;
  overflow: hidden;
}
.hero-content { position: relative; z-index: 2; width: min(600px, 56%); padding-block: 72px; }
.hero .eyebrow {
  margin-bottom: 14px;
  font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.82);
}
.hero h1 { margin-bottom: 12px; color: #fff; }
.hero .lead { max-width: 520px; color: rgba(255,255,255,.9); font-size: 1.04rem; line-height: 1.55; }

.button-row { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 9px 19px;
  border: 1px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: .93rem; font-weight: 600; text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.button:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.button.ghost { border-color: rgba(255,255,255,.7); background: rgba(20,22,26,.2); }
.button.ghost:hover { background: #fff; color: var(--ink); }
.button.light { border-color: var(--line); background: #fff; color: var(--accent-dark); }
.button.light:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- page hero (subpages) ---------- */

.page-hero {
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(242,231,232,.7));
}
.page-hero p { max-width: var(--measure); margin-bottom: .9em; color: var(--muted); font-size: 1.04rem; }
.page-hero p:last-child { margin-bottom: 0; }
.page-hero .page-sub {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
  font-weight: 700;
  color: var(--ink);
}
.page-hero .rule { margin: 14px 0 18px; }

/* a single distinguished line in a page header (the teaching award) */
.award-line {
  display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px;
  margin: 0 0 18px;
  padding: 8px 18px;
  border: 1px solid #E2CBCD; border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: .94rem;
  max-width: none;
}
.award-line .award-year { font-weight: 700; }

/* jump links to the sections of a long page */
.jumprow { margin-top: 20px; }
.jumprow a { font-weight: 600; }

/* a section that can be folded away */
.disclosure > summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 2px 0;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::after {
  content: ""; flex: none;
  width: 8px; height: 8px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}
.disclosure[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.disclosure > summary .kicker { margin-bottom: 0; }
.disclosure > summary:hover .kicker { color: var(--accent-dark); }
.disclosure > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.disclosure[open] .entries { margin-top: 14px; }

/* anchors should clear the sticky header */
[id] { scroll-margin-top: 84px; }

/* section headings inside a page */
.section h2.kicker { margin-top: 0; }
.section > .container > section + section > h2.kicker,
.section .container > section h2.kicker { margin-top: 0; }
.section .container > section { margin-bottom: 40px; }

/* a section that should stand out from the plain lists around it */
.highlight-block {
  padding: 24px 28px 26px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-s);
}
.highlight-block .entry:first-of-type { border-top: 0; }
.section .container > section:last-child { margin-bottom: 0; }

/* ---------- intro grid + fact card ---------- */

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: 52px;
  align-items: start;
}
.intro-grid > div p { max-width: var(--measure); }

.fact-card {
  padding: 24px 26px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-s);
}
.fact-card h2, .fact-card h3 {
  margin: 0 0 4px;
  font-family: var(--sans);
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.fact-list { margin: 0; }
.fact-list div { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.fact-list dt { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding-top: 2px; }
.fact-list dd { margin: 0; font-size: .92rem; }

.text-link { font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- theme cards (research) ---------- */

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 20px 24px 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  color: inherit; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-s); border-color: #DCC7C9; }
a.card:hover h3 { color: var(--accent-dark); }
.card h3 { margin-bottom: .35em; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.card-label {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-bottom: 10px;
  border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  font-family: var(--serif); font-size: .88rem; font-weight: 700;
}
.card-more {
  display: block; margin-top: auto; padding-top: 14px;
  color: var(--accent); font-size: .82rem; font-weight: 600;
  letter-spacing: .04em;
}
a.card:hover .card-more { color: var(--accent-dark); }

/* ---------- research projects ---------- */

.project {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 4px 24px;
  margin-bottom: 20px;
  padding: 26px 30px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-s);
}
.project:last-child { margin-bottom: 0; }
.project-letter {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  font-family: var(--serif); font-size: 1.5rem; font-weight: 700;
}
.project.has-figure { grid-template-columns: 84px minmax(0, 1fr) 250px; }
.project-figure {
  align-self: start;
  margin: 8px 0 0;
}
.project-figure img {
  display: block; width: 100%; height: auto;
  padding: 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff;
}
.project-figure figcaption {
  margin-top: 8px;
  color: var(--muted); font-size: .78rem; line-height: 1.45;
}
.project h3 { margin: 6px 0 .6em; font-size: 1.2rem; }
.project p { max-width: var(--measure); }
.project p:last-child { margin-bottom: 0; }
.project .collab { margin-top: 1.2em; color: var(--muted); font-size: .92rem; font-style: italic; }
.project:target { border-color: #DCC7C9; box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-s); }
.project:target .project-letter { background: var(--accent); color: #fff; }
.after-projects { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 24px 0 0; }
.after-projects .back-link { color: var(--muted); }

/* ---------- plain full-bleed photograph (CV page) ---------- */

.photo-band { margin: 0; border-top: 1px solid var(--line); }
.photo-band-img {
  aspect-ratio: 2;
  background-image: url("beach.jpg");
  background-size: cover;
  background-position: 50% 50%;
}
.photo-band figcaption {
  padding-block: 14px 26px;
  color: var(--muted); font-size: .85rem;
}

/* language marker for courses taught in German */
.lang { color: var(--muted); font-size: .85rem; font-weight: 400; white-space: nowrap; }

/* small link to a course announcement PDF */
.doc-tag {
  display: inline-block; margin-left: 8px; padding: 1px 9px;
  border: 1px solid #E2CBCD; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: .74rem; font-weight: 600; text-decoration: none;
  vertical-align: 1px; white-space: nowrap;
}
.doc-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- full-bleed image band ---------- */

.image-band {
  position: relative;
  display: grid; align-items: center;
  min-height: 460px;
  color: #fff;
  background: center/cover no-repeat;
  overflow: hidden;
}
.image-band::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16,18,20,.94), rgba(16,18,20,.74) 46%, rgba(16,18,20,.30));
}
.image-band .container { position: relative; z-index: 1; }
.image-band .band-copy { max-width: 620px; padding-block: 46px; }
.image-band .band-label {
  margin-bottom: 10px;
  color: rgba(255,255,255,.72);
  font-size: .72rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
}
.image-band .band-title {
  margin: 0 0 16px;
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
}
.image-band .band-list { margin: 0; padding: 0; list-style: none; }
.image-band .band-list li {
  position: relative;
  margin-bottom: 11px;
  padding-left: 20px;
  color: rgba(255,255,255,.92);
  font-size: .98rem;
  line-height: 1.5;
}
.image-band .band-list li:last-child { margin-bottom: 0; }
.image-band .band-list li::before {
  content: ""; position: absolute; left: 0; top: .6em;
  width: 6px; height: 6px; border-radius: 50%; background: #E4A0A6;
}
.image-band .band-list strong { color: #fff; font-weight: 700; }
.image-band a { color: #fff; text-decoration-color: rgba(255,255,255,.55); }
.image-band a:hover { color: #fff; text-decoration-color: #fff; }
.image-band p:last-child { margin-bottom: 0; }
.image-band h2 { color: #fff; }
.image-band p { color: rgba(255,255,255,.88); max-width: var(--measure); }

/* ---------- entry lists (CV-style: when + what) ---------- */

.entries { margin: 0; }
.entry {
  display: grid; grid-template-columns: 116px 1fr; gap: 4px 20px;
  padding: 11px 0; border-top: 1px solid var(--line);
}
.entry:first-of-type { border-top: 0; }
.entry .when { color: var(--accent-dark); font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 3px; }
.entry .what { margin: 0; }
.entry .what strong { font-weight: 600; }
.entry .note { display: block; color: var(--muted); font-size: .9rem; }

/* ---------- career timeline ---------- */

.timeline {
  margin: 22px 0 0 6px; padding-left: 30px;
  border-left: 2px solid var(--line);
}
.timeline-item { position: relative; margin-bottom: 26px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -38px; top: 6px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--accent);
}
.timeline-item .date {
  color: var(--accent); font-size: .74rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
.timeline-item h3 { margin: 3px 0 4px; font-size: 1.02rem; }
.timeline-item p { margin: 0; max-width: var(--measure); color: var(--muted); font-size: .93rem; }

/* countries at a glance, above the collaborator list */
.chiprow {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px;
  padding: 0; margin: 0 0 26px;
}
.chiprow li {
  padding: 4px 14px;
  border: 1px solid #E2CBCD; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: .87rem; font-weight: 600;
}

/* collaborators, grouped by place */
.network-list .when { color: var(--accent-dark); font-weight: 700; }
.network-list .what { font-size: .98rem; }

/* ---------- the book, with its cover ---------- */

.book-feature {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px;
  align-items: start;
  padding: 26px 30px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-s);
}
.book-cover {
  width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 3px;
  box-shadow: 0 10px 26px rgba(31,36,41,.14);
}
.book-feature h3 { margin: 2px 0 .2em; font-size: 1.3rem; }
.book-feature .book-sub {
  margin-bottom: .9em;
  font-family: var(--serif); font-size: 1.05rem; font-style: italic; color: var(--ink);
}
.book-feature p { max-width: var(--measure); color: var(--muted); }
.book-feature .book-links { margin-bottom: 0; }

/* ---------- publication list ---------- */

.pubs { list-style: none; margin: 0; padding: 0; }
.pub {
  display: grid; grid-template-columns: 48px 1fr; gap: 18px;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.pub:first-child { border-top: 0; }

/* the running number as a burgundy badge */
.pub .num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 9px;
  border: 1px solid #E2CBCD; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums;
}

.pub .title { display: block; font-weight: 600; }
.pub .with  { display: block; margin-top: 3px; color: var(--muted); font-size: .92rem; }
.pub .where { display: block; margin-top: 2px; color: var(--muted); font-size: .92rem; font-style: italic; }
.pub .where a { font-style: normal; }

/* ---------- contact + misc ---------- */

.facts { width: 100%; border-collapse: collapse; margin: 0 0 1em; }
.facts th { width: 1%; white-space: nowrap; text-align: left; font-weight: 400; color: var(--muted); font-size: .9rem; padding: 5px 18px 5px 0; vertical-align: top; }
.facts td { padding: 5px 0; vertical-align: top; }

.linkrow { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 0; margin: 0 0 1em; }
/* jump links sit clear of the text or title block above them */
.linkrow.jumprow { margin: 22px 0 0; }
.page-hero .hero-row + .jumprow { margin-top: 34px; }
.linkrow a {
  display: inline-block; padding: 4px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--ink); font-size: .87rem; text-decoration: none;
}
.linkrow a:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }

.downloads { display: flex; flex-wrap: wrap; gap: 11px; margin: 0 0 1.1em; }
.hero-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px 32px;
}
.hero-row .rule { margin-bottom: 0; }

.callout {
  max-width: 840px;
  padding: 20px 24px;
  border: 1px solid #ECDCDD; border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.callout h3 { margin: 0 0 .45em; font-size: 1.05rem; }
.callout p { max-width: var(--measure); }
.callout p:last-child { margin-bottom: 0; }

figure { margin: 0 0 1.3em; }
figure img, figure svg { width: 100%; height: auto; }
figure img { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
figcaption { margin-top: 8px; color: var(--muted); font-size: .86rem; }

.diagram-card {
  margin: 28px 0 0;
  padding: 24px 26px 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-s);
}
.diagram-card img { border: 0; border-radius: 0; }
.diagram-card figcaption { max-width: var(--measure); }

/* the research diagram brings its own background, so it needs no card */
.research-figure { margin: 26px 0 0; }
.research-figure.top { margin-top: 0; }
.research-figure img { border: 0; border-radius: var(--radius); }
.research-figure figcaption { max-width: var(--measure); }

/* The research diagram stays legible on phones by scrolling sideways
   instead of shrinking below a readable size. */
.scroll-x { overflow-x: auto; }
.scroll-x img, .scroll-x svg { min-width: 700px; }
/* the hint only makes sense where the diagram really overflows */
.scroll-hint { display: none; }

/* ---------- footer ---------- */

.site-footer { padding: 40px 0; border-top: 1px solid var(--line); background: var(--ink); color: rgba(255,255,255,.74); font-size: .9rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-inner { display: flex; justify-content: space-between; align-items: start; gap: 28px; flex-wrap: wrap; }
.footer-inner p { margin: 0 0 .35em; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 62px; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px 20px 18px; border-bottom: 1px solid var(--line); background: #fff;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 2px; }
  .site-nav a::after { display: none; }
  .hero { background-position: 68% center; }
  .hero-content { width: 68%; }
  .intro-grid { grid-template-columns: 1fr; gap: 34px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .project.has-figure { grid-template-columns: 84px minmax(0, 1fr); }
  .project-figure { grid-column: 2; max-width: 360px; margin-top: 18px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .container { width: min(calc(100% - 32px), var(--content)); }
  /* On phones the hero stops behaving like a wide banner: the portrait sits
     at the top in its own fixed area, the text below it on the dark ground.
     aspect-ratio and max-height from the desktop rule must both be undone,
     otherwise the hero collapses to a 140 px strip and clips its content. */
  .hero {
    aspect-ratio: auto;
    min-height: 0;
    max-height: none;
    display: block;
    /* exactly the colour the portrait gradient ends in, so there is no seam */
    background: rgb(19,21,24);
  }
  .hero::before {
    content: "";
    display: block;
    aspect-ratio: 0.82;
    background-image:
      linear-gradient(0deg, rgba(19,21,24,1) 0%, rgba(19,21,24,.86) 14%, rgba(19,21,24,.12) 42%, rgba(19,21,24,0) 70%),
      url("hero-portrait-narrow.jpg");
    background-size: cover;
    background-position: 50% top;
  }
  .hero-content { width: 100%; padding: 0 0 40px; margin-top: -54px; }
  .hero h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .hero .lead { font-size: 1rem; }
  .button-row { margin-top: 22px; }
  .button-row .button { flex: 1 1 auto; justify-content: center; }
  .hero .lead { max-width: none; }
  .section { padding-block: 48px; }
  .card-grid { grid-template-columns: 1fr; }
  .project, .project.has-figure { grid-template-columns: 1fr; padding: 22px; gap: 10px; }
  .project-figure { grid-column: 1; max-width: 320px; margin-top: 4px; }
  .book-feature { grid-template-columns: 1fr; gap: 20px; padding: 22px; }
  .book-cover { max-width: 160px; }
  .project-letter { width: 44px; height: 44px; font-size: 1.2rem; }
  .project h3 { margin-top: 0; }
  .entry, .pub { grid-template-columns: 1fr; gap: 2px; }
  .entry .when, .pub .num { font-size: .82rem; }
  .image-band { min-height: 0; }
  .image-band .band-copy { padding-block: 40px; }
  .callout { padding: 22px; }
  .highlight-block { padding: 20px 18px 22px; }
  .photo-band-img { aspect-ratio: 1.2; background-image: url("beach-narrow.jpg"); }
  .scroll-hint { display: block; margin-top: 4px; font-style: italic; }
  .footer-inner { display: block; }
  .footer-links { margin-top: 16px; }
}

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

@media print {
  .site-header, .site-footer, .downloads, .button-row { display: none; }
  body { background: #fff; font-size: 11pt; }
  a { color: inherit; }
}
