/* ==========================================================================
   seanandrewchen.com
   The look follows the ACSP and APPAM 2026 decks: IBM Plex Sans + Mono, ink
   on white, duotoned street photography, small uppercase mono labels, and
   three accents (crimson, mustard, teal). Mustard is only for big type,
   rules, and fills; it is too light for small text on white.
   ========================================================================== */

/* ---- Fonts (IBM Plex, SIL Open Font License) ---------------------------- */

@font-face { font-family: "Plex Sans"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexSans-Light.ttf") format("truetype"); }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexSans-Regular.ttf") format("truetype"); }
@font-face { font-family: "Plex Sans"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("../fonts/IBMPlexSans-Italic.ttf") format("truetype"); }
@font-face { font-family: "Plex Sans"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexSans-Bold.ttf") format("truetype"); }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexMono-Regular.ttf") format("truetype"); }
@font-face { font-family: "Plex Mono"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/IBMPlexMono-Bold.ttf") format("truetype"); }

/* ---- Tokens (the decks' colors) ----------------------------------------- */

:root {
  --ink: #111111;
  --muted: #6b6b6b;
  --hairline: #d6d4cf;
  --wash: #f3f2ee;
  --paper: #ffffff;
  --crimson: #c51b3a;
  --mustard: #ce8a00;
  --teal: #246a78;

  --sans: "Plex Sans", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 90rem;
  --stripe: 4px;
}

.accent-crimson { --accent: var(--crimson); }
.accent-mustard { --accent: var(--mustard); }
.accent-teal    { --accent: var(--teal); }
.accent-ink     { --accent: var(--ink); }

/* ---- Base --------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--crimson); }
:focus-visible { outline: 3px solid var(--crimson); outline-offset: 3px; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
  hyphens: none;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip { position: absolute; left: -999px; top: 1rem; z-index: 20; }
.skip:focus { left: 1rem; background: var(--paper); padding: 0.5rem 1rem; }

/* ---- Labels: the decks' small uppercase mono ---------------------------- */

.kicker {
  margin: 0 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--crimson);
}
.kicker--ink { color: var(--ink); }
.kicker--light { color: #fff; }

/* ---- Masthead ----------------------------------------------------------- */

.masthead {
  position: relative;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  min-height: 4.25rem;
  padding-block: 0.9rem;
}
.masthead__name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  word-spacing: -0.22em;
  text-decoration: none;
}
.masthead__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem clamp(1.1rem, 3vw, 2.5rem);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.masthead__nav a {
  padding-block: 0.3rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.masthead__nav a:hover { color: inherit; border-bottom-color: currentColor; }
.masthead__nav a[aria-current="page"] { border-bottom-color: var(--crimson); }

/* On the home page the masthead floats over the photo. */
.masthead--over {
  position: absolute;
  inset: var(--stripe) 0 auto 0;
  background: transparent;
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.28);
}
.masthead--over a:hover { color: #fff; }

/* ---- Hero: full-bleed photo with huge type (home + research) ------------ */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(94vh, 880px);
  overflow: hidden;
  color: #fff;
  background: var(--ink);
}
.hero--page { min-height: min(72vh, 680px); }

.hero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(17, 17, 17, 0.55) 0%,
    rgba(17, 17, 17, 0.12) 30%,
    rgba(17, 17, 17, 0.30) 58%,
    rgba(17, 17, 17, 0.90) 100%);
}

