/* Burak Karagöz · portfolio. An Aegean chart in cobalt and whitewash.
   Tokens first; scrollcraft.css derives the surfaces from them. */

@font-face {
  font-family: "Newsreader";
  src: url(assets/fonts/newsreader-latin-opsz-normal.woff2) format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url(assets/fonts/newsreader-latin-opsz-italic.woff2) format("woff2-variations");
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url(assets/fonts/geist-latin-wght-normal.woff2) format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --sc-canvas:     #EEF3F5;   /* whitewash, cooled by the sea */
  --sc-surface:    #F8FAFA;
  --sc-ink:        #0C2340;   /* deep Aegean */
  --sc-ink-soft:   #3D5877;
  --sc-accent:     #0D5EAF;   /* cobalt, the door and the shutter */
  --sc-accent-ink: #F7F9FA;
  --sc-font-display: "Newsreader", Georgia, serif;
  --sc-font-text:    "Geist", system-ui, sans-serif;
  --sc-shadow-color: 212 60% 18%;

  --rail-h: 3.25rem;
  --bar-h: 4rem;
  --edge: 14px;              /* the chart's neatline inset, shared with world.js */
}

html { background: var(--sc-canvas); }
body {
  margin: 0;
  background: var(--sc-canvas);
  color: var(--sc-ink);
  font-family: var(--sc-font-text);
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------- world ---- */
.chart {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: var(--sc-z-stage);
  display: block;
}
.track { position: relative; z-index: 0; }
.track > section { display: block; }

/* ------------------------------------------------------------ chrome ---- */
.bar {
  position: fixed; z-index: var(--sc-z-chrome);
  top: calc(var(--edge) + 10px); left: calc(var(--edge) + 18px); right: calc(var(--edge) + 18px);
  height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar__mark {
  font-family: var(--sc-font-display);
  font-size: var(--sc-t-lg);
  font-weight: 500;
  letter-spacing: var(--sc-track-snug);
  color: var(--ink-now, var(--sc-ink));
  text-decoration: none;
  transition: opacity var(--sc-d-fast) var(--sc-ease-out), color var(--sc-d-base) var(--sc-ease-out);
}
body.at-harbour .bar__mark { opacity: 0; pointer-events: none; }
.bar__cv { transition: opacity var(--sc-d-fast) var(--sc-ease-out), transform var(--sc-d-fast) var(--sc-ease-out), background-color var(--sc-d-fast) var(--sc-ease-out); }
body.at-harbour .bar__cv, body.at-port .bar__cv { opacity: 0; pointer-events: none; visibility: hidden; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; padding: 0 1.25rem;
  border-radius: var(--sc-r-pill);
  font: 500 var(--sc-t-sm)/1 var(--sc-font-text);
  letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap;
  transition: transform var(--sc-d-fast) var(--sc-ease-out),
              background-color var(--sc-d-fast) var(--sc-ease-out),
              box-shadow var(--sc-d-fast) var(--sc-ease-out);
}
.btn--solid {
  background: var(--sc-accent); color: var(--sc-accent-ink);
  box-shadow: var(--sc-e1), inset 0 1px 0 rgb(255 255 255 / 0.18);
}
@media (hover: hover) and (pointer: fine) {
  .btn--solid:hover { background: color-mix(in oklab, var(--sc-accent) 86%, var(--sc-ink)); box-shadow: var(--sc-e2), inset 0 1px 0 rgb(255 255 255 / 0.18); }
  .link:hover { text-decoration-color: currentColor; }
  .rail__stops a:hover { color: var(--sc-ink); }
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible, .link:focus-visible, .rail a:focus-visible, .bar__mark:focus-visible, .media button:focus-visible {
  outline: 2px solid var(--sc-accent); outline-offset: 3px; border-radius: var(--sc-r-sm);
}
.btn:focus-visible { border-radius: var(--sc-r-pill); }

.link {
  color: var(--sc-accent);
  font: 500 var(--sc-t-sm)/1 var(--sc-font-text);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, currentColor 35%, transparent);
  text-underline-offset: 0.3em; text-decoration-thickness: 1px;
  padding: 0.85rem 0.25rem;
  transition: text-decoration-color var(--sc-d-fast) var(--sc-ease-out);
}
.links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sc-3); margin: 0; }
.icon-btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  color: var(--sc-accent); background: color-mix(in oklab, var(--sc-surface) 70%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--sc-accent) 45%, transparent);
  transition: background-color var(--sc-d-fast) var(--sc-ease-out), color var(--sc-d-fast) var(--sc-ease-out), transform var(--sc-d-fast) var(--sc-ease-out);
}
.icon-btn svg { width: 1.2rem; height: 1.2rem; }
.icon-btn:active { transform: scale(0.95); }
.icon-btn:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover { background: var(--sc-accent); color: var(--sc-accent-ink); }
}

/* The course rail: the map as navigation, set along the bottom neatline. */
.rail {
  position: fixed; z-index: var(--sc-z-chrome);
  left: calc(var(--edge) + 18px); right: calc(var(--edge) + 18px);
  bottom: calc(var(--edge) + 8px);
  height: var(--rail-h);
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--sc-6);
  color: var(--ink-soft-now, var(--sc-ink-soft));
  font: 450 var(--sc-t-xs)/1 var(--sc-font-text);
  transition: color var(--sc-d-base) var(--sc-ease-out);
}
.rail__fix { display: flex; gap: var(--sc-4); margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rail__stops {
  position: relative;
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: space-between;
  border-top: 1px solid currentColor;
  border-color: color-mix(in oklab, currentColor 35%, transparent);
}
.rail__stops li { position: relative; }
.rail__stops li::before {
  content: ""; position: absolute; left: 50%; top: -4px;
  width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%;
  background: var(--canvas-now, var(--sc-canvas)); border: 1px solid currentColor;
}
.rail__stops li:first-child::before { left: 0; margin-left: 0; }
.rail__stops li:last-child::before { left: auto; right: 0; margin-left: 0; }
.rail__stops a {
  display: block; padding: 0.95rem 0.25rem 0.6rem;
  color: inherit; text-decoration: none; letter-spacing: 0.04em;
  transition: color var(--sc-d-fast) var(--sc-ease-out);
}
.rail__stops li:first-child a { padding-left: 0; }
.rail__stops li:last-child a { padding-right: 0; }
.rail__stops a[aria-current="true"] { color: var(--ink-now, var(--sc-ink)); font-weight: 600; }
.rail__stops li.is-passed::before { background: currentColor; }
.rail__boat {
  position: absolute; left: 0; top: calc(50% - 1px);
  width: 0; height: 0;
  border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-top: 11px solid var(--accent-now, var(--sc-accent));
  transform: translate(var(--boat-x, 0px), -14px);
  pointer-events: none;
}

/* ------------------------------------------------------------- copy ---- */
.copy {
  position: fixed; inset: 0;
  z-index: var(--sc-z-copy);
  pointer-events: none;
}
.wp {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(1.5rem, 4vw, 4rem);
  padding: calc(var(--edge) + var(--bar-h) + 1.5rem) calc(var(--edge) + clamp(1.25rem, 5vw, 5rem)) calc(var(--edge) + var(--rail-h) + 2rem);
}
.wp__copy, .wp__scrim, .media { opacity: 0; }
.wp__copy { max-width: 36rem; pointer-events: auto; position: relative; z-index: 1; }
.wp--text-left .wp__copy, .wp--hero .wp__copy, .wp--course .wp__copy { grid-column: 1; grid-row: 1; }
.wp--text-left .media, .wp--hero .wp__focus, .wp--course .wp__focus { grid-column: 2; grid-row: 1; }
.wp--text-right .wp__copy { grid-column: 2; grid-row: 1; justify-self: end; }
.wp--text-right .media { grid-column: 1; grid-row: 1; }
.wp__focus { align-self: center; justify-self: center; width: 1px; height: 1px; }

/* The scrim is a sibling of the copy: a column of whitewash under the text,
   feathered, so the chart stays crisp everywhere else. */
.wp__scrim {
  position: absolute; top: 0; bottom: 0; width: 58%;
  pointer-events: none;
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--canvas-now, var(--sc-canvas)) 92%, transparent) 0%,
    color-mix(in oklab, var(--canvas-now, var(--sc-canvas)) 80%, transparent) 62%,
    transparent 100%);
}
.wp--text-left .wp__scrim, .wp--hero .wp__scrim, .wp--course .wp__scrim { left: 0; }
.wp--text-right .wp__scrim { right: 0; transform: scaleX(-1); }