.hero__body {
  padding-top: 9rem;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  padding-right: calc(var(--gutter) + 1.5rem); /* room for the vertical credit */
}
.hero__title {
  margin-bottom: 1.25rem;
  font-size: clamp(3.5rem, 11.5vw, 10.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.hero__title--page { font-size: clamp(3rem, 9vw, 8rem); }
.hero__light { font-weight: 300; color: rgba(255, 255, 255, 0.7); }
.hero__sub {
  max-width: 42ch;
  margin: 0;
  font-weight: 300;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  line-height: 1.3;
}
.hero__chrome {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  padding-block: 1rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Landing page: one screen, like the deck cover ---------------------- */

.landing::before { display: none; }

.cover {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
}
.cover__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* fade the map out behind the name and links so the type stays crisp */
  background: linear-gradient(20deg,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(255, 255, 255, 0.85) 30%,
    rgba(255, 255, 255, 0) 65%);
}
.cover__body {
  padding-block: 3rem clamp(3rem, 10vh, 6.5rem);
  padding-right: calc(var(--gutter) + 1.5rem); /* room for the vertical credit */
}
.cover__name {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 6.4vw, 6.25rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  word-spacing: -0.22em; /* mono spaces are a full letter wide */
}
.cover__who {
  margin: 1.5rem 0 0;
  font-weight: 300;
  font-size: clamp(1.1rem, 1.9vw, 1.5rem);
  line-height: 1.35;
}
.cover__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.25rem;
  margin: 2.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cover__links a {
  padding-bottom: 0.2rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--ink);
}
.cover__links a:hover { color: var(--crimson); border-bottom-color: var(--crimson); }

/* ---- Photo credits ------------------------------------------------------ */

.credit {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.credit a { text-decoration: none; }
.credit a:hover { color: inherit; text-decoration: underline; }

.credit--vertical {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  z-index: 1;
  color: rgba(255, 255, 255, 0.72);
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  white-space: nowrap;
}
.credit--overlay {
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.5rem;
  z-index: 2;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}

/* ---- Plain page header (projects, teaching, CV) ------------------------- */

.pagehead { border-bottom: 1px solid var(--ink); }
.pagehead__inner { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2.25rem, 5vw, 3.5rem); }
.pagehead__title {
  font-size: clamp(3.5rem, 11vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.pagehead__sub {
  max-width: 44ch;
  margin: 1.25rem 0 0;
  font-weight: 300;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  line-height: 1.3;
  color: var(--muted);
}
.pagehead .buttons { margin-top: 2rem; }

/* ---- Sections ----------------------------------------------------------- */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-top: clamp(2rem, 4vw, 3rem); }
.section--rule { border-top: 1px solid var(--ink); }
.section--wash { background: var(--wash); }

.section__head { max-width: 62rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__title {
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.section__sub {
  max-width: 46ch;
  margin: 0.9rem 0 0;
  font-weight: 300;
  font-size: clamp(1.1rem, 1.9vw, 1.45rem);
  line-height: 1.3;
  color: var(--muted);
}

.lede {
  max-width: 36ch;
  font-size: clamp(1.25rem, 2.3vw, 1.65rem);
  line-height: 1.38;
  letter-spacing: -0.01em;
}

.more {
  margin: 1.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.more a { text-decoration: none; padding-bottom: 0.2rem; border-bottom: 2px solid var(--crimson); }

/* Label on the left, content on the right (research lists, CV). */
.split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 1.25rem var(--gutter);
}
.split + .split { margin-top: clamp(3rem, 6vw, 4.5rem); }
.split__label { align-self: start; position: sticky; top: 1.5rem; }
.split__title {
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.split__meta {
  margin: 0.6rem 0 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.note { margin: 0; max-width: 70ch; font-size: 0.95rem; color: var(--muted); }
.project__link {
  margin: 0.25rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- TO WRITE placeholders (see content.py) ----------------------------- */

.towrite {
  display: block;
  margin: 0.25rem 0;
  padding: 0.9rem 1rem;
  border: 1.5px dashed var(--crimson);
  background: rgba(197, 27, 58, 0.05);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.6;
  letter-spacing: 0;
  text-transform: none;
}
.towrite__label {
  display: inline-block;
  margin-right: 0.6rem;
  padding: 0.05rem 0.4rem;
  background: var(--crimson);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Buttons ------------------------------------------------------------ */

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.button {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.1rem;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.button:hover { background: var(--ink); color: var(--paper); }
.button--solid { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.button--solid:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---- Home: about ---------------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.facts {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 0.7rem 1.5rem;
  margin: 2.25rem 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}
.facts--flush { margin: 0; padding-top: 0; border-top: 0; }
.facts dt {
  padding-top: 0.2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.facts dd { margin: 0; }

/* ---- Tile grids: thin black lines between tiles ------------------------- */

.grid {
  display: grid;
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
}
.tile__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink);
}
.tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tile:hover .tile__media img { transform: scale(1.04); }

.tile__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem 1.25rem 1.4rem;
  border-top: 6px solid var(--accent, var(--ink));
}
.tile__num {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.tile__title { font-size: 1.45rem; line-height: 1.08; }
.tile__link { text-decoration: none; }
.tile__link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole tile clicks */
.tile:hover .tile__link { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.tile__sub { margin: 0; color: var(--muted); font-size: 0.98rem; line-height: 1.38; }
.tile__meta {
  margin: auto 0 0;
  padding-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Home: links to the other pages. */
.index {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 12rem;
  padding: 1.5rem 1.4rem 1.6rem;
  background: var(--paper);
  text-decoration: none;
  transition: background-color 0.15s;
}
.index:hover { color: inherit; background: var(--ink); color: #fff; }
.index__title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}
.index__arrow { transition: transform 0.2s; }
.index:hover .index__arrow { transform: translateX(6px); }
.index__text {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--muted);
}
.index:hover .index__text { color: rgba(255, 255, 255, 0.72); }

/* ---- Research: one row per paper ---------------------------------------- */

.paper {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2.25rem, 4.5vw, 3.5rem);
  border-top: 1px solid var(--ink);
  scroll-margin-top: 1rem;
}
/* Dissertation page top: title in the landing page's mono, overview beside it. */
.disshead {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.5rem var(--gutter);
  align-items: start;
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.disshead__title {
  font-family: var(--mono);
  font-size: clamp(2.2rem, 4.4vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  word-spacing: -0.22em;
}
.disshead__sub {
  max-width: 32ch;
  margin: 1rem 0 0;
  font-weight: 300;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.35;
  color: var(--muted);
}
.disshead__summary { padding-top: 0.4rem; }
.paper__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink);
}
.paper__media img { width: 100%; height: 100%; object-fit: cover; }
.paper__num {
  margin: 0 0 1rem;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.paper__title { font-size: clamp(1.8rem, 3.3vw, 2.75rem); line-height: 1; letter-spacing: -0.03em; }
.paper__sub {
  max-width: 40ch;
  margin: 0.7rem 0 1.4rem;
  font-weight: 300;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.3;
  color: var(--muted);
}
.paper__summary { max-width: 60ch; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
}
.chip {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.chip--solid { background: var(--ink); color: #fff; }

/* Labeled rows (publications, talks, teaching lists). */
.rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.rows > li {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
}
.rows--plain > li { grid-template-columns: minmax(0, 1fr); }
.rows__when {
  padding-top: 0.25rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
}
.rows__title { margin: 0; font-weight: 700; line-height: 1.3; }
.rows__meta { margin: 0.2rem 0 0; color: var(--muted); }

/* ---- Projects: pattern panels instead of photos ------------------------- */

.project .tile__body { border-top: 0; padding: 1.5rem 1.5rem 1.75rem; }
.project__title { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.05; letter-spacing: -0.025em; }
.project__role { margin: 0; font-style: italic; color: var(--muted); }
.project__line { max-width: 62ch; }

.art {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  background-color: var(--paper);
}
.art__num {
  position: absolute;
  left: 1.25rem;
  bottom: 1rem;
  padding: 0.12em 0.2em 0;
  background: var(--paper);
  font-family: var(--mono);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 0.9;
}
.art--waves { background-image: repeating-radial-gradient(circle at 0% 100%, transparent 0 13px, var(--accent) 13px 15px); }
.art--dots  { background-image: radial-gradient(circle, var(--accent) 0 3px, transparent 3.5px); background-size: 20px 20px; }
.art--lines { background-image: repeating-linear-gradient(-45deg, var(--accent) 0 2px, transparent 2px 14px); }
.art--grid  {
  background-image:
    linear-gradient(var(--accent) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--accent) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
}

/* The first project spans the full width, pattern left, text right. */
.project--feature { grid-column: 1 / -1; }

/* ---- Teaching ----------------------------------------------------------- */

.course .tile__body { padding: 1.5rem 1.5rem 1.75rem; }
.course__title { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1; letter-spacing: -0.03em; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}
.stat { padding: 1.5rem 1.25rem 1.6rem; background: var(--paper); border-top: 6px solid var(--accent); }
.stat p { margin: 0; }
.stat__num {
  font-size: clamp(3rem, 6.5vw, 5.25rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--accent);
}
.stat__of { font-size: 1.1rem; font-weight: 300; letter-spacing: 0; color: var(--muted); }
.stat__label { margin-top: 1rem !important; font-weight: 700; line-height: 1.25; }
.stat__role { color: var(--muted); }
.stat__mean {
  margin-top: 0.75rem !important;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- CV ----------------------------------------------------------------- */

.entry { padding: 0 0 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--hairline); }
.entry:last-child { margin-bottom: 0; }
.entry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 1.5rem;
}
.entry__title { font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.25; }
.entry__parttitle { font-size: 1rem; letter-spacing: 0; line-height: 1.3; }
.entry__when {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.entry__sub { margin: 0.15rem 0 0; font-style: italic; color: var(--muted); }
.entry__lines { margin: 0.5rem 0 0; padding-left: 1.1rem; list-style: square; }
.entry__lines li { margin: 0.25rem 0; }
.entry__lines li::marker, .cites li::marker { color: var(--muted); }
.entry__part { margin-top: 1rem; padding-left: 1rem; border-left: 2px solid var(--hairline); }

.cites { margin: 0; padding-left: 1.1rem; list-style: square; }
.cites li { margin: 0 0 0.7rem; }
.cv__note { margin-top: 1rem; font-size: 0.95rem; color: var(--muted); }

/* ---- Footer ------------------------------------------------------------- */

.footer { border-top: 1px solid var(--ink); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.75rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--crimson); }

/* ---- Home: one line of links, and the papers as a numbered list -------- */

.linkline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin: 2.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.linkline a { padding-bottom: 0.2rem; text-decoration: none; border-bottom: 1.5px solid var(--ink); }
.linkline a:hover { border-bottom-color: var(--crimson); }

.papers {
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
.papers a {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 0.3rem 2rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
}
.papers__num {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--crimson);
}
.papers__title {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.papers__sub { color: var(--muted); line-height: 1.4; }
.papers a:hover .papers__title { color: var(--crimson); }

/* ---- Wide screens ------------------------------------------------------- */

@media (min-width: 900px) {
  .project--feature { flex-direction: row; }
  .project--feature .art {
    flex: 0 0 50%;
    aspect-ratio: auto;
    min-height: 22rem;
    border-bottom: 0;
    border-right: 1px solid var(--ink);
  }
  .project--feature .tile__body { justify-content: center; padding: 2.25rem; }
  .project--feature .project__title { font-size: clamp(2.2rem, 3.6vw, 3.25rem); }
}

/* ---- Teaching: a tile per course, with a drawn picture -------------------- */

/* The picture is an inline SVG drawn in currentColor, so it takes the role's color. */
.art--drawn { color: var(--accent); }
.art--drawn svg { display: block; width: 100%; height: 100%; }

.course__facts {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted);
}
.course__facts span + span::before { content: "·"; margin: 0 0.65em; }

/* The score sits at the bottom of the tile, under a hairline. */
.course__score {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: auto 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
}
.course__score-value {
  font-family: var(--mono);
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--mustard);
}
.course__score-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Narrower screens --------------------------------------------------- */

@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .split, .paper, .about, .disshead { grid-template-columns: minmax(0, 1fr); }
  .split__label { position: static; }
  .about__photo { max-width: 22rem; }
  .grid--3, .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .papers a { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .papers__sub { grid-column: 2; }
}

@media (max-width: 600px) {
  .grid--4, .stats { grid-template-columns: minmax(0, 1fr); }
  .rows > li { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .facts dd { margin-bottom: 0.6rem; }
  .hero__body { padding-top: 10rem; }
}

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