/* type */
.hero__portrait {
  grid-column: 2; grid-row: 1; justify-self: center; align-self: center;
  margin: 0; width: clamp(16rem, 25vw, 24rem); max-width: 100%; opacity: 0; pointer-events: none;
}
.hero__photo {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--sc-r-sm);
  box-shadow: var(--sc-e3), 0 0 0 1px color-mix(in oklab, var(--sc-ink) 18%, transparent);
  outline: 1px solid color-mix(in oklab, var(--sc-ink) 30%, transparent); outline-offset: 7px;
}
.course__photo {
  grid-column: 2; grid-row: 1; justify-self: center; align-self: center;
  margin: 0; width: clamp(18rem, 32vw, 32rem); max-width: 100%; opacity: 0; pointer-events: none;
}
.course__photo img:not(.course__inset) {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--sc-r-sm);
  box-shadow: var(--sc-e3), 0 0 0 1px color-mix(in oklab, var(--sc-ink) 18%, transparent);
  outline: 1px solid color-mix(in oklab, var(--sc-ink) 30%, transparent); outline-offset: 7px;
}
.course__photo { position: relative; }
/* The graduation photo overlaps the bottom-left corner, clear of the EPFL
   sign, which sits right of centre in the campus photo. */
.course__photo .course__inset {
  position: absolute; left: -11%; bottom: -20%; width: 60%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--sc-r-sm);
  border: 4px solid var(--sc-surface);
  box-shadow: var(--sc-e3), 0 0 0 1px color-mix(in oklab, var(--sc-ink) 22%, transparent);
}
.course__photo.is-missing { visibility: hidden; }
.hero__name {
  margin: 0 0 var(--sc-5); white-space: nowrap;
  font: 400 clamp(2.8rem, 1.2rem + 4.2vw, 5.6rem)/0.94 var(--sc-font-display);
  font-variation-settings: "opsz" 72;
  letter-spacing: var(--sc-track-tight);
}

.hero__sub strong { color: var(--sc-ink); font-weight: 600; }
.hero__place {
  display: inline-flex; align-items: center; gap: 0.45em; margin: 0 0 var(--sc-6);
  font-size: var(--sc-t-sm); font-weight: 500; letter-spacing: 0.02em; color: var(--sc-accent);
}
.hero__place svg { width: 1.15em; height: 1.15em; }
.hero__sub {
  margin: 0 0 var(--sc-4); max-width: 34ch;
  font-size: var(--sc-t-lg); line-height: 1.45; color: var(--sc-ink-soft);
  text-wrap: pretty;
}
.title {
  margin: 0 0 var(--sc-4);
  font: 400 var(--sc-t-2xl)/1.02 var(--sc-font-display);
  font-variation-settings: "opsz" 60;
  letter-spacing: var(--sc-track-snug);
  text-wrap: balance;
}
.wp--peak .title { font-size: var(--sc-t-3xl); line-height: 0.98; }
.meta {
  margin: 0 0 var(--sc-3);
  font: 500 var(--sc-t-xs)/1.4 var(--sc-font-text);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--sc-accent);
}
.body {
  margin: 0 0 var(--sc-5);
  font-size: var(--sc-t-base); line-height: var(--sc-leading-body);
  color: var(--sc-ink); max-width: 58ch; text-wrap: pretty;
}
.status {
  display: inline-flex; align-items: center; gap: 0.5em;
  margin: 0 0 var(--sc-5);
  font: 500 var(--sc-t-sm)/1 var(--sc-font-text); color: var(--sc-accent);
}
.status::before {
  content: ""; width: 0.55em; height: 0.55em; border-radius: 50%;
  background: currentColor; animation: pulse 2.4s var(--sc-ease-in-out) infinite;
}
@keyframes pulse { 50% { opacity: 0.25; } }

.results {
  display: flex; flex-wrap: wrap; gap: var(--sc-4) var(--sc-6);
  margin: 0 0 var(--sc-5); padding: var(--sc-4) 0 0;
  border-top: 1px solid var(--sc-hairline-strong);
}
/* one row, equal columns, however many values */
.results { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.results div { min-width: 0; }
/* project images in the Education photo style */
.wp--text-right .plate { grid-column: 1; }
/* plates show the whole image: no crop */
.course__photo.plate img { aspect-ratio: auto; object-fit: contain; height: auto; }
/* FEA: two results of similar size; the front one covers only the empty
   lower-left of the back one, so neither geometry is hidden. */
.wp .plate--fea { width: clamp(20rem, 34vw, 34rem); aspect-ratio: 1.75; height: auto; }
.course__photo.plate--fea img { position: absolute; margin: 0; }
.course__photo.plate--fea img:not(.course__inset) { right: 0; top: 0; width: 60%; }
.course__photo.plate--fea .course__inset { left: 0; top: 31.6%; bottom: auto; width: 50%; border-width: 3px; }
.plate--lca { width: clamp(18rem, 34vw, 34rem); }
.plate figcaption { margin-top: var(--sc-3); font-size: var(--sc-t-xs); color: var(--sc-ink-soft); }
.results dt { white-space: nowrap; }
.results dt {
  font: 400 var(--sc-t-xl)/1 var(--sc-font-display);
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--sc-ink); letter-spacing: var(--sc-track-snug);
}
.results--peak { gap: var(--sc-4) var(--sc-5); }
.results--peak dt { font-size: var(--sc-t-2xl); }
.results.results--peak dd { max-width: 42ch; }
.results dd { margin: var(--sc-1) 0 0; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); max-width: 18ch; }

.tools, .credit { margin: 0 0 var(--sc-2); font-size: var(--sc-t-sm); line-height: 1.5; color: var(--sc-ink-soft); }
.tools span {
  display: inline-block; margin-right: 0.6em;
  font-size: var(--sc-t-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--sc-ink);
}
.credit { font-style: normal; }

/* course */
.legs { list-style: none; margin: 0 0 var(--sc-5); padding: 0; border-top: 1px solid var(--sc-hairline-strong); }
.legs li {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: var(--sc-4);
  padding: var(--sc-3) 0; border-bottom: 1px solid var(--sc-hairline);
  font-size: var(--sc-t-sm); line-height: 1.45; color: var(--sc-ink-soft);
}
.legs__when { font-variant-numeric: tabular-nums; color: var(--sc-accent); font-weight: 500; }
.legs__what strong { display: block; color: var(--sc-ink); font-weight: 600; }
.kit { margin: 0; display: grid; gap: var(--sc-2); }
.kit div { display: grid; grid-template-columns: 8.5rem 1fr; gap: var(--sc-4); font-size: var(--sc-t-sm); line-height: 1.5; }
.kit dt { font-size: var(--sc-t-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 0.15em; }
.kit dd { margin: 0; color: var(--sc-ink-soft); }

/* landfall, at dusk: one hue, a lighter stop for the dark ground */
.wp--night {
  --sc-ink: #EEF3F6; --sc-ink-soft: #B4C8DD;
  --sc-accent: #9CC3F0; --sc-accent-ink: #0B1F3A;
  --sc-surface: #0B1F3A;
  --sc-hairline-strong: rgb(238 243 246 / 0.22);
  color: var(--sc-ink);
}
.wp--port .wp__copy, .wp--port .wp__focus { grid-row: 1; }
.wp--port .wp__copy { grid-column: 1; }
.wp--port .wp__focus { grid-column: 2; }
.title--port { font-size: var(--sc-t-2xl); max-width: 19ch; line-height: 1.02; margin-bottom: var(--sc-5); }
.wp--port .body { color: var(--sc-ink-soft); max-width: 40ch; margin-bottom: var(--sc-6); }
.foot { margin: var(--sc-8) 0 0; font-size: var(--sc-t-xs); color: var(--sc-ink-soft); }

/* ------------------------------------------------------------- media ---- */
/* The figure stands on its island. A model when one exists, then renders,
   then an honest empty plate. */
.media {
  position: relative; margin: 0;
  width: min(100%, 40rem, 62vh); aspect-ratio: 1;
  justify-self: center; align-self: center;
  pointer-events: auto;
}
.wp--peak .media { width: min(100%, 46rem, 70vh); }
.media model-viewer {
  width: 100%; height: 100%;
  background: transparent;
  --poster-color: transparent;
  --progress-bar-color: var(--sc-accent);
  outline: none;
}
.media model-viewer::part(default-progress-bar) { display: none; }
.media img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 18px 24px hsl(var(--sc-shadow-color) / 0.22));
}
.media__hint, .media figcaption {
  position: absolute; left: 50%; bottom: -0.25rem; transform: translateX(-50%);
  font-size: var(--sc-t-xs); letter-spacing: 0.04em; color: var(--sc-ink-soft);
  white-space: nowrap; pointer-events: none; margin: 0;
}
.media .media__hint { left: 0; top: 0.55rem; bottom: auto; transform: none; }
/* Arrows sit either side of the model; the model's name is read out to
   screen readers only. */
.media__switch { position: absolute; inset: 0; pointer-events: none; }
.media__switch span {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.media__switch button {
  position: absolute; top: 50%; margin-top: -1.125rem; pointer-events: auto; box-shadow: var(--sc-e1);
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%;
  background: var(--sc-accent); color: var(--sc-accent-ink); cursor: pointer;
  transition: transform var(--sc-d-fast) var(--sc-ease-out), background-color var(--sc-d-fast) var(--sc-ease-out);
}
.media__switch button:first-child { left: 0; }
.media__switch button:last-child { right: 0; }
/* On phones the arrows straddle the edge of the model box, close to the
   model, but never past the screen edge (the box is centred). */
@media (max-width: 760px) {
  .media__switch button:first-child { left: max(calc((100% - 100vw) / 2 + 0.375rem), -1.5rem); }
  .media__switch button:last-child { right: max(calc((100% - 100vw) / 2 + 0.375rem), -1.5rem); }
}
@media (min-width: 761px) {
  .media__switch button:first-child { left: -3rem; }
  .media__switch button:last-child { right: -3rem; }
}
.media__switch button svg { width: 1rem; height: 1rem; }
.media__switch button:active { transform: scale(0.94); }
.media__switch button:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .media__switch button:hover { background: color-mix(in oklab, var(--sc-accent) 86%, var(--sc-ink)); } }
.media__tabs {
  position: absolute; top: 0; right: 0; display: flex; gap: var(--sc-1);
  background: color-mix(in oklab, var(--sc-surface) 86%, transparent);
  padding: 3px; border-radius: var(--sc-r-pill); box-shadow: var(--sc-e1);
}
.media__tabs button {
  font: 500 var(--sc-t-xs)/1 var(--sc-font-text); color: var(--sc-ink-soft);
  background: none; border: 0; border-radius: var(--sc-r-pill);
  padding: 0.55rem 0.85rem; cursor: pointer;
  transition: background-color var(--sc-d-fast) var(--sc-ease-out), color var(--sc-d-fast) var(--sc-ease-out);
}
.media__tabs button[aria-pressed="true"] { background: var(--sc-accent); color: var(--sc-accent-ink); }
.media__pane { position: absolute; inset: 0; }
.media__pane[hidden] { display: none; }
.media--empty::before {
  content: ""; position: absolute; inset: 22%;
  border: 1px dashed color-mix(in oklab, var(--sc-ink) 30%, transparent);
  border-radius: 50%;
}
.media--empty figcaption { bottom: 50%; transform: translate(-50%, 50%); font-family: var(--sc-font-display); font-style: italic; font-size: var(--sc-t-base); }

/* ------------------------------------------------------------ phones ---- */
@media (max-width: 760px) {
  :root { --edge: 8px; --bar-h: 3.25rem; --rail-h: 2.75rem; }
  .bar { left: calc(var(--edge) + 12px); right: calc(var(--edge) + 12px); top: calc(var(--edge) + 4px); }
  .bar__mark { font-size: var(--sc-t-base); }
  .bar__cv { min-height: 2.5rem; padding: 0 1rem; }
  .rail { left: calc(var(--edge) + 12px); right: calc(var(--edge) + 12px); bottom: calc(var(--edge) + 2px); grid-template-columns: 1fr; gap: 0; }
  .rail__fix { display: none; }
  .rail__stops a { font-size: 0; padding: 1rem 0.5rem 0.5rem; min-width: 1.5rem; }
  .rail__stops a[aria-current="true"] { font-size: var(--sc-t-xs); }

  .wp {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    align-items: start; row-gap: var(--sc-3);
    padding: calc(var(--edge) + var(--bar-h) + 0.75rem) calc(var(--edge) + 14px) calc(var(--edge) + var(--rail-h) + 0.5rem);
  }
  .wp .wp__copy { grid-column: 1 !important; grid-row: 1 !important; justify-self: start !important; max-width: none; }
  .wp .media, .wp .wp__focus { grid-column: 1 !important; grid-row: 2 !important; align-self: center; }
  .wp--hero, .wp--course { grid-template-rows: auto 1fr; }
  .wp__scrim {
    left: 0 !important; right: 0; width: auto !important; height: 64%; bottom: auto; top: 0;
    transform: none !important;
    background: linear-gradient(180deg,
      color-mix(in oklab, var(--canvas-now, var(--sc-canvas)) 94%, transparent) 0%,
      color-mix(in oklab, var(--canvas-now, var(--sc-canvas)) 84%, transparent) 70%,
      transparent 100%);
  }

  .hero__name { font-size: clamp(2.2rem, 11.5vw, 3.2rem); margin-bottom: var(--sc-4); }
  .wp .hero__portrait { grid-column: 1 !important; grid-row: 2 !important; align-self: center; width: min(14rem, 52vw, 32svh); }
  .hero__photo { outline-offset: 4px; }
  /* Education on phones: the photos get the room the copy leaves, sized to
     fit it, with the graduation photo kept inside the frame. */
  .wp--course { grid-template-rows: auto minmax(0, 1fr); }
  .wp--course .body { display: none; }
  .wp .course__photo { grid-column: 1 !important; grid-row: 2 !important; align-self: center; justify-self: center;
    height: 100%; max-height: 17rem; width: auto; max-width: 100%; aspect-ratio: 1.25; min-height: 0; }
  .course__photo img:not(.course__inset) { position: absolute; right: 0; top: 0; width: 88%; }
  .course__photo img:not(.course__inset) { outline-offset: 4px; }
  .course__photo .course__inset { width: 52%; left: 0; bottom: 0; border-width: 3px; }
  .hero__place { margin-bottom: var(--sc-5); }
  .hero__sub { font-size: var(--sc-t-base); margin-bottom: var(--sc-3); }
  .title, .wp--peak .title { font-size: clamp(1.75rem, 7.4vw, 2.2rem); margin-bottom: var(--sc-3); }
  .title--port { font-size: clamp(2rem, 8.6vw, 2.6rem); }
  .meta { margin-bottom: var(--sc-2); }
  .body { font-size: 0.95rem; line-height: 1.55; margin-bottom: var(--sc-3); }
  .results { gap: var(--sc-3) var(--sc-5); margin-bottom: var(--sc-3); padding-top: var(--sc-3); }
  .results dt, .results--peak dt { font-size: var(--sc-t-lg); }
  .results--peak dd { max-width: none; }
      .wp .plate--lca { aspect-ratio: auto; height: auto; width: min(100%, 22rem); }
  .plate--lca img { position: static !important; width: 100% !important; }
  .wp .plate--fea { aspect-ratio: 1.75; height: auto; width: min(100%, 22rem); }
  .results dd { font-size: var(--sc-t-xs); }
  .status { margin-bottom: var(--sc-3); }
  .credit { display: none; }
  .legs { margin-bottom: var(--sc-3); }
  .legs li, .kit div { grid-template-columns: 6.5rem 1fr; gap: var(--sc-3); padding: var(--sc-2) 0; font-size: var(--sc-t-xs); }
  .kit div { padding: 0; }
  /* the model takes whatever height the copy leaves, never more */
  .media, .wp--peak .media { width: auto; height: 100%; max-width: 100%; max-height: 52svh; aspect-ratio: 1; align-self: center; justify-self: center; min-height: 0; }
}

/* Short landscape screens: tighten the desktop rhythm rather than overflow. */
@media (min-width: 761px) and (max-height: 820px) {
  .title { font-size: var(--sc-t-xl); }
  .wp--peak .title { font-size: var(--sc-t-2xl); }
  .body { font-size: var(--sc-t-sm); margin-bottom: var(--sc-4); }
  .results { padding-top: var(--sc-3); margin-bottom: var(--sc-4); }
  .results dt, .results--peak dt { font-size: var(--sc-t-lg); }
  .credit { display: none; }
}

.more { display: none; }
@media (max-width: 760px) {
  .body--clamp:not(.is-open) {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3;
    overflow: hidden; margin-bottom: 0;
  }
  .more {
    display: inline-block; margin: 0 0 var(--sc-3); padding: 0.45rem 0; border: 0; background: none;
    font: 500 var(--sc-t-xs)/1 var(--sc-font-text); letter-spacing: 0.02em; color: var(--sc-accent);
    text-decoration: underline; text-underline-offset: 0.25em; cursor: pointer;
  }
  .more:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; border-radius: var(--sc-r-sm); }
}

@media (prefers-reduced-motion: reduce) {
  .status::before { animation: none; }
}
