/* Pramod Medichalam — portfolio stylesheet.
   Tokens follow the live pramodnm.com system: the twelve brand blues,
   a golden-ratio type and spacing scale, and frosted-glass surfaces. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-vf.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  /* palette — Pramod Branding B01 */
  --sky-50: #e1f3fb; --sky-100: #cdecfa; --sky-200: #99d7e9; --sky-300: #85cfec;
  --sky-400: #6ec3ed; --sky-500: #63b8e7; --blue-500: #4d9ecd; --blue-600: #3c7b9f;
  --navy-700: #2c5d78; --navy-800: #23485e; --navy-900: #1c3b4c; --navy-950: #153240;
  --white-rgb: 255 255 255; --navy-rgb: 21 50 64; --sky-rgb: 225 243 251;

  /* type */
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-display: "acumin-variable", "Archivo", "Helvetica Neue", Arial, sans-serif;
  --fs-micro: 12.58px;
  --fs-body: 16px;
  --fs-body-lg: clamp(16px, 1.4132vw, 20.35px);
  --fs-h4: clamp(20.35px, 1.7979vw, 25.89px);
  --fs-h3: clamp(25.89px, 2.3vw, 32.94px);
  --fs-sub: clamp(32.94px, 2.909vw, 41.89px);
  --fs-h1: clamp(32.94px, 4.7069vw, 67.78px);
  --fs-hero: clamp(41.89px, 5.9875vw, 86.22px);
  --fs-numeral: clamp(67.78px, 12.323vw, 177.45px);
  --lh-display: 1; --lh-heading: 1.146; --lh-body: 1.618;
  --tracking-micro: .09em;
  --measure: 38.2em;

  /* space (Fibonacci) */
  --sp-1: 3px; --sp-2: 5px; --sp-3: 8px; --sp-4: 13px; --sp-5: 21px; --sp-6: 34px;
  --sp-7: 55px; --sp-8: 89px; --sp-9: 144px; --sp-10: 233px;
  --page-margin: var(--sp-5);
  --content-max: 1597px;

  /* shape, opacity, glass, motion */
  --r-chip: 8px; --r-button: 13px; --r-card: 21px; --r-panel: 34px; --r-pill: 999px;
  --o-1: .618; --o-2: .382; --o-3: .236; --o-4: .146; --o-5: .09;
  --blur-card: 21px; --blur-overlay: 34px; --saturate: 1.272;
  --t-micro: .382s; --t-ui: .618s; --t-reveal: 1s; --t-section: 1.618s; --t-ambient: 2.618s;
  --ease-phi: cubic-bezier(.382, 0, .618, 1);
  --ease-out: cubic-bezier(.382, 1, .618, 1);
  --ease-snap: cubic-bezier(.236, .618, .382, 1);
  --logo-h: 21px; --touch: 44px;
}
@media (min-width: 640px) { :root { --page-margin: var(--sp-6); } }
@media (min-width: 1024px) { :root { --page-margin: var(--sp-7); --logo-h: 34px; } }
@media (min-width: 1600px) { :root { --page-margin: var(--sp-8); } }

[data-tone="light"], :root {
  --bg: var(--sky-50); --bg-rgb: var(--sky-rgb); --bg-raised: var(--sky-100);
  --fg: var(--navy-950); --fg-rgb: var(--navy-rgb); --fg-2: var(--navy-700);
  --accent: var(--navy-800); --deco: var(--blue-500); --deco-2: var(--sky-200);
  --line: rgb(var(--navy-rgb) / var(--o-4));
  --glass-fill: rgb(var(--white-rgb) / var(--o-2));
  --glass-fill-strong: rgb(var(--white-rgb) / var(--o-1));
  --glass-rim: rgb(var(--white-rgb) / var(--o-2));
  --glass-spec: rgb(var(--white-rgb) / var(--o-1));
  --shadow-rgb: var(--navy-rgb);
  --focus: var(--navy-700);
  --btn-bg: var(--navy-800); --btn-fg: var(--sky-50);
  --glow-a: rgb(110 195 237 / .28); --glow-b: rgb(153 215 233 / .45);
  --emblem-opacity: .55;
  --logo-ink: var(--navy-950);
  color-scheme: light;
}
[data-tone="dark"] {
  --bg: var(--navy-950); --bg-rgb: var(--navy-rgb); --bg-raised: var(--navy-900);
  --fg: var(--sky-50); --fg-rgb: var(--sky-rgb); --fg-2: var(--sky-200);
  --accent: var(--sky-400); --deco: var(--blue-600); --deco-2: var(--navy-800);
  --line: rgb(var(--white-rgb) / var(--o-3));
  --glass-fill: rgb(var(--white-rgb) / var(--o-5));
  --glass-fill-strong: rgb(var(--white-rgb) / var(--o-4));
  --glass-rim: rgb(var(--white-rgb) / var(--o-3));
  --glass-spec: rgb(var(--white-rgb) / var(--o-3));
  --shadow-rgb: 8 24 32;
  --focus: var(--sky-400);
  --btn-bg: var(--sky-200); --btn-fg: var(--navy-950);
  --glow-a: rgb(60 123 159 / .35); --glow-b: rgb(35 72 94 / .6);
  --emblem-opacity: .3;
  --logo-ink: var(--sky-50);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;   /* one swipe = one page */
}
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--fg);
  transition: background-color var(--t-ui) var(--ease-phi), color var(--t-ui) var(--ease-phi);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 300; line-height: var(--lh-heading); letter-spacing: -.01em; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: var(--page-margin); top: -100px; z-index: 100; padding: var(--sp-3) var(--sp-4); background: var(--btn-bg); color: var(--btn-fg); border-radius: var(--r-pill); }
.skip:focus { top: var(--sp-4); }

/* ---------- ambient background ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(40% 35% at 78% 22%, var(--glow-a), transparent 70%),
    radial-gradient(45% 40% at 12% 85%, var(--glow-b), transparent 70%);
}
.ambient img {
  position: absolute; width: min(100vh, 85.4vw); right: -12vw; top: 50%;
  transform: translateY(-50%); opacity: var(--emblem-opacity);
  animation: ambient-spin 144s linear infinite;
}
@keyframes ambient-spin { to { transform: translateY(-50%) rotate(-360deg); } }

/* ---------- frame: header, dots, footer ---------- */
.glass {
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--blur-card)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur-card)) saturate(var(--saturate));
  border: 1px solid var(--glass-rim);
  box-shadow: 0 34px 89px rgb(var(--shadow-rgb) / var(--o-4)), inset 0 1px 0 var(--glass-spec);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgb(var(--bg-rgb) / .9); }
}

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-5) var(--page-margin);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; }
/* logo: inline SVG so the emblem can move on its own */
.brandbar { position: relative; display: flex; align-items: center; gap: var(--sp-3); }
.brand .logo { display: block; height: var(--logo-h); width: auto; aspect-ratio: 171.97 / 31.55; overflow: visible; }
.brand .wordmark { fill: var(--logo-ink); transition: fill var(--t-ui) var(--ease-phi); }
.brand .emblem {
  transform-box: fill-box; transform-origin: 50% 50%;
  animation: emblem-spin 5s infinite;               /* one turn every 5 s */
}
/* rest for 4 s, then 360° counter-clockwise in 1 s with ease-in-out */
@keyframes emblem-spin {
  0%, 80% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
  100% { transform: rotate(-360deg); }
}
/* hover: shutter — 30° counter-clockwise and back, ping-pong, the blades closing in */
.brand:hover .emblem, .brand:focus-visible .emblem {
  animation: emblem-shutter 1s cubic-bezier(.65, 0, .35, 1) 1;   /* once per hover */
}
@keyframes emblem-shutter {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(-30deg) scale(.84); }
}

/* quick links: revealed when hovering the logo or breadcrumb */
.quicknav { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); padding-left: var(--sp-4); pointer-events: none; }
.quicknav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-2); white-space: nowrap; }
.quicknav li { opacity: 0; transform: translateX(-8px); transition: opacity 0.236s var(--ease-out), transform 0.236s var(--ease-out); }
.brandbar:hover .quicknav, .brandbar:focus-within .quicknav { pointer-events: auto; }
.brandbar:hover .quicknav li, .brandbar:focus-within .quicknav li {
  opacity: 1; transform: none;
  transition: opacity 0.382s var(--ease-out), transform 0.382s var(--ease-out);
  transition-delay: calc(var(--i) * 90ms);          /* 7 buttons, all in by 1 s */
}
.qbtn {
  position: relative; display: inline-flex; align-items: center; min-height: 34px; padding: 0 var(--sp-4);
  border-radius: var(--r-pill); text-decoration: none; overflow: hidden;
  font-size: 12.58px; font-weight: 500; letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2);
  background: var(--glass-fill); border: 1px solid var(--glass-rim);
  -webkit-backdrop-filter: blur(var(--blur-card)) saturate(var(--saturate)); backdrop-filter: blur(var(--blur-card)) saturate(var(--saturate));
}
@media (max-width: 1199px), (hover: none) { .quicknav { display: none; } }

/* magnetic hover: the button leans toward the cursor, its glow follows it */
.magnetic { --mx: 0px; --my: 0px; --hx: 50%; --hy: 50%; transform: translate(var(--mx), var(--my)); transition: transform 0.382s var(--ease-out), color var(--t-micro), box-shadow var(--t-micro); }
.magnetic > span { position: relative; z-index: 1; display: inline-block; transform: translate(calc(var(--mx) * .5), calc(var(--my) * .5)); transition: transform 0.382s var(--ease-out); }
.magnetic::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: 0;
  background: radial-gradient(circle at var(--hx) var(--hy), rgb(var(--white-rgb) / .9), rgb(110 195 237 / .35) 45%, transparent 75%);
  transition: opacity var(--t-micro) var(--ease-out);
}
[data-tone="dark"] .magnetic::before { background: radial-gradient(circle at var(--hx) var(--hy), rgb(110 195 237 / .55), rgb(110 195 237 / .12) 50%, transparent 78%); }
.magnetic:hover { color: var(--fg); box-shadow: 0 8px 21px rgb(var(--shadow-rgb) / var(--o-3)); }
.magnetic:hover::before { opacity: 1; }

.crumb { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2); }
.crumb::before { content: "/"; margin-right: var(--sp-3); opacity: var(--o-1); }
.header-actions { display: flex; gap: var(--sp-3); }
.icon-btn {
  width: var(--touch); height: var(--touch); border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: var(--fg);
  padding: 0; font: inherit; text-decoration: none;
  transition: transform var(--t-micro) var(--ease-snap), background-color var(--t-micro);
}
.icon-btn:hover { transform: translateY(-2px); background: var(--glass-fill-strong); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn .i-moon { display: none; }
[data-tone="dark"] .icon-btn .i-sun { display: none; }
[data-tone="dark"] .icon-btn .i-moon { display: block; }

.site-footer {
  position: fixed; inset: auto 0 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--page-margin) var(--sp-5);
  pointer-events: none;
}
.site-footer > * { pointer-events: auto; }
.copyright { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); color: var(--fg-2); }
.footer-actions { display: flex; align-items: center; gap: var(--sp-3); }
.footer-actions .icon-btn { width: 34px; height: 34px; }
.footer-actions .icon-btn svg { width: 13px; height: 13px; }
.pill {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  min-height: 34px; padding: 0 var(--sp-5); border-radius: var(--r-pill);
  font-size: var(--fs-micro); font-weight: 500; letter-spacing: var(--tracking-micro); text-transform: uppercase;
  text-decoration: none; color: var(--fg); cursor: pointer;
  transition: transform var(--t-micro) var(--ease-snap), background-color var(--t-micro);
}
.pill:hover { transform: translateY(-2px); background: var(--glass-fill-strong); }
.pill.solid { background: var(--btn-bg); color: var(--btn-fg); border: 0; box-shadow: 0 8px 21px rgb(var(--shadow-rgb) / var(--o-3)); }
.pill.solid:hover { background: var(--btn-bg); filter: brightness(1.08); }

.dots {
  position: fixed; right: var(--sp-5); top: 50%; transform: translateY(-50%); z-index: 30;
  display: flex; flex-direction: column; gap: var(--sp-4); margin: 0; padding: 0; list-style: none;
}
.dots a { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-3); text-decoration: none; }
.dots .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--fg-2); opacity: var(--o-2); transition: all var(--t-micro) var(--ease-snap); }
.dots .label {
  font-size: 12.58px; letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2);
  opacity: 0; transform: translateX(5px); transition: all var(--t-micro) var(--ease-snap); white-space: nowrap;
}
.dots a:hover .label, .dots a:focus-visible .label {   /* titles only on hover or keyboard focus */ opacity: 1; transform: none; }
.dots a[aria-current="true"] .dot { height: 21px; border-radius: 3px; opacity: 1; background: var(--accent); }
@media (max-width: 899px) { .dots { display: none; } }

/* ---------- menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  padding: var(--sp-8) var(--page-margin);
  background: rgb(var(--bg-rgb) / .72);
  -webkit-backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate));
  opacity: 0; visibility: hidden; transition: opacity var(--t-ui) var(--ease-phi), visibility 0s var(--t-ui);
}
.menu[data-open="true"] { opacity: 1; visibility: visible; transition: opacity var(--t-ui) var(--ease-phi); }
.menu-close { position: absolute; top: var(--sp-5); right: var(--page-margin); }
.menu ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); counter-reset: m; }
.menu li { counter-increment: m; }
.menu a {
  display: flex; align-items: center; gap: var(--sp-5); text-decoration: none;
  font-family: var(--font-display); font-weight: 300; font-size: var(--fs-h1); line-height: 1.146; color: var(--fg-2);
  transform: translateY(13px); opacity: 0;
  transition: color var(--t-micro), transform var(--t-ui) var(--ease-out), opacity var(--t-ui) var(--ease-out);
}
.menu[data-open="true"] a { transform: none; opacity: 1; }
.menu a::before { content: counter(m, decimal-leading-zero); font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); font-family: var(--font-body); width: 2.618em; }
.menu a img { width: 34px; height: 34px; object-fit: contain; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--fg); }
.menu a[aria-current="page"]::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- page layout ---------- */
main { position: relative; }
.wrap { width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--page-margin); }
/* every section is one screen: content sits between the fixed header and footer */
:root { --frame-top: var(--sp-8); --frame-bottom: var(--sp-8); }

.panel, .panel.auto {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: var(--frame-top) 0 var(--frame-bottom);
  scroll-snap-align: start; scroll-snap-stop: always;
}
@media (max-width: 899px) { .site-footer { scroll-snap-align: end; } }

.eyebrow { display: inline-flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-micro); font-weight: 500; letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2); margin-bottom: var(--sp-5); }
.eyebrow img { width: 21px; height: 21px; object-fit: contain; }
.display { font-size: var(--fs-hero); line-height: var(--lh-display); color: var(--fg-2); letter-spacing: -.02em; }
.display .line { display: block; }
.h1 { font-size: var(--fs-h1); color: var(--fg-2); }
.h2 { font-size: var(--fs-sub); color: var(--fg); }
.h3 { font-size: var(--fs-h4); font-weight: 400; color: var(--fg); }
.lead { font-size: var(--fs-body-lg); line-height: 1.618; color: var(--fg-2); max-width: var(--measure); }
.copy { max-width: var(--measure); }
.copy p { color: var(--fg); }
.muted { color: var(--fg-2); }
.micro { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); text-transform: uppercase; }
.closing { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 300; color: var(--fg-2); max-width: 23.6em; }

.split { display: grid; gap: var(--sp-7); align-items: center; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1.618fr; gap: var(--sp-8); } .split.wide-right { grid-template-columns: 1fr 1.618fr; } }

.stack > * + * { margin-top: var(--sp-6); }
.grid { display: grid; gap: var(--sp-5); }
@media (min-width: 640px) { .grid.c2 { grid-template-columns: repeat(2, 1fr); } .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(4, 1fr); } }

.card { border-radius: var(--r-card); padding: var(--sp-6); }
.card.lg { border-radius: var(--r-panel); padding: var(--sp-7); }
@media (max-width: 639px) { .card, .card.lg { padding: var(--sp-5); } }
.card h3 { margin-bottom: var(--sp-4); }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .num { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); color: var(--fg-2); font-weight: 500; display: block; margin-bottom: var(--sp-4); }
.card-link { text-decoration: none; display: block; transition: transform var(--t-micro) var(--ease-snap), box-shadow var(--t-micro); }
.card-link:hover { transform: translateY(-4px); box-shadow: 0 34px 89px rgb(var(--shadow-rgb) / var(--o-3)), inset 0 0 0 1px var(--accent); }

.text-link { display: inline-flex; gap: var(--sp-2); align-items: center; font-weight: 500; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.text-link:hover { color: var(--fg); }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.ticks li { position: relative; padding-left: var(--sp-5); color: var(--fg); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1px; background: var(--deco); }

.chips { display: flex; flex-wrap: wrap; gap: var(--sp-3); list-style: none; padding: 0; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill); border: 1px solid var(--line); font-size: 12.58px; color: var(--fg-2); text-decoration: none; background: var(--glass-fill); }
a.chip:hover { color: var(--fg); border-color: var(--accent); }

.rule { border: 0; border-top: 1px solid var(--line); margin: var(--sp-7) 0; }

/* ---------- home ---------- */
.home-hero .display { margin-bottom: var(--sp-7); }
.home-intro p { font-size: var(--fs-body-lg); line-height: 1.618; color: var(--fg); }
.section-links a { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-5); }
.section-links img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.section-links strong { display: block; font-weight: 500; font-size: 16px; }
.section-links span { font-size: 12.58px; color: var(--fg-2); line-height: 1.382; display: block; }

/* splash (home, first visit per session) */
.splash {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: var(--bg); transition: background-color var(--t-reveal) var(--ease-phi);
}
.splash.clear { background: transparent; pointer-events: none; }
.splash-stage { position: relative; display: grid; justify-items: center; gap: var(--sp-4); }
.splash-emblem { width: min(38vmin, 233px); aspect-ratio: 1; animation: splash-spin 8s linear infinite; transition: transform 1s var(--ease-out), opacity 0.618s var(--ease-out); }
.splash-emblem img { width: 100%; height: 100%; }
@keyframes splash-spin { to { rotate: -360deg; } }
.splash-logo { position: absolute; top: 50%; left: 50%; width: min(61.8vw, 377px); translate: -50% -50%; opacity: 0; transition: opacity 0.618s var(--ease-out); }
.splash-logo img { width: 100%; height: auto; }
.splash-logo .logo-dark { display: none; }
[data-tone="dark"] .splash-logo .logo-light { display: none; }
[data-tone="dark"] .splash-logo .logo-dark { display: block; }
.splash-tagline { position: absolute; top: calc(50% + min(9vw, 54px)); left: 50%; translate: -50% 0; white-space: nowrap; font-size: var(--fs-body-lg); font-weight: 300; color: var(--fg-2); opacity: 0; transition: opacity 1s var(--ease-out); }
.splash.settle .splash-logo, .splash.settle .splash-tagline { opacity: 1; }
.splash.fly .splash-tagline { opacity: 0; }
.splash.fly .splash-logo { transition: transform 1s cubic-bezier(.65, 0, .35, 1); }
.splash.done { display: none; }
html.splash-running .site-header .brand { opacity: 0; }
.reveal-seq > * { transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
html.splash-running .reveal-seq > *, html.splash-running .reveal-seq .line { opacity: 0; transform: translateY(13px); }
.reveal-seq .line { transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(21px); transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- about ---------- */
.principle { display: grid; gap: var(--sp-6); }
@media (min-width: 1024px) { .principle { grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr); gap: var(--sp-8); align-items: start; } }
.principle .copy p:first-child { font-size: var(--fs-body-lg); line-height: 1.618; color: var(--fg-2); }
.steps { counter-reset: s; }
.steps .card { position: relative; }
.steps .card strong { display: block; font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 400; margin-bottom: var(--sp-3); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-6); }
.cta-row .pill { min-height: var(--touch); }

/* ---------- journey ---------- */
.chapters { display: grid; gap: var(--sp-5); }
@media (min-width: 900px) { .chapters { grid-template-columns: repeat(4, 1fr); } }
.chapter { display: flex; flex-direction: column; gap: var(--sp-3); }
.chapter .num { margin-bottom: 0; }
.chapter h3 { font-size: 20.35px; font-weight: 400; }
.chapter small { color: var(--fg-2); font-size: 12.58px; }
.chapter-body { display: grid; gap: var(--sp-6); }
@media (min-width: 1024px) { .chapter-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr); gap: var(--sp-8); } }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-5); position: relative; }
.role { display: grid; gap: var(--sp-3); }
@media (min-width: 760px) { .role { grid-template-columns: 144px 1fr; gap: var(--sp-6); } }
.role .when { font-size: 12.58px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.role .when strong { display: block; font-weight: 500; color: var(--fg); font-size: 16px; }
.role h4 { font-size: 20.35px; font-weight: 400; margin-bottom: var(--sp-2); }
.role .org { color: var(--fg-2); font-size: 12.58px; margin-bottom: var(--sp-4); }
.role .awards { margin-top: var(--sp-4); }

.edu .meta { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); color: var(--fg-2); font-size: 12.58px; margin-bottom: var(--sp-4); }
.edu .year { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 300; color: var(--deco); line-height: 1; margin-bottom: var(--sp-4); display: block; }
.honours { list-style: none; padding: 0; margin: var(--sp-5) 0 0; display: grid; gap: var(--sp-3); border-top: 1px solid var(--line); padding-top: var(--sp-4); }
.honours li { display: grid; grid-template-columns: 3.2em 1fr; gap: var(--sp-3); font-size: 12.58px; }
.honours b { font-weight: 500; }
.honours span { color: var(--fg-2); }

.photo-story { display: grid; gap: var(--sp-6); }
@media (min-width: 1024px) { .photo-story { grid-template-columns: 1fr 1fr; align-items: start; } }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.gallery img { width: 100%; aspect-ratio: 809 / 500; object-fit: cover; border-radius: var(--r-chip); }
.gallery img:first-child:nth-last-child(odd) { grid-column: 1 / -1; }

/* ---------- recognition ---------- */
.counts { display: grid; gap: var(--sp-5); }
@media (min-width: 640px) { .counts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .counts { grid-template-columns: repeat(4, 1fr); } }
.count { text-decoration: none; }
.count .n { display: block; font-family: var(--font-display); font-weight: 200; font-size: var(--fs-numeral); line-height: 0.854; color: var(--fg-2); letter-spacing: -.04em; }
.count .t { display: block; margin-top: var(--sp-4); font-size: 16px; color: var(--fg); max-width: 14.6em; }
.honour .year { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); color: var(--fg-2); }
.honour h3 { margin: var(--sp-3) 0 var(--sp-2); }
.honour .by { color: var(--fg-2); font-size: 12.58px; margin-bottom: var(--sp-4); }

.tabs { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.tab { cursor: pointer; font: inherit; font-size: 12.58px; color: var(--fg-2); padding: var(--sp-3) var(--sp-5); border-radius: var(--r-pill); border: 1px solid var(--line); background: transparent; transition: all var(--t-micro); }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; }
.tab .c { opacity: .7; margin-left: var(--sp-2); font-variant-numeric: tabular-nums; }
[role="tabpanel"][hidden] { display: none; }

.awards-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.awards-table th { text-align: left; font-weight: 500; font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2); padding: 0 var(--sp-4) var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.awards-table td { padding: var(--sp-4) var(--sp-4) var(--sp-4) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.awards-table tr:last-child td { border-bottom: 0; }
.awards-table td:first-child { font-variant-numeric: tabular-nums; color: var(--fg-2); width: 4.236em; }
.awards-table td.project { font-weight: 500; }
.awards-table a { color: var(--accent); }
@media (max-width: 760px) {
  .awards-table thead { display: none; }
  .awards-table tr { display: grid; grid-template-columns: 4em 1fr; padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
  .awards-table td { border: 0; padding: 0 0 var(--sp-1); }
  .awards-table td:not(:first-child) { grid-column: 2; }
  .awards-table td:first-child { grid-row: span 4; }
}

/* ---------- expertise & workfolio ---------- */
.area { display: flex; flex-direction: column; gap: var(--sp-4); }
.area .num { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 200; color: var(--deco); line-height: 1; margin: 0; }
.area h3 { font-size: 20.35px; font-weight: 400; margin: 0; }
.area .sum { color: var(--fg-2); font-size: 16px; line-height: 1.618; margin: 0; }
.area .ticks { margin-top: var(--sp-3); font-size: 16px; }
.area .text-link { margin-top: auto; align-self: flex-start; }
.area .focus-label { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2); margin-top: var(--sp-3); }

.work-grid { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.work { border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; }
.work figure { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-raised); }
.work figure img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-section) var(--ease-out); }
.work.contain figure img { object-fit: contain; padding: var(--sp-5); background: #fff; }
.work:hover figure img { transform: scale(1.04); }
.work .body { padding: var(--sp-5); display: grid; gap: var(--sp-2); }
.work .body strong { font-weight: 500; font-size: 16px; line-height: 1.382; }
.work .body span { font-size: 12.58px; color: var(--fg-2); }
.cat-head { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); align-items: baseline; justify-content: space-between; margin-bottom: var(--sp-6); }

/* project detail */
.project-hero .display { font-size: var(--fs-h1); margin-bottom: var(--sp-5); }
.facts { display: grid; gap: var(--sp-4); margin: 0; }
.facts div { display: grid; gap: var(--sp-1); }
.facts dt { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2); }
.facts dd { margin: 0; white-space: pre-line; }
.media { display: grid; gap: var(--sp-5); }
.media.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.media figure { margin: 0; }
.media figcaption { font-size: 12.58px; color: var(--fg-2); margin-top: var(--sp-3); }
.video { position: relative; width: 100%; border-radius: var(--r-card); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video button.poster { position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer; background: #000; }
.video button.poster img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: opacity var(--t-micro); }
.video button.poster:hover img { opacity: 1; }
.video button.poster span { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 89px; height: 89px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--white-rgb) / .85); color: var(--navy-950); box-shadow: 0 8px 21px rgb(0 0 0 / .3); }
.media img.still { width: 100%; border-radius: var(--r-card); background: #fff; }
.pager { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }

/* ---------- perspectives ---------- */
.themes .card h3 { font-size: 20.35px; }
.writings { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.writings li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-5); padding: var(--sp-5) 0; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 300; }
.writings li:first-child { border-top: 1px solid var(--line); }
.writings small { font-family: var(--font-body); font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2); white-space: nowrap; }

/* ---------- contact ---------- */
.form { display: grid; gap: var(--sp-5); }
.field { display: grid; gap: var(--sp-2); }
.field label { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2); font-weight: 500; }
.field input, .field textarea {
  font: inherit; color: var(--fg); background: var(--glass-fill-strong);
  border: 1px solid var(--line); border-radius: var(--r-button);
  padding: var(--sp-4) var(--sp-5); min-height: var(--touch);
  transition: border-color var(--t-micro), box-shadow var(--t-micro);
}
.field textarea { min-height: 144px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(110 195 237 / var(--o-2)); }
.form .pill { justify-self: start; min-height: var(--touch); border: 0; font: inherit; font-size: var(--fs-micro); font-weight: 500; letter-spacing: var(--tracking-micro); }
.form-note { font-size: 12.58px; color: var(--fg-2); margin: 0; }

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

/* ---------- executive home ---------- */
.site-header .brand { transition: opacity var(--t-ui) var(--ease-out); }
.hero .display { max-width: 14.6em; }
.home-hero .display { font-size: clamp(41.89px, 6.18vw, 109.67px); margin-bottom: var(--sp-7); }
.home-intro { display: grid; gap: var(--sp-5); max-width: 61.8em; }
@media (min-width: 1024px) { .home-intro { grid-template-columns: repeat(3, 1fr); gap: var(--sp-7); } }
.home-intro p { margin: 0; padding-top: var(--sp-4); border-top: 1px solid var(--line); }

.creds { display: grid; gap: 1px; background: var(--line); border-radius: var(--r-panel); overflow: hidden; border: 1px solid var(--line); }
@media (min-width: 640px) { .creds { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .creds { grid-template-columns: .8fr .8fr 1.2fr 1.2fr; } }
.cred { background: rgb(var(--bg-rgb) / .86); padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.cred .n { font-family: var(--font-display); font-weight: 200; font-size: clamp(53.28px, 6.18vw, 109.67px); line-height: 0.854; color: var(--fg-2); letter-spacing: -.04em; }
.cred .k { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2); font-weight: 500; }
.cred .t { color: var(--fg-2); font-size: 16px; line-height: 1.382; }
.cred .t.big { font-family: var(--font-display); font-size: var(--fs-h4); line-height: 1.146; color: var(--fg); font-weight: 300; }

.area-list { border-top: 1px solid var(--line); }
.area-row { display: grid; grid-template-columns: 3em 1fr auto; gap: var(--sp-1) var(--sp-4); align-items: baseline; padding: var(--sp-5) 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding var(--t-micro) var(--ease-snap); }
.area-row .num { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); color: var(--fg-2); font-weight: 500; }
.area-row .title { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 300; color: var(--fg); }
.area-row .sum { grid-column: 2; font-size: 16px; color: var(--fg-2); line-height: 1.382; }
.area-row .go { grid-row: 1; grid-column: 3; color: var(--accent); transition: transform var(--t-micro) var(--ease-snap); }
.area-row:hover { padding-left: var(--sp-3); }
.area-row:hover .go { transform: translateX(5px); }

.work-grid.feature { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
@media (min-width: 640px) { .work-grid.feature { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .work-grid.feature { grid-template-columns: repeat(4, 1fr); } .work-grid.feature figure { aspect-ratio: 4 / 5; } }

.section-links .card-link { display: grid; gap: var(--sp-3); }
.section-links img { width: 55px; height: 55px; object-fit: contain; }
.section-links strong { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 400; }
.section-links span { color: var(--fg-2); }
.work.contain figure { background: #fff; }
.chapters .chapter { gap: var(--sp-2); }

/* small screens: footer joins the page flow so it never covers copy */
@media (max-width: 899px) {
  .site-footer { position: static; flex-wrap: wrap; padding-top: var(--sp-6); border-top: 1px solid var(--line); margin: 0 var(--page-margin); padding-left: 0; padding-right: 0; }
  .copyright { white-space: nowrap; }
  .site-header { background: linear-gradient(rgb(var(--bg-rgb) / .92), rgb(var(--bg-rgb) / 0)); }
}

/* page icon beside the headline tagline */
/* icon is exactly two tagline lines tall (line-height × 2) */
.display.has-icon { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .3em; align-items: start; }
.display.has-icon .title-icon { height: calc(var(--lh-display) * 2em); width: auto; max-width: none; object-fit: contain; }
.display.has-icon .title-text { min-width: 0; }

/* readable line breaks: balanced headings, no stranded words in body copy */
h1, h2, h3, h4, .display, .display .line, .lead, .closing, .eyebrow, .card strong, .work .body strong,
.area-row .title, .count .t, .cred .t, figcaption, .chip, .pill, .qbtn { text-wrap: balance; }
p, li, dd, blockquote, td, .sum { text-wrap: pretty; }
html { hyphens: manual; -webkit-hyphens: manual; }
.display, h1, h2, h3 { overflow-wrap: normal; word-break: normal; }
.display, .h1, .closing { max-width: 17.94em; }
.lead, .copy, .copy p { max-width: 38.2em; }

/* phones: the icon floats beside the first two lines, later lines use the full width */
@media (max-width: 639px) {
  .display.has-icon, .display.has-icon.icon-middle { display: block; }
  .display.has-icon .title-icon { display: block; float: none; margin: 0 0 var(--sp-5); }
}

/* expertise: each discipline followed by its workfolio */
.discipline { border-top: 1px solid var(--line); padding-top: var(--sp-7); }
.disc-head { display: grid; gap: var(--sp-4) var(--sp-6); margin-bottom: var(--sp-7); }
@media (min-width: 900px) { .disc-head { grid-template-columns: minmax(7rem, auto) 1fr; align-items: start; } }
.disc-head .num { margin: 0; font-family: var(--font-display); font-weight: 200; font-size: var(--fs-numeral); line-height: 0.854; color: var(--deco); letter-spacing: -.04em; }
.disc-head .lead { margin-top: var(--sp-4); }
.disc-body { display: grid; gap: var(--sp-6); margin-bottom: var(--sp-7); }
@media (min-width: 900px) { .disc-body { grid-template-columns: 1.618fr 1fr; gap: var(--sp-8); } }
.disc-body .copy p { font-size: var(--fs-body-lg); line-height: 1.618; }
.focus-label { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2); font-weight: 500; margin-bottom: var(--sp-4); }
.work-label { padding-top: var(--sp-5); border-top: 1px solid var(--line); }

/* ---------- one screen per page: rails, splits, fitting media ---------- */
.rail { position: relative; }
.rail-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--rail-w, 377px); gap: var(--sp-5);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: var(--sp-2) var(--sp-1) var(--sp-5); margin: 0 calc(var(--sp-1) * -1);
  scrollbar-width: none; list-style: none;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; min-width: 0; }
.rail-track:focus-visible { outline-offset: 5px; }
.rail-nav { display: flex; gap: var(--sp-3); justify-content: flex-end; margin-top: var(--sp-2); }
.rail-nav[hidden] { display: none; }
.rail-nav button:disabled { opacity: .35; cursor: default; transform: none; }
@media (hover: none) { .rail-nav { display: none; } }

.work-rail { --rail-w: clamp(233px, 23.6vw, 377px); }
.roles { --rail-w: clamp(233px, 38.2vw, 377px); align-items: stretch; }
.roles .role { display: flex; flex-direction: column; gap: var(--sp-3); }
.roles .role .when { margin: 0; }
.roles .edu { height: 100%; }
.chapter-intro .display { font-size: var(--fs-hero); }
.media-rail { --rail-w: min(610px, 85.4vw); align-items: start; }
.media-rail.stills { --rail-w: auto; grid-auto-columns: auto; }
.media-rail.stills img.still { height: min(61.8svh, 610px); width: auto; max-width: none; }
.media.single { display: flex; justify-content: center; }
.media.single figure { width: min(100%, calc((100svh - var(--frame-top) - var(--frame-bottom) - 89px) * 16 / 9)); }

.table-scroll { max-height: calc(100svh - var(--frame-top) - var(--frame-bottom) - 144px); overflow-y: auto; padding-right: var(--sp-3); }
.table-scroll thead th { position: sticky; top: 0; background: rgb(var(--bg-rgb) / .96); z-index: 1; }
.form-grid { display: grid; gap: var(--sp-5); }
@media (min-width: 900px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .field:last-child { grid-column: 1 / -1; } .field textarea { min-height: 144px; } }
#form .form { max-width: 987px; }

/* home: the leadership list fits one screen */
.area-row { padding: var(--sp-4) 0; }
.area-row .title { font-size: clamp(16px, 1.46vw, 20.35px); }
.area-row .sum { font-size: 12.58px; }

/* phones: card collections swipe sideways instead of stacking */
@media (max-width: 639px) {
  .grid.c3, .grid.c4, .work-grid.feature, .section-links, .creds, .chapters, .counts {
    display: grid; grid-auto-flow: column; grid-auto-columns: 85.4%; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: var(--sp-4);
  }
  .grid.c3 > *, .grid.c4 > *, .work-grid.feature > *, .section-links > *, .creds > *, .chapters > *, .counts > * { scroll-snap-align: start; }
  .creds { gap: var(--sp-3); background: none; border: 0; }
  .creds .cred { border: 1px solid var(--line); border-radius: var(--r-card); }
  .counts { grid-auto-columns: 50%; }
  .disc-head .num { font-size: 53.28px; }
  .home-intro { grid-auto-flow: column; grid-auto-columns: 85.4%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .home-intro > p { scroll-snap-align: start; }
}

/* mobile: the header logo's emblem stays still */
@media (max-width: 899px), (hover: none) and (pointer: coarse) {
  .brand .emblem, .brand:hover .emblem, .brand:focus-visible .emblem { animation: none !important; transform: none; }
}

/* fit tweaks */
.roles .role, .roles .edu, .roles .honour-card { padding: var(--sp-5); font-size: 16px; line-height: 1.618; }
.roles .role h4 { font-size: 16px; }
.roles .edu .year, .honour-card .year { font-size: var(--fs-h4); margin-bottom: var(--sp-3); display: block; font-family: var(--font-display); font-weight: 300; color: var(--deco); }
.honour-card h3 { margin: var(--sp-2) 0; }
.photo-story.card.lg { padding: var(--sp-6); }
.photo-story .copy p { font-size: 16px; }
.project-hero .copy p { font-size: 16px; line-height: 1.618; }
.facts-row { display: grid; gap: var(--sp-5); }
@media (min-width: 900px) { .facts-row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.story { max-width: 38.2em; }
.story p:first-child { font-size: var(--fs-body-lg); color: var(--fg-2); }
#form .form { padding: var(--sp-6); gap: var(--sp-4); }
#form .form .h1 { font-size: var(--fs-sub); }
.table-scroll { max-height: calc(100svh - var(--frame-top) - var(--frame-bottom) - 233px); }
@media (max-width: 899px) {
  :root { --frame-top: var(--sp-8); --frame-bottom: var(--sp-5); }
  .table-scroll { max-height: calc(100svh - var(--frame-top) - var(--frame-bottom) - 233px); }
}
@media (max-width: 639px) {
  .area-list { display: grid; grid-auto-flow: column; grid-auto-columns: 85.4%; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border: 0; }
  .area-list .area-row { scroll-snap-align: start; border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-5); }
  .gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 61.8%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .gallery img { scroll-snap-align: start; }
  .gallery img:first-child:nth-last-child(odd) { grid-column: auto; }
}

/* About: the emblem sits centred against the tagline lines */
/* desktop: every page icon is centred top-to-bottom against its tagline */
@media (min-width: 640px) { .display.has-icon { align-items: center; } }

/* opening page: tagline and paragraphs beside the portrait, which stands on the bottom edge */
.panel.home { position: relative; overflow: hidden; }
.home-hero { display: grid; gap: var(--sp-6); align-items: end; }   /* both columns share one bottom line */
.home-copy { align-self: end; padding-bottom: 0; }
.home-hero .display { font-size: clamp(32.94px, 3.82vw, 67.78px); margin-bottom: var(--sp-6); }
.home-hero .home-intro { display: grid; gap: var(--sp-4); max-width: 38.2em; grid-template-columns: none; }
.home-hero .home-intro p { margin: 0; padding: 0; border: 0; font-size: clamp(16px, 1.46vw, 20.35px); line-height: 1.618; color: var(--fg); }
.portrait { margin: 0; align-self: end; justify-self: end; transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.portrait img { display: block; height: min(calc(100svh - var(--frame-top) - var(--frame-bottom)), 987px); width: auto; max-width: 100%; object-fit: contain; object-position: bottom; }
@media (min-width: 900px) { .home-hero { grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); } }
[data-tone="dark"] .portrait img { filter: brightness(1.05) contrast(1.02); }
html.splash-running .portrait, html.splash-running .home-intro > p { opacity: 0; transform: translateY(13px); }
.home-intro > p { transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
@media (max-width: 899px) {
  .home-hero { grid-template-rows: auto auto; min-height: 0; }
  .portrait { order: -1; justify-self: center; }
  .portrait img { height: 23.6svh; }
  .home-copy { padding-bottom: var(--sp-6); }
  .home-hero .home-intro { grid-auto-flow: column; grid-auto-columns: 85.4%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
}

/* top menu hover: the contrast fill grows out from where the cursor enters, every hover */
.qbtn { isolation: isolate; transition: color var(--t-micro) var(--ease-out), border-color var(--t-micro) var(--ease-out), transform 0.382s var(--ease-out), box-shadow var(--t-micro); }
.qbtn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--btn-bg);
  clip-path: circle(0% at var(--hx) var(--hy));
  transition: clip-path var(--t-micro) var(--ease-out);
}
.qbtn::before { z-index: 0; }
.qbtn > span { z-index: 1; }
.qbtn:hover, .qbtn:focus-visible { color: var(--btn-fg); border-color: transparent; }
.qbtn:hover::after, .qbtn:focus-visible::after { clip-path: circle(150% at var(--hx) var(--hy)); transition-duration: var(--t-ui); }
.qbtn:hover::before { opacity: .382; mix-blend-mode: soft-light; }
@media (prefers-reduced-motion: reduce) { .qbtn::after { transition: none; } }

/* desktop: the logo hover reveals the menu, so the menu button is not needed */
@media (min-width: 1200px) and (hover: hover) {
  .header-actions [data-menu-open] { display: none; }
}

/* phones: tagline, then the portrait, then the paragraphs */
@media (max-width: 899px) {
  .home-hero { display: flex; flex-direction: column; gap: 0; }
  .home-copy { display: contents; }
  .home-hero .display { order: 1; margin-bottom: var(--sp-5); }
  .portrait { order: 2; align-self: center; margin: 0 0 var(--sp-5); }
  .home-hero .home-intro { order: 3; }
}

/* ===================== round: emblems, groups, transitions ===================== */

/* emblem stroke fills the empty side of every section, alternating sides as you scroll.
   Size: 61.8% of the screen height. Centre on a golden line (38.2% / 61.8% down),
   with 38.2% of the emblem bleeding off the edge. One turn counter-clockwise every 12 s. */
.ambient img { display: none; }
main > .panel { position: relative; isolation: isolate; overflow-x: clip; --emb-s: min(61.8svh, 85.4vw); }
main > .panel::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: var(--emb-s); aspect-ratio: 1;
  right: calc(var(--emb-s) * -0.618); top: calc(100% - var(--emb-s) / 2);   /* centred on the seam with the next page */
  background: url("../brand/emblem-stroke-02.svg") center / contain no-repeat;
  opacity: calc(var(--emblem-opacity) * .618);
  animation: emblem-fill 12s linear infinite;
}
main > .panel:nth-of-type(even)::before { right: auto; left: calc(var(--emb-s) * -0.618); }
main > .panel:last-of-type::before { display: none; }       /* nothing after the last page to bridge */
main { overflow: clip; }
@keyframes emblem-fill { to { rotate: -360deg; } }

/* top menu buttons: no lean toward the cursor; the glow still follows it, 20% stronger */
.magnetic, .magnetic > span { transform: none !important; }
.magnetic::before { background: radial-gradient(circle at var(--hx) var(--hy), rgb(var(--white-rgb) / 1), rgb(110 195 237 / .42) 54%, transparent 90%); }
[data-tone="dark"] .magnetic::before { background: radial-gradient(circle at var(--hx) var(--hy), rgb(110 195 237 / .66), rgb(110 195 237 / .146) 60%, transparent 94%); }
.qbtn:hover::before { opacity: .458; }

/* About: sideways groups, one page tall */
.hgroup { position: relative; }
.h-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; cursor: grab;
}
.h-track::-webkit-scrollbar { display: none; }
.h-track.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.h-track:focus-visible { outline-offset: 8px; }
.h-slide { scroll-snap-align: start; scroll-snap-stop: always; min-width: 0; padding: var(--sp-3) var(--sp-1); }
.h-slide .principle .copy p:first-child { font-size: var(--fs-body-lg); line-height: 1.382; color: var(--fg-2); }


.h-dots { display: flex; justify-content: center; gap: var(--sp-4); margin-top: var(--sp-6); }
.h-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--fg-2); opacity: var(--o-2); cursor: pointer; transition: width var(--t-micro) var(--ease-snap), opacity var(--t-micro); }
.h-dot[aria-current="true"] { width: 34px; opacity: 1; background: var(--accent); }
.h-dot:hover { opacity: 1; }

/* second group in the contrast shade (the opposite tone of the page) */
.panel.contrast { background: var(--bg); color: var(--fg); }

/* Designing with Purpose: big bold numbers behind the boxes — 2 parts showing above, 1 part behind */
.steps { display: grid; gap: var(--sp-5); margin-top: var(--sp-6); --num: clamp(89px, 9.02vw, 177.45px); }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding-top: calc(var(--num) * .72 * 2 / 3); }
.step-num {
  position: absolute; top: 0; left: var(--sp-5); z-index: 0;
  font-family: var(--font-display); font-weight: 700; font-size: var(--num); line-height: .72;
  color: var(--deco); letter-spacing: -.04em; pointer-events: none;
}
.step .card { position: relative; z-index: 1; height: 100%; }
.step .card strong { display: block; font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 400; margin-bottom: var(--sp-3); }

/* page change veil: page colour with the solid emblem, navy in light mode, sky in dark mode */
html.veil::before, html.veil::after { content: ""; position: fixed; pointer-events: none; z-index: 300; opacity: 0; }
html.veil::before { inset: 0; background: var(--bg); transition: opacity var(--t-micro) var(--ease-phi); }
html.veil::after {
  --veil-s: min(377px, 61.8vw);
  left: 50%; top: 50%; width: var(--veil-s); height: var(--veil-s); margin: calc(var(--veil-s) / -2) 0 0 calc(var(--veil-s) / -2); z-index: 301;
  background: url("../brand/emblem-solid-navy.svg") center / contain no-repeat;
  transform: scale(.618) rotate(0deg);
  transition: opacity var(--t-micro) var(--ease-phi), transform var(--t-ui) var(--ease-out);
}
html[data-tone="dark"].veil::after { background-image: url("../brand/emblem-solid-sky.svg"); }
html.veil.veil-hold::before, html.veil.veil-hold::after { opacity: 1; }
html.veil.veil-hold::after { transform: scale(1) rotate(-180deg); }
html.veil.veil-out::after { transform: scale(.618) rotate(-360deg); }
@media (max-width: 899px), (hover: none) and (pointer: coarse) { html.veil::after { transform: none !important; } }

/* header and footer: semi-solid page colour fading gradually; whatever scrolls beneath is blurred */
.site-header, .site-footer { isolation: isolate; }
.site-header::before, .site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; z-index: -1; pointer-events: none;
  -webkit-backdrop-filter: blur(var(--blur-card)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur-card)) saturate(var(--saturate));
}
.site-header::before {
  top: 0; bottom: calc(var(--sp-6) * -1);
  background: linear-gradient(to bottom, rgb(var(--bg-rgb) / .854) 0%, rgb(var(--bg-rgb) / .618) 61.8%, rgb(var(--bg-rgb) / 0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 61.8%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 61.8%, transparent 100%);
}
.site-footer::before {
  bottom: 0; top: calc(var(--sp-6) * -1);
  background: linear-gradient(to top, rgb(var(--bg-rgb) / .854) 0%, rgb(var(--bg-rgb) / .618) 61.8%, rgb(var(--bg-rgb) / 0) 100%);
  -webkit-mask-image: linear-gradient(to top, #000 61.8%, transparent 100%);
  mask-image: linear-gradient(to top, #000 61.8%, transparent 100%);
}
@media (max-width: 899px) {
  .site-header { background: none; }
  .site-footer::before { display: none; }      /* the phone footer sits at the end of the page, not over content */
}

/* Journey: chapter cards that invite a click — stacked edges peek behind, a pulsing ⊕ in the corner */
.chapter-card {
  position: relative; cursor: pointer; border-radius: var(--r-panel);
  padding: var(--sp-7) var(--sp-7) var(--sp-8); max-width: 61.8em;
  transition: transform var(--t-ui) var(--ease-out), box-shadow var(--t-ui) var(--ease-out);
}
.chapter-card::before, .chapter-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--glass-fill); border: 1px solid var(--glass-rim);
  transition: transform var(--t-ui) var(--ease-out), opacity var(--t-ui) var(--ease-out);
}
.chapter-card::before { transform: translate(var(--sp-4), var(--sp-4)); opacity: .618; }
.chapter-card::after  { transform: translate(var(--sp-5), var(--sp-5)) scale(.982); opacity: .382; }
.chapter-card:hover { transform: translateY(-5px); box-shadow: 0 34px 89px rgb(var(--shadow-rgb) / var(--o-3)), inset 0 0 0 1px var(--accent); }
.chapter-card:hover::before { transform: translate(var(--sp-5), var(--sp-5)); }
.chapter-card:hover::after  { transform: translate(var(--sp-6), var(--sp-6)) scale(.982); }
.chapter-card .display { font-size: var(--fs-hero); margin-bottom: var(--sp-6); }
.chapter-card .copy p:last-child { margin-bottom: 0; }
.open-cue {
  position: absolute; right: var(--sp-6); bottom: var(--sp-6);
  width: 55px; height: 55px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 8px 21px rgb(var(--shadow-rgb) / var(--o-3));
  animation: cue-pulse 2.618s var(--ease-phi) infinite;
  transition: transform var(--t-micro) var(--ease-snap);
}
.open-cue svg { width: 21px; height: 21px; transition: transform var(--t-ui) var(--ease-out); }
.open-cue::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--accent); animation: cue-ring 2.618s var(--ease-out) infinite; }
.chapter-card:hover .open-cue { animation: none; transform: scale(1.146); }
.chapter-card:hover .open-cue svg { transform: rotate(90deg); }
@keyframes cue-pulse { 0%, 61.8%, 100% { transform: scale(1); } 76.4% { transform: scale(1.09); } }
@keyframes cue-ring { 0%, 38.2% { transform: scale(1); opacity: .618; } 100% { transform: scale(1.618); opacity: 0; } }
@media (max-width: 639px) {
  .chapter-card { padding: var(--sp-6) var(--sp-5) var(--sp-8); }
  .chapter-card .display { font-size: var(--fs-h1); }
  .open-cue { right: var(--sp-5); bottom: var(--sp-5); }
}
@media (prefers-reduced-motion: reduce) { .open-cue, .open-cue::after { animation: none; } }

/* the detail sheet (3.1 – 3.4) */
.sheet {
  width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(var(--bg-rgb) / .854); color: var(--fg);
  -webkit-backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate));
  overflow-y: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgb(var(--bg-rgb) / .382); }
.sheet[open] { animation: sheet-in var(--t-ui) var(--ease-out); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(8.9%); } to { opacity: 1; transform: none; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(5.5%); } }
.sheet-inner { padding-top: var(--sp-8); padding-bottom: var(--sp-8); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--sp-5); margin-bottom: var(--sp-6); }
.sheet-extra { margin-top: var(--sp-7); }
html.sheet-open { overflow: hidden; }

/* every sideways scroll: 0.5 s glimpse on arrival, 0.5 s spring-back at the end */
.h-track.end-bump > *, .rail-track.end-bump > * { animation: h-end .5s var(--ease-out) 1; }
@keyframes h-end { 0%, 100% { transform: none; } 38.2% { transform: translateX(-21px); } }

/* Expertise: the discipline, then its Workfolio cards, in one sideways row */
.h-track.mixed { display: flex; gap: var(--sp-5); align-items: center; }
.h-track.mixed > .h-slide { flex: 0 0 100%; }
.h-track.mixed > .work { flex: 0 0 clamp(233px, 23.6vw, 377px); scroll-snap-align: start; }
.h-track.mixed > .work:last-child { margin-right: var(--sp-1); }
.hpanel .discipline { border-top: 0; padding-top: 0; }
@media (max-width: 639px) { .h-track.mixed > .work { flex-basis: 85.4%; } }

/* top menu: a larger hover zone, and a short grace period before it hides */
.quicknav { padding: var(--sp-5) var(--sp-6) var(--sp-5) var(--sp-4); pointer-events: auto; visibility: hidden; transition: visibility 0s linear .618s; }
.brandbar:hover .quicknav, .brandbar:focus-within .quicknav { visibility: visible; transition-delay: 0s; }
.brandbar::after { content: ""; position: absolute; left: 0; right: 0; top: calc(var(--sp-5) * -1); bottom: calc(var(--sp-5) * -1); z-index: -1; }
.quicknav li { transition: opacity .382s var(--ease-out) .236s, transform .382s var(--ease-out) .236s; }

/* Designing with Purpose: numbers to the left of each box, same size —
   2/3 of the digit shows beside the box, 1/3 sits behind it */
.step { display: flex; padding-top: 0; padding-left: calc(var(--num) * var(--w, .48) * 2 / 3); }
.step-num { top: 50%; left: 0; transform: translateY(-50%); }
.step .card { flex: 1; }

/* mobile menu: no numbering, buttons aligned near the top */
@media (max-width: 899px) {
  .menu { place-items: start; align-content: start; padding-top: calc(var(--frame-top) + var(--sp-5)); }
  .menu a::before { content: none; display: none; }
}

/* phones and tablets: a 0.5 s glimpse of the next items when a sideways row comes into view */
.h-track.nudge > *, .rail-track.nudge > * { animation: h-nudge .5s var(--ease-phi) 1; }
@keyframes h-nudge { 0%, 100% { transform: none; } 50% { transform: translateX(-55px); } }

/* About: the tagline (each statement on two lines, more space between statements) and the story on one page */
.about-hero { display: grid; gap: var(--sp-6) var(--sp-8); align-items: center; }
@media (min-width: 900px) { .about-hero { grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); } }
.about-hero .display { font-size: clamp(41.89px, 4.7vw, 67.78px); }
.stmts .stmt { display: block; }
.stmts .stmt + .stmt { margin-top: 0; }                 /* same leading as Perspectives */
.about-story .copy p { font-size: var(--fs-body); }
.about-story .closing { font-size: var(--fs-h4); margin-top: var(--sp-5); max-width: none; }
@media (max-width: 639px) {
  .stmts .stmt, .stmts .line { display: block; }
  .stmts .line::after { content: none !important; }
}

/* About tagline: each statement on one line, on phones too */
.stmts .line { white-space: nowrap; }
@media (max-width: 639px) { .display.stmts { font-size: min(32.94px, 8.5vw); } }

/* Designing with Purpose: numbers in a clearer shade, their top aligned with the top of each box's title */
.step-num { top: var(--num-top, var(--sp-6)); transform: none; color: var(--accent); }
.step .card { padding-top: var(--sp-6); }
.step { --num-top: calc(var(--sp-6) + var(--fs-h4) * .48); }   /* number's cap line = title's cap line */

/* About landing: the story runs wider (61.8em) so the page fits one screen without scrolling */
.about-copy, .about-copy p, .about-copy .lead { max-width: 61.8em; }

/* header and footer backdrops: shorter, fully faded before the page content begins */
.site-header::before { top: 0; bottom: var(--sp-5); }      /* ends ~65px down; content starts at 89px */
.site-footer::before { bottom: 0; top: var(--sp-5); }      /* starts below the footer's top edge */

/* home portrait: enters from the right (after the opening, or on any visit) */
.panel.home .portrait { animation: portrait-in 1s var(--ease-out) .382s both; transition: none; }
@keyframes portrait-in { from { opacity: 0; transform: translateX(14.6%); } to { opacity: 1; transform: none; } }
html.splash-running .panel.home .portrait { animation: none; opacity: 0; transform: translateX(14.6%); }

/* sideways groups: wider separation so no neighbouring slide shows at the edges */
.h-track { column-gap: var(--sp-8); }
.h-track.mixed { column-gap: var(--sp-5); }
.h-track.mixed > .h-slide { margin-right: var(--sp-7); }

/* darker boxes: Designing with Purpose steps and Building Together */
:root, [data-tone="light"] { --dark-card-bg: var(--navy-900); --dark-card-fg: var(--sky-50); --dark-card-fg-2: var(--sky-200); }
[data-tone="dark"] { --dark-card-bg: var(--navy-800); --dark-card-fg: var(--sky-50); --dark-card-fg-2: var(--sky-200); }
.card.glass.dark-card {
  background: var(--dark-card-bg); color: var(--dark-card-fg);
  border-color: rgb(var(--white-rgb) / var(--o-4));
  box-shadow: 0 34px 89px rgb(var(--shadow-rgb) / var(--o-3));
}
.dark-card strong, .dark-card .h3, .dark-card h3 { color: var(--dark-card-fg); }
.dark-card p { color: var(--dark-card-fg-2); }

/* Designing with Purpose: 3/5 of each number shows beside its box */
.step { padding-left: calc(var(--num) * var(--w, .48) * 3 / 5); }

/* the page colour lives on <html>; a transparent <body> lets the background layers (glow, landscape) show */
body { background: transparent; }

/* ===================== Journey: four career levels in depth ===================== */
.page-journey main > .panel::before { display: none; }          /* the mountains replace the emblem fillers here */
.landscape, .sheet-scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.landscape { position: fixed; z-index: -1; }
.ridge {
  position: absolute; left: 50%; top: 0; width: 400%; height: 200%; margin-left: -200%;
  transform-origin: 50% 50%; will-change: transform, opacity; --hz: 0%;
}
.ridge svg { display: block; width: 100%; height: 100%; }
.ridge .st-top { stop-color: var(--ta); stop-color: color-mix(in oklab, var(--ta), var(--tb) var(--m, 0%)); }
.ridge .st-bottom { stop-color: var(--ba); stop-color: color-mix(in oklab, var(--ba), var(--bb) var(--m, 0%)); }

/* each level's name stands on its summit */
.ridge-tags { position: absolute; inset: 0; }
@media (max-width: 639px) { .ridge-tags { display: none; } }   /* phones: the cards fill the width; the dots carry the navigation */
.ridge-tag {
  position: absolute; left: 0; top: 0; transform-origin: 50% 100%; pointer-events: auto; cursor: pointer;
  display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-3); border: 0; background: none; font: inherit;
  will-change: transform, opacity;
}
.ridge-tag .wp-label {
  font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); text-transform: uppercase; font-weight: 500; white-space: nowrap;
  color: var(--fg-2); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill);
  background: var(--glass-fill-strong); border: 1px solid var(--glass-rim);
  -webkit-backdrop-filter: blur(var(--blur-card)); backdrop-filter: blur(var(--blur-card));
  transition: background-color var(--t-micro), color var(--t-micro);
}
.ridge-tag .wp-stem { width: 1px; height: 21px; background: linear-gradient(var(--fg-2), transparent); opacity: .618; }
.ridge-tag .wp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg); border: 2px solid var(--fg-2); position: relative; }
.ridge-tag.reached .wp-dot { background: var(--accent); border-color: var(--accent); }
.ridge-tag.here .wp-label { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; }
.ridge-tag.here .wp-dot::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--accent); animation: wp-pulse 1.618s var(--ease-out) 2; }
.ridge-tag:hover .wp-label, .ridge-tag:focus-visible .wp-label { color: var(--fg); }
.ridge-tag.here:hover .wp-label { color: var(--btn-fg); }
@keyframes wp-pulse { from { transform: scale(1); opacity: .854; } to { transform: scale(2.618); opacity: 0; } }

/* pages hold still and travel in depth instead: the next one comes from the distance, the last one passes by */
.page-journey main, .page-journey main > .panel, .page-journey main > .panel > .wrap { pointer-events: none; }
.page-journey main > .panel > .wrap > *, .page-journey main dialog { pointer-events: auto; }
.page-journey main > .panel.z-away > .wrap > * { pointer-events: none; }
.page-journey .chapter-card { background: var(--glass-fill-strong); }

/* the detail sheet (3.1 – 3.4): a box with the same climb inside; the page around it blurs */
.sheet {
  width: min(1597px, calc(100% - 2 * var(--sp-7))); height: calc(100% - 2 * var(--sp-7)); max-width: none; max-height: none;
  margin: auto; padding: 0; border: 1px solid var(--glass-rim); border-radius: var(--r-panel); overflow: hidden;
  background: rgb(var(--bg-rgb) / .854); color: var(--fg);
  box-shadow: 0 34px 144px rgb(var(--shadow-rgb) / var(--o-3));
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.sheet[open] { display: flex; flex-direction: column; animation: none; }
.sheet::backdrop {
  background: rgb(var(--bg-rgb) / .236);
  -webkit-backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate)); backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate));
}
.sheet-scene { z-index: 0; }
.sheet-head, .sheet-body { position: relative; z-index: 1; }
.sheet-head { flex: none; margin: 0; padding: var(--sp-7) var(--sp-7) var(--sp-5); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sheet-inner { padding: var(--sp-3) var(--sp-7) 38.2svh; }
.sheet-inner > *, .sheet-extra > * { transform-origin: 50% 50%; }
.sheet-extra { margin-top: var(--sp-7); }
.honour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.94em), 1fr)); gap: var(--sp-5); }
.sheet .card.glass, .sheet .role { background: var(--glass-fill-strong); }
@media (max-width: 639px) {
  .sheet { width: calc(100% - 2 * var(--sp-4)); height: calc(100% - 2 * var(--sp-4)); }
  .sheet-head { padding: var(--sp-6) var(--sp-5) var(--sp-4); }
  .sheet-inner { padding: var(--sp-2) var(--sp-5) 38.2svh; }
}
@media (prefers-reduced-motion: reduce) { .ridge-tag.here .wp-dot::after { animation: none; } }

/* ---------- Journey, second pass ---------- */
/* the earlier dune colours: near ridges deep blue, far ones pale; each ridge takes the colour of where it stands */
:root, [data-tone="light"] {
  --dune-0-top: var(--sky-100); --dune-0-bottom: var(--sky-50);
  --dune-1-top: var(--sky-200); --dune-1-bottom: var(--sky-100);
  --dune-2-top: var(--sky-400); --dune-2-bottom: var(--sky-200);
  --dune-3-top: var(--blue-500); --dune-3-bottom: var(--navy-700);
}
[data-tone="dark"] {
  --dune-0-top: var(--navy-900); --dune-0-bottom: var(--navy-950);
  --dune-1-top: var(--navy-800); --dune-1-bottom: var(--navy-900);
  --dune-2-top: var(--navy-700); --dune-2-bottom: var(--navy-800);
  --dune-3-top: var(--blue-600); --dune-3-bottom: var(--navy-900);
}

/* pages are pinned to the screen; only their depth changes, so the motion never fights the scroll */
html:not(.no-js) .page-journey main > .panel > .wrap {
  position: fixed; left: 0; right: 0; top: var(--frame-top); bottom: var(--frame-bottom);
  display: flex; flex-direction: column; justify-content: center;
  transform-origin: 50% 50%; visibility: hidden;
}
html:not(.no-js) .page-journey main > .panel.z-on > .wrap { visibility: visible; }

/* frosted boxes: whatever passes behind them softens, the copy stays crisp */
.page-journey .chapter-card, .sheet .card.glass, .sheet .role {
  background: var(--glass-fill-strong);
  -webkit-backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate));
}

/* the sheet opens out of the card that was clicked */
.sheet[open]::backdrop { animation: veil-fade var(--t-ui) var(--ease-out); }
@keyframes veil-fade { from { opacity: 0; } }
.chapter-card.is-source { visibility: hidden; }

/* sky detail: minute stars at night, a few soft clouds by day */
.sky { position: absolute; inset: 0 0 38.2% 0; pointer-events: none; }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.stars circle { fill: var(--sky-50); }
.stars .tw { animation: twinkle 5s var(--ease-phi) infinite; }
@keyframes twinkle { 0%, 61.8%, 100% { opacity: .236; } 80.9% { opacity: 1; } }
[data-tone="dark"] .stars { display: block; }
.clouds { position: absolute; inset: 0; overflow: hidden; }
.cloud {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: calc(var(--w) * .236);
  border-radius: 50%; opacity: var(--o); filter: blur(13px);
  background: radial-gradient(closest-side, rgb(255 255 255 / .854), rgb(255 255 255 / 0));
  animation: drift var(--d) linear infinite alternate;
}
.cloud::before, .cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.cloud::before { width: 55%; height: 161.8%; left: 14.6%; top: -61.8%; }
.cloud::after { width: 38.2%; height: 123.6%; left: 50%; top: -38.2%; }
@keyframes drift { to { transform: translateX(14.6vw); } }
[data-tone="dark"] .clouds { display: none; }
@media (prefers-reduced-motion: reduce) { .cloud, .stars .tw { animation: none; } }

/* Foundations: each degree is a certificate; a click turns it over */
.rail-track.certs { perspective: 1597px; }
.cert { height: 377px; cursor: pointer; outline: none; perspective: 1597px; }
.cert-inner { position: relative; height: 100%; transform-style: preserve-3d; transition: transform 1s var(--ease-out); }
.cert.flipped .cert-inner { transform: rotateY(-180deg); }
.cert-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--r-card); padding: var(--sp-7) var(--sp-6); overflow: hidden;
  background: linear-gradient(160deg, #ffffff 0%, var(--sky-50) 61.8%, var(--sky-100) 100%); color: var(--navy-900);
  box-shadow: 0 21px 55px rgb(var(--shadow-rgb) / var(--o-3));
}
[data-tone="dark"] .cert-face { background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 61.8%, var(--navy-950) 100%); color: var(--sky-50); }
.cert-face::before, .cert-face::after { content: ""; position: absolute; pointer-events: none; border-radius: calc(var(--r-card) - 5px); }
.cert-face::before { inset: var(--sp-3); border: 1px solid var(--blue-500); opacity: .618; }
.cert-face::after { inset: var(--sp-4); border: 1px solid var(--blue-500); opacity: .236; }
.cert-front { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--sp-4); }
.cert-front .cert-year { font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); color: var(--blue-500); font-weight: 500; }
.cert-title { font-family: var(--font-display); font-weight: 300; font-size: var(--fs-h3); line-height: 1.146; color: inherit; max-width: 11.09em; }
.cert-inst { font-size: 12.58px; line-height: 1.618; opacity: .854; max-width: 23.6em; margin: 0; }
.cert-back { transform: rotateY(180deg); display: flex; flex-direction: column; gap: var(--sp-3); font-size: 16px; line-height: 1.618; overflow-y: auto; scrollbar-width: none; }
.cert-back .cert-year { font-family: var(--font-display); font-weight: 300; font-size: var(--fs-h4); color: var(--blue-500); line-height: 1; }
.cert-back .h3 { color: inherit; margin: 0; }
.cert-back .meta { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); font-size: 12.58px; opacity: .854; margin: 0; }
.cert-back p { margin: 0; }
.cert-link { font-size: 12.58px; opacity: .618; }
.cert-cue { position: absolute; right: var(--sp-5); bottom: var(--sp-5); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--btn-bg); color: var(--btn-fg); transition: transform var(--t-ui) var(--ease-out); z-index: 1; }
.cert-cue svg { width: 16px; height: 16px; }
.cert:hover .cert-cue, .cert:focus-visible .cert-cue { transform: rotate(-180deg) scale(1.146); }
.cert:focus-visible .cert-face { box-shadow: 0 0 0 2px var(--focus), 0 21px 55px rgb(var(--shadow-rgb) / var(--o-3)); }
.cert:hover .cert-inner { transform: rotateY(-8deg); }
.cert.flipped:hover .cert-inner { transform: rotateY(-172deg); }
.cert.dim { opacity: .6; }              /* the other certificates step back by 40% */
@media (max-width: 639px) { .cert { height: 377px; } .cert-face { padding: var(--sp-6) var(--sp-5); } }
@media (prefers-reduced-motion: reduce) { .cert-inner { transition: none; } }

/* accolades follow the chosen degree */
.accolades [data-cert].off { display: none; }
.accolades [data-cert].arrive { animation: arrive var(--t-reveal) var(--ease-out) both; }
@keyframes arrive { from { opacity: 0; transform: scale(.854); } }

/* section dots: titles on a filled, bordered pill so each one reads over anything */
.dots .label {
  padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill); font-weight: 500; color: var(--fg);
  background: var(--glass-fill-strong); border: 1px solid var(--glass-rim);
  background: rgb(var(--bg-rgb) / .92);
  box-shadow: 0 8px 21px rgb(var(--shadow-rgb) / var(--o-3));
  -webkit-backdrop-filter: blur(var(--blur-card)); backdrop-filter: blur(var(--blur-card));
}
.dots a[aria-current="true"] .label { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.dots .label:empty { display: none; }
@media (hover: none) { .dots a.flash .label { opacity: 1; transform: none; } }
@media (max-width: 899px) {
  .dots { display: flex; right: var(--sp-3); gap: var(--sp-4); }
  .dots .dot { width: 5px; height: 5px; opacity: var(--o-1); }
  .dots .label { font-size: 12.58px; }
}

/* ---------- Journey, third pass ---------- */
/* dark mode: boxes sit darker than the night sky so the copy reads as clearly as in light mode */
[data-tone="dark"] .page-journey .chapter-card,
[data-tone="dark"] .sheet .card.glass, [data-tone="dark"] .sheet .role { background: rgb(var(--navy-rgb) / .854); }
[data-tone="dark"] .sheet { background: rgb(var(--navy-rgb) / .618); }

/* the stack behind each chapter card shows how many chapters are still to read: 4, 3, 2, then 1 */
.page-journey .chapter-card::before, .page-journey .chapter-card::after { display: none; }
.chapter-card .edge {
  position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: var(--glass-fill-strong); border: 1px solid rgb(var(--navy-rgb) / .146);
  box-shadow: 0 13px 34px rgb(var(--shadow-rgb) / var(--o-4));
  transform: translate(calc(var(--i) * 13px), calc(var(--i) * 13px)) scale(calc(1 - var(--i) * .009));
  opacity: calc(1 - var(--i) * .2);
  /* only the strip that peeks out below and to the right of the layer in front shows, like real stacked sheets */
  clip-path: polygon(calc(100% - 15px) -34px, calc(100% + 34px) -34px, calc(100% + 34px) calc(100% + 34px), -34px calc(100% + 34px), -34px calc(100% - 15px), calc(100% - 15px) calc(100% - 15px));
  transition: transform var(--t-ui) var(--ease-out);
}
[data-tone="dark"] .chapter-card .edge { background: rgb(var(--navy-rgb) / .786); border-color: rgb(var(--sky-rgb) / .236); }
.chapter-card:hover .edge { transform: translate(calc(var(--i) * 16px), calc(var(--i) * 16px)) scale(calc(1 - var(--i) * .009)); }

/* certificates: frosted paper, the stroke emblem filling 3/5 of the face, flush right, still */
.cert-face {
  background: linear-gradient(160deg, rgb(var(--white-rgb) / .786) 0%, rgb(var(--sky-rgb) / .618) 100%);
  -webkit-backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate));
  backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate));
  border: 1px solid var(--glass-rim);
}
[data-tone="dark"] .cert-face { background: linear-gradient(160deg, rgb(var(--navy-rgb) / .786) 0%, rgb(var(--navy-rgb) / .92) 100%); }
.cert-front { align-items: flex-start; text-align: left; justify-content: center; padding-right: 38.2%; }
.cert-front > :not(.cert-mark):not(.cert-cue) { position: relative; z-index: 1; }
.cert-mark {
  position: absolute; right: 0; top: 50%; width: 60%; aspect-ratio: 1; transform: translate(14.6%, -50%);
  opacity: .382; pointer-events: none; z-index: 0;
}
.cert-title { max-width: none; }

/* go to the top: appears once you are two screens down */
.to-top {
  position: fixed; right: var(--sp-5); bottom: calc(var(--frame-bottom) + var(--sp-3)); z-index: 31;
  opacity: 0; visibility: hidden; transform: translateY(13px);
  transition: opacity var(--t-ui) var(--ease-out), transform var(--t-ui) var(--ease-out), visibility 0s linear var(--t-ui);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top.show:hover { transform: translateY(-2px); }
html.sheet-open .to-top, html.menu-open .to-top { opacity: 0; visibility: hidden; }
@media (max-width: 899px) { .to-top { right: var(--sp-4); bottom: var(--sp-5); } }

/* ---------- Journey, fourth pass ---------- */
/* boxes inside the detail views: 25% darker, still translucent so the dunes blur through */
.sheet .card.glass, .sheet .role {
  background: color-mix(in oklab, rgb(var(--white-rgb) / .618), rgb(var(--navy-rgb) / .618) 25%);
}
[data-tone="dark"] .sheet .card.glass, [data-tone="dark"] .sheet .role {
  background: color-mix(in oklab, rgb(var(--navy-rgb) / .786), rgb(0 0 0 / .786) 25%);
}

/* certificate backs: only what the front doesn't say, on the contrast colour */
.cert-back {
  background: rgb(var(--navy-rgb) / .92); color: var(--sky-50);
  justify-content: center; gap: var(--sp-4);
}
.cert-back::before, .cert-back::after { border-color: var(--sky-200); }
.cert-back .meta { color: var(--sky-200); opacity: 1; }
.cert-back .cert-link { color: var(--sky-200); opacity: .854; }
[data-tone="dark"] .cert-back { background: rgb(var(--sky-rgb) / .94); color: var(--navy-950); }
[data-tone="dark"] .cert-back::before, [data-tone="dark"] .cert-back::after { border-color: var(--navy-700); }
[data-tone="dark"] .cert-back .meta, [data-tone="dark"] .cert-back .cert-link { color: var(--navy-700); }
.cert-back .cert-cue { background: var(--sky-200); color: var(--navy-950); }
[data-tone="dark"] .cert-back .cert-cue { background: var(--navy-800); color: var(--sky-50); }

/* after a certificate turns, the boxes below light their borders in, hinting there is more to read */
.accolades [data-cert].arrive { animation: arrive var(--t-reveal) var(--ease-out) both, edge-hint 2.618s var(--ease-out) .382s both; }
@keyframes edge-hint {
  0% { box-shadow: inset 0 0 0 1px transparent; border-color: var(--glass-rim); }
  23.6% { box-shadow: inset 0 0 0 1.5px var(--accent); border-color: var(--accent); }
  100% { box-shadow: inset 0 0 0 1px rgb(var(--fg-rgb) / .146); border-color: rgb(var(--fg-rgb) / .236); }
}

/* the softening stays inside each box: no drop-shadow haze spilling around Journey boxes */
.page-journey .chapter-card, .page-journey .chapter-card:hover, .chapter-card .edge,
.sheet .card.glass, .sheet .role, .sheet .photo-story, .cert-face, .sheet {
  box-shadow: inset 0 1px 0 var(--glass-spec);
}
.page-journey .chapter-card:hover { box-shadow: inset 0 0 0 1px var(--accent), inset 0 1px 0 var(--glass-spec); }
.cert:focus-visible .cert-face { box-shadow: 0 0 0 2px var(--focus); }

/* internal Journey pages: the page around the box stays clear and intact (no blur, no veil);
   the box shows its own crisp sky and dunes; only the information boxes inside are frosted */
.sheet::backdrop, .sheet[open]::backdrop {
  background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none;
}
.sheet { background: rgb(var(--bg-rgb) / .97); -webkit-backdrop-filter: none; backdrop-filter: none; }
[data-tone="dark"] .sheet { background: rgb(var(--bg-rgb) / .97); }

/* stars drift a little with each step: two depths, the nearer layer moves more */
.landscape .stars { inset: -14.6% 0 0 0; height: 114.6%; transform-origin: 50% 61.8%; will-change: transform; }

/* dark mode Journey boxes: 25% darker tone but more see-through, with a lighter blur so the dunes still read */
[data-tone="dark"] .page-journey .chapter-card {
  background: rgb(16 38 48 / .618);
  -webkit-backdrop-filter: blur(13px) saturate(var(--saturate)); backdrop-filter: blur(13px) saturate(var(--saturate));
}
[data-tone="dark"] .chapter-card .edge { background: rgb(16 38 48 / .618); }
[data-tone="dark"] .sheet .card.glass, [data-tone="dark"] .sheet .role {
  background: rgb(12 28 36 / .618);
  -webkit-backdrop-filter: blur(13px) saturate(var(--saturate)); backdrop-filter: blur(13px) saturate(var(--saturate));
}

/* ---------- Expertise: two rows of work, caption strips on the dark card colour ---------- */
.h-track.mixed {
  display: grid; grid-auto-flow: column; align-items: start; align-content: center;
  grid-template-rows: min-content 1fr; grid-template-columns: 100%;
  grid-auto-columns: min(19.1vw, calc((100svh - 300px) * .618), 300px);
  column-gap: var(--sp-5); row-gap: var(--sp-5); padding-block: var(--sp-3);
}
.h-track.mixed > .h-slide { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.h-track.mixed > .work { flex: none; width: auto; }
.h-track.mixed > .work figure { aspect-ratio: 16 / 9; }
.h-track.mixed > .work .body { padding: var(--sp-4) var(--sp-5); }
.h-track .work, .h-track .work:hover { box-shadow: 0 8px 21px rgb(var(--shadow-rgb) / var(--o-4)); }   /* fits inside the track: no clipped haze */
@media (max-width: 639px) { .h-track.mixed { grid-auto-columns: 61.8%; } }

.work .body { background: var(--dark-card-bg); color: var(--dark-card-fg); }
.work .body strong { color: var(--dark-card-fg); }
.work .body span { color: var(--dark-card-fg-2); }

/* ---------- a work thumbnail opens its project in a box ---------- */
.work-box {
  width: min(1597px, calc(100% - 2 * var(--sp-7))); height: calc(100% - 2 * var(--sp-7)); max-width: none; max-height: none;
  margin: auto; padding: 0; border: 1px solid var(--glass-rim); border-radius: var(--r-panel); overflow: hidden;
  background: var(--bg); color: var(--fg);
}
.work-box[open] { display: block; }
.work-box::backdrop { background: transparent; }
.work-box iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }
.work-box .work-box-close { position: absolute; top: var(--sp-5); right: var(--sp-5); z-index: 2; }
@media (max-width: 639px) { .work-box { width: calc(100% - 2 * var(--sp-4)); height: calc(100% - 2 * var(--sp-4)); } }
html.box-open { overflow: hidden; }
html.box-open .to-top { opacity: 0; visibility: hidden; }

/* a page shown inside the box: no site frame of its own */
html.embed .site-header, html.embed .site-footer, html.embed .dots, html.embed .to-top,
html.embed .menu, html.embed .skip-link { display: none !important; }
html.embed { --frame-top: var(--sp-7); --frame-bottom: var(--sp-6); }

/* Foundations: the three certificates sit side by side, no sideways scrolling */
.certs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); perspective: 1597px; }
@media (max-width: 899px) { .certs-grid { grid-template-columns: 1fr; } }

/* light mode: boxes inside the detail views share the main chapter card's frosted white */
[data-tone="light"] .sheet .card.glass, [data-tone="light"] .sheet .role {
  background: var(--glass-fill-strong);
  -webkit-backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate)); backdrop-filter: blur(var(--blur-overlay)) saturate(var(--saturate));
}

/* every box opens below the header's safe area (logo, theme button) and above the footer */
.sheet, .work-box {
  height: calc(100% - var(--frame-top) - var(--frame-bottom));
  margin: var(--frame-top) auto var(--frame-bottom);
}
@media (max-width: 899px) {
  .sheet, .work-box { height: calc(100% - var(--frame-top) - var(--sp-4)); margin: var(--frame-top) auto var(--sp-4); }
}

/* certificate backs: field and location set at the headline size of the certificate title */
.cert, .certs-grid .cert { height: 466px; }
.cert-back .meta { display: grid; gap: var(--sp-2); font-family: var(--font-display); font-weight: 300; font-size: var(--fs-h3); line-height: 1.146; }
.cert-back .meta span:first-child { color: var(--sky-50); }
[data-tone="dark"] .cert-back .meta span:first-child { color: var(--navy-950); }
.cert-back .meta span + span { color: var(--sky-200); }
[data-tone="dark"] .cert-back .meta span + span { color: var(--navy-700); }

/* the place now sits on the front, under the institution */
.cert-place { margin: calc(var(--sp-2) * -1) 0 0; font-size: 12.58px; letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--blue-500); font-weight: 500; position: relative; z-index: 1; }

/* shorter certificates so the honours below peek in: 377px (Fibonacci) at most,
   otherwise 0.786 (the root of 1/φ) of the room under the sheet title */
.cert, .certs-grid .cert { height: clamp(321px, calc((100svh - 2 * var(--sp-8) - 190px) * .786), 377px); }
.cert-face { padding: var(--sp-6) var(--sp-6); }
.cert-back { gap: var(--sp-3); }
.sheet .sheet-extra { margin-top: var(--sp-5); }

/* the sheet scroll stops where the content stops */
.sheet .sheet-inner { padding-bottom: var(--sp-7); }
@media (max-width: 639px) { .sheet .sheet-inner { padding-bottom: var(--sp-6); } }

/* detail-view boxes: thinner frost, so the dunes read clearly through every box */
.sheet .card.glass, .sheet .role, .cert-front {
  -webkit-backdrop-filter: blur(8px) saturate(var(--saturate)); backdrop-filter: blur(8px) saturate(var(--saturate));
}
[data-tone="light"] .sheet .card.glass, [data-tone="light"] .sheet .role { background: rgb(var(--white-rgb) / .382); }
[data-tone="dark"] .sheet .card.glass, [data-tone="dark"] .sheet .role { background: rgb(12 28 36 / .382); }
.cert-front { background: linear-gradient(160deg, rgb(var(--white-rgb) / .5) 0%, rgb(var(--sky-rgb) / .382) 100%); }
[data-tone="dark"] .cert-front { background: linear-gradient(160deg, rgb(12 28 36 / .382) 0%, rgb(12 28 36 / .5) 100%); }

/* detail views: roles laid out in rows of three, read by scrolling down only */
.roles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); align-items: stretch; }
@media (max-width: 1023px) { .roles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .roles-grid { grid-template-columns: 1fr; } }

/* detail views: no visible scrollbar; wheel, trackpad, touch and keys still scroll */
.sheet-body { scrollbar-width: none; -ms-overflow-style: none; }
.sheet-body::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* The Present: one company, so one box with a column per role; the award links sit beneath it */
.company-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: var(--sp-6) 0; }
.company-col { padding: 0 var(--sp-6); font-size: 16px; line-height: 1.618; }
.company-col + .company-col { border-left: 1px solid var(--glass-rim); }
.company-col .when { margin-bottom: var(--sp-4); }
.company-col h4 { margin-bottom: var(--sp-2); }
.company-col .org { font-size: 12.58px; color: var(--fg-2); margin-bottom: var(--sp-4); }
.company-awards { margin-top: var(--sp-5); }
@media (max-width: 899px) {
  .company-box { grid-template-columns: 1fr; padding: 0 var(--sp-5); }
  .company-col { padding: var(--sp-6) 0; }
  .company-col + .company-col { border-left: 0; border-top: 1px solid var(--glass-rim); }
}
.company-col .when { font-size: 12.58px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.company-col .when strong { display: block; font-weight: 500; color: var(--fg); font-size: 16px; }
.company-col h4 { font-size: 16px; font-weight: 400; }

/* three layers on the internal Journey pages:
   1 the page and main menu stay sharp;
   2 the detail box (title box) is frosted glass over the page at half the information boxes' blur;
   3 the information boxes frost at full strength (8px light, 13px dark) */
.sheet-scene { display: none; }
.sheet, [data-tone="dark"] .sheet {
  background: rgb(var(--bg-rgb) / .236);
  -webkit-backdrop-filter: blur(4px) saturate(var(--saturate)); backdrop-filter: blur(4px) saturate(var(--saturate));
}
[data-tone="dark"] .sheet {
  -webkit-backdrop-filter: blur(6.5px) saturate(var(--saturate)); backdrop-filter: blur(6.5px) saturate(var(--saturate));
}

/* certificates hint that they turn: a short partial turn and settle, one after another */
.cert.tease:not(.flipped) .cert-inner { animation: cert-tease .764s var(--ease-phi) 1; }
@keyframes cert-tease { 0% { transform: rotateY(0); } 38.2% { transform: rotateY(-23.6deg); } 70% { transform: rotateY(4deg); } 100% { transform: rotateY(0); } }
@media (prefers-reduced-motion: reduce) { .cert.tease .cert-inner { animation: none; } }

/* internal info boxes take the main chapter card's fill (certificate backs keep their contrast colour) */
[data-tone="light"] .sheet .card.glass, [data-tone="light"] .sheet .role, [data-tone="light"] .cert-front { background: rgb(var(--white-rgb) / .618); }
[data-tone="dark"] .sheet .card.glass, [data-tone="dark"] .sheet .role, [data-tone="dark"] .cert-front { background: rgb(16 38 48 / .618); }

/* section dots: full-strength ink with a halo in the page colour, so every dot reads at 3:1 or better on any background */
.dots .dot, .dots .dot:where(*) { width: 8px; height: 8px; opacity: 1; background: var(--fg-2);
  box-shadow: 0 0 0 2px rgb(var(--bg-rgb) / .786); }
.dots a:hover .dot { background: var(--fg); transform: scale(1.236); }
.dots a[aria-current="true"] .dot { width: 8px; height: 21px; border-radius: 4px; background: var(--accent); }
@media (max-width: 899px) { .dots .dot { width: 6px; height: 6px; opacity: 1; } .dots a[aria-current="true"] .dot { width: 6px; } }

/* the city sits on its own line under the organisation, styled like the certificate places */
.role .org, .company-col .org { margin-bottom: var(--sp-2); }
.role .place, .company-col .place {
  font-size: 12.58px; letter-spacing: var(--tracking-micro); text-transform: uppercase; font-weight: 500;
  color: var(--blue-500); margin: 0 0 var(--sp-4);
}
[data-tone="dark"] .role .place, [data-tone="dark"] .company-col .place { color: var(--sky-400); }

/* the project box stands apart from the page behind it: white paper in light mode, a lifted navy in dark */
html.embed, html.embed[data-tone="light"] { background-color: #ffffff; }
html.embed[data-tone="dark"] { background-color: var(--navy-800); }
.work-box, .work-box iframe { background: #ffffff; }
[data-tone="dark"] .work-box, [data-tone="dark"] .work-box iframe { background: var(--navy-800); }
.work-box { border: 1px solid rgb(var(--navy-rgb) / .146); box-shadow: 0 0 0 1px rgb(var(--white-rgb) / .618) inset; }
[data-tone="dark"] .work-box { border-color: rgb(var(--sky-rgb) / .236); }
html.embed .ambient { display: none; }   /* a clean sheet inside the box */

/* section dots: only the dot itself is the target (a 21px pad around it); the title floats beside it and never catches the cursor,
   so swiping sideways through a strip next to the dots is never intercepted */
.dots { pointer-events: none; }
.dots a { position: relative; pointer-events: auto; width: 21px; height: 21px; padding: 0; justify-content: center; gap: 0; }
.dots .label { position: absolute; right: calc(100% + var(--sp-3)); top: 50%; translate: 0 -50%; pointer-events: none; }
.dots a[aria-current="true"] { height: 34px; }

/* dots for every sideways scroller: same look as the About / Expertise group dots, a little closer to their strip */
.side-dots { margin-top: var(--sp-4); }
.side-dots[hidden] { display: none; }
.rail + .side-dots { margin-top: calc(var(--sp-3) * -1); }

/* Recognition confetti: above the page, below the header, never in the way of a click */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100svh; z-index: 35; pointer-events: none; }

/* page icons in dark mode: the lifted version of each, so every facet stays readable on navy */
[data-tone="dark"] img[src$="icons/about.svg"] { content: url("../icons/about-dark.svg"); }
[data-tone="dark"] img[src$="icons/journey.svg"] { content: url("../icons/journey-dark.svg"); }
[data-tone="dark"] img[src$="icons/expertise.svg"] { content: url("../icons/expertise-dark.svg"); }
[data-tone="dark"] img[src$="icons/recognition.svg"] { content: url("../icons/recognition-dark.svg"); }
[data-tone="dark"] img[src$="icons/perspectives.svg"] { content: url("../icons/perspectives-dark.svg"); }
[data-tone="dark"] img[src$="icons/contact.svg"] { content: url("../icons/contact-dark.svg"); }

/* Designing with Purpose: 3/5 of each number shows clear; the other 2/5 runs on behind the box, softened by its frosted glass */
:root, [data-tone="light"] { --dark-card-rgb: 28 59 76; }
[data-tone="dark"] { --dark-card-rgb: 35 72 94; }
.step .step-num { z-index: 0; }
.step .card.glass.dark-card {
  background: rgb(var(--dark-card-rgb) / .786);
  -webkit-backdrop-filter: blur(8px) saturate(var(--saturate)); backdrop-filter: blur(8px) saturate(var(--saturate));
}
[data-tone="dark"] .step .card.glass.dark-card { background: rgb(var(--dark-card-rgb) / .55); }   /* thinner in dark mode so the hidden 2/5 reads through */
.step .card.glass.dark-card { background: rgb(var(--dark-card-rgb) / .72); }
[data-tone="dark"] .step .card.glass.dark-card { background: rgb(var(--dark-card-rgb) / .55); }

/* award tables: header labels sit centred top-to-bottom in their band */
.awards-table th { padding: var(--sp-4) var(--sp-4) var(--sp-4) 0; vertical-align: middle; line-height: 1.382; }

/* Designing with Purpose: numbers moved a further 2/5 of their breadth to the left of the box, so each reads in full */
.step { padding-left: calc(var(--num) * var(--w, .48) * 4 / 5); }   /* moved back 1/5: 4/5 of each number clear of its box */

/* Designing with Purpose: navy frosted fill as before, with a light-shade stroke around each box */
[data-tone="dark"] .step .card.glass.dark-card { border: 1px solid rgb(var(--sky-rgb) / .618); }   /* dark mode only; light mode keeps its original edge */

/* light mode, Designing with Purpose: deeper fill and brighter copy for comfortable reading */
[data-tone="light"] .step .card.glass.dark-card, :root:not([data-tone="dark"]) .step .card.glass.dark-card { background: rgb(var(--dark-card-rgb) / .854); }
[data-tone="light"] .step .dark-card strong { color: #ffffff; }
[data-tone="light"] .step .dark-card p { color: var(--sky-50); }

/* the stand-in box used for the morph between a card and its open box */
.morph-box { position: fixed; z-index: 2147483000; pointer-events: none; border: 1px solid transparent; box-sizing: border-box; }
.work.is-source { visibility: hidden; }

/* The Expansion: one sideways row (dots + anticipation), no vertical scrolling */
.sheet-sideways .sheet-body { overflow-y: hidden; }
.sheet-sideways .sheet-inner { padding-bottom: var(--sp-4); }
.sheet-sideways .rail-nav { display: none; }
.sheet-sideways .rail-track { align-items: stretch; }
.sheet-sideways .rail-track > .role { font-size: 15px; line-height: 1.5; padding: var(--sp-5); }
.sheet-sideways .side-dots { margin-top: var(--sp-3); }
/* The Expansion fits the box: the row takes the room left under the title, dots sit beneath it */
.sheet-sideways .sheet-head { padding-top: var(--sp-6); padding-bottom: var(--sp-4); }
.sheet-sideways .sheet-inner { height: 100%; display: flex; flex-direction: column; padding-top: 0; }
.sheet-sideways .rail { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet-sideways .rail-track { flex: 1; min-height: 0; padding-bottom: var(--sp-2); }
.sheet-sideways .rail-track > .role { overflow-y: auto; scrollbar-width: none; font-size: 14px; }
.sheet-sideways .rail-track > .role::-webkit-scrollbar { display: none; }
.sheet-sideways .side-dots { flex: none; margin: var(--sp-3) 0 0; }

/* detail views: download the résumé, beside the close button */
.sheet-actions { display: flex; gap: var(--sp-3); flex: none; }
.sheet-download { color: var(--fg); }
.sheet-download svg { transition: transform var(--t-micro) var(--ease-snap); }
.sheet-download:hover svg, .sheet-download:focus-visible svg { transform: translateY(2px); }

/* The Expansion row: just two resting points, the start and the end, so one swipe carries it all the way */
.sheet-sideways .rail-track { scroll-snap-type: x mandatory; scroll-behavior: smooth; }
.sheet-sideways .rail-track > * { scroll-snap-align: none; scroll-snap-stop: normal; }
.sheet-sideways .rail-track > :first-child { scroll-snap-align: start; }
.sheet-sideways .rail-track > :last-child { scroll-snap-align: end; }
.sheet-sideways .rail-track { scroll-snap-type: none; }   /* the script carries each swipe to the far end */

/* Expertise: the discipline jump links in the solid button colours for stronger contrast */
.panel.hero .chips .chip { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.panel.hero .chips .chip:hover, .panel.hero .chips .chip:focus-visible { filter: brightness(1.146); transform: translateY(-2px); }

/* project image strips: every picture whole and side by side, one clean stop per picture */
.media-rail.stills { grid-auto-columns: max-content; gap: var(--sp-5); align-items: center; scroll-padding-inline: var(--sp-1); }
.media-rail.stills > figure { min-width: max-content; scroll-snap-align: start; scroll-snap-stop: always; }
.media-rail.stills img.still {
  height: min(61.8svh, 610px); width: auto; max-width: min(85.4vw, 987px); object-fit: contain;
  border-radius: var(--r-card); background: #fff; box-shadow: 0 0 0 1px rgb(var(--navy-rgb) / .09);
}

/* sideways strips: no arrow buttons; the dots, swipe, drag and keys carry the navigation */
.rail-nav { display: none !important; }
.rail + .side-dots { margin-top: var(--sp-4); }

/* project pages: the title and facts on the left, the description beside them starting level with the title */
.project-intro { display: grid; gap: var(--sp-7); align-items: start; }
@media (min-width: 900px) { .project-intro { grid-template-columns: minmax(0, 38.2fr) minmax(0, 61.8fr); } }
.project-intro .facts { margin-top: var(--sp-6); }
.project-intro .copy { padding-top: var(--copy-lift, 0px); }
.project-intro .copy p:first-child { margin-top: 0; }

/* ---------- scrollbars in the house style: a slim brand-blue pill on a clear track ---------- */
:root, [data-tone="light"] { --scroll-thumb: rgb(var(--navy-rgb) / .382); --scroll-thumb-hover: rgb(var(--navy-rgb) / .618); }
[data-tone="dark"] { --scroll-thumb: rgb(var(--sky-rgb) / .382); --scroll-thumb-hover: rgb(var(--sky-rgb) / .618); }
::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: var(--r-pill); border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) {
  html, .table-scroll, .cert-back, .work-box iframe { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
}

/* the page scrollbar keeps clear of the top-right buttons: its track starts below the header / close-button zone
   (the frame-top, 89px) and stops short of the rounded bottom corner */
html::-webkit-scrollbar-track { margin-top: var(--sp-8); margin-bottom: var(--sp-7); }
html.embed::-webkit-scrollbar-track { margin-top: calc(var(--sp-5) * 2 + 44px); margin-bottom: var(--sp-7); }

/* project template: a long description reads within the first page, scrolling in its own column if it must */
.project-intro .copy.long { max-height: calc(100svh - var(--frame-top) - var(--frame-bottom) - 144px); overflow-y: auto; padding-right: var(--sp-4); }
.project-intro .copy.long p { font-size: 15px; }
@media (max-width: 899px) { .project-intro .copy.long { max-height: none; overflow: visible; padding-right: 0; } }
/* previews page: a single film fits one screen with its caption */
.media.single figure { width: min(100%, calc((100svh - var(--frame-top) - var(--frame-bottom) - 233px) * 16 / 9)); }

/* Recognition awards: the table area keeps one height for every programme, rows start at the top,
   so the programme buttons never shift when switching */
.awards-card .table-scroll { height: calc(100svh - var(--frame-top) - var(--frame-bottom) - 233px); max-height: none; }
@media (max-width: 899px) { .awards-card .table-scroll { height: calc(100svh - var(--frame-top) - var(--frame-bottom) - 233px); } }

/* one close button everywhere: same glass circle, same icon, same 34px inset from the box's top-right corner */
.sheet-actions { position: absolute; top: var(--sp-6); right: var(--sp-6); z-index: 3; }
.sheet-head { padding-right: calc(var(--sp-6) + 2 * 44px + var(--sp-3) + var(--sp-5)); }
.work-box .work-box-close { top: var(--sp-6); right: var(--sp-6); }
.sheet-actions .icon-btn, .work-box-close, .menu-close { width: 44px; height: 44px; color: var(--fg); }
.sheet-actions .icon-btn svg, .work-box-close svg, .menu-close svg { width: 21px; height: 21px; }
@media (max-width: 639px) {
  .sheet-actions, .work-box .work-box-close { top: var(--sp-5); right: var(--sp-5); }
  .sheet-head { padding-right: calc(var(--sp-5) + 2 * 44px + var(--sp-3) + var(--sp-4)); }
}
html.embed::-webkit-scrollbar-track { margin-top: calc(var(--sp-6) * 2 + 44px); }

/* Recognition counts: four equal columns, each figure and label centred in its column,
   so the numbers sit with equal breathing space whatever their width */
@media (min-width: 640px) {
  .counts { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--sp-6); }
  .counts .count { display: grid; justify-items: center; text-align: center; }
  .counts .count .n { font-variant-numeric: tabular-nums lining-nums; }
  .counts .count .t { max-width: 14.6em; }
}

/* award tables: breathing room before the first column, in the header band and in every row */
.awards-table th:first-child, .awards-table td:first-child { padding-left: var(--sp-4); }
@media (max-width: 639px) { .awards-table td:first-child { padding-left: 0; } }

/* award programmes: a pill that slides to the chosen tab */
.tabs.has-ink { position: relative; }
.tab-ink {
  position: absolute; left: 0; top: 0; z-index: 0; border-radius: var(--r-pill); background: var(--btn-bg); pointer-events: none;
  transition: left .618s cubic-bezier(.22,.8,.2,1), top .618s cubic-bezier(.22,.8,.2,1), width .618s cubic-bezier(.22,.8,.2,1), height .618s cubic-bezier(.22,.8,.2,1);
}
.tabs.has-ink .tab { position: relative; z-index: 1; }
.tabs.has-ink .tab[aria-selected="true"] { background: transparent; border-color: transparent; color: var(--btn-fg); transition: color .382s ease .146s; }
@media (prefers-reduced-motion: reduce) { .tab-ink { transition: none; } }

/* go to the top: part of the section-dot column, centred on its axis just below the last dot */
.dots { align-items: center; }
.dots .dots-top { pointer-events: auto; margin-top: var(--sp-4); }
.dots .to-top { position: static; width: 34px; height: 34px; transform: translateY(8px); }
.dots .to-top svg { width: 16px; height: 16px; }
.dots .to-top.show { transform: none; }
@media (max-width: 639px) { .awards-table td:first-child { grid-row: span 2; } }   /* two cells beside the year now */

/* award tables: three clean columns — the year, then award and project sharing the width equally */
@media (min-width: 640px) {
  .awards-table { table-layout: fixed; width: 100%; }
  .awards-table th:nth-child(1), .awards-table td:nth-child(1) { width: 6.854em; }
  .awards-table th:nth-child(2), .awards-table td:nth-child(2),
  .awards-table th:nth-child(3), .awards-table td:nth-child(3) { width: auto; }
}

/* opening: the wordmark appears on its own; the spinning emblem settling into place completes the logo */
.splash-logo svg { display: block; width: 100%; height: auto; overflow: visible; }
.splash-logo .wordmark { fill: var(--logo-ink); }
.splash-logo .emblem { opacity: 0; }
.splash.complete .splash-logo .emblem { opacity: 1; }

/* sideways groups: card shadows stay inside the strip so nothing is cut off in a hard band */
.h-track .card, .h-track .card.glass.dark-card, .step .card.glass.dark-card { box-shadow: inset 0 1px 0 var(--glass-spec); }

/* Designing with Purpose: the step numbers in teal */
.step .step-num, .step-num { color: var(--teal); }

/* long project descriptions never trap the scroll: no inner scroller; the type eases down a little to fit the first page */
.project-intro .copy.long { overflow: hidden; padding-right: 0; }
.project-intro .copy.long.overflowing { overflow-y: auto; }

/* Recognition, Selected Honours: cards in the contrast shade (navy on light pages, pale sky on dark) */
article.honour.card.glass { background: var(--navy-900); color: var(--sky-50); border-color: rgb(var(--white-rgb) / .146); }
article.honour.card.glass .h3 { color: #ffffff; }
article.honour.card.glass .year { color: var(--sky-400); }
article.honour.card.glass .by { color: var(--sky-200); }
article.honour.card.glass p { color: var(--sky-50); }
[data-tone="dark"] article.honour.card.glass { background: var(--sky-100); color: var(--navy-950); border-color: rgb(var(--navy-rgb) / .146); }
[data-tone="dark"] article.honour.card.glass .h3 { color: var(--navy-950); }
[data-tone="dark"] article.honour.card.glass .year { color: var(--blue-600); }
[data-tone="dark"] article.honour.card.glass .by { color: var(--navy-700); }
[data-tone="dark"] article.honour.card.glass p { color: var(--navy-900); }
[data-tone="dark"] article.honour.card.glass .year { color: var(--navy-700); }   /* small text: keep it above 4.5:1 */

/* award tables: the year, then three equal columns — award, project, and the team, company and country that gave it */
@media (min-width: 640px) {
  .awards-table th:nth-child(4), .awards-table td:nth-child(4) { width: auto; }
}
@media (max-width: 639px) { .awards-table td:first-child { grid-row: span 3; } }

/* ---------- Perspectives writings: list entries open their article ---------- */
.writings li { display: block; padding: 0; }
.writing {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--sp-5);
  padding: var(--sp-5) 0; color: inherit; text-decoration: none;
  transition: padding var(--t-ui) var(--ease-out), color var(--t-micro);
}
.writing:hover, .writing:focus-visible { padding-left: var(--sp-4); color: var(--accent); }
.writing-cover { width: 89px; aspect-ratio: 1.618; object-fit: cover; border-radius: var(--r-chip); }
.writing-text { display: grid; gap: var(--sp-2); grid-column: 2; }
.writing-title { font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 300; }
.writing-summary { font-family: var(--font-body); font-size: 16px; color: var(--fg-2); }
.writing::after { content: "→"; grid-column: 3; font-size: var(--fs-h4); color: var(--fg-2); transition: transform var(--t-ui) var(--ease-out); }
.writing:hover::after { transform: translateX(8px); color: var(--accent); }
a[data-box].is-source { visibility: hidden; }

/* ---------- article pages: document-style reading layout ---------- */
.article-panel { justify-content: flex-start; }
.doc { max-width: 38.2em; margin: 0 auto; padding-bottom: var(--sp-8); }
.doc-head { margin-bottom: var(--sp-7); }
.doc-head .display { font-size: var(--fs-h1); line-height: 1.146; color: var(--fg-2); }
.doc-meta { margin-top: var(--sp-4); font-size: var(--fs-micro); letter-spacing: var(--tracking-micro); text-transform: uppercase; color: var(--fg-2); }
.doc-summary { margin-top: var(--sp-5); font-size: var(--fs-body-lg); line-height: 1.5; color: var(--fg-2); }
.article-cover { margin: 0 0 var(--sp-7); }
.article-cover img { width: 100%; border-radius: var(--r-card); }
.doc-body { font-size: 17px; line-height: 1.75; color: var(--fg); }
.doc-body > * + * { margin-top: var(--sp-5); }
.doc-body h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.146; color: var(--fg-2); margin-top: var(--sp-7); }
.doc-body h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h4); line-height: 1.236; margin-top: var(--sp-6); }
.doc-body ul, .doc-body ol { padding-left: 1.382em; }
.doc-body li + li { margin-top: var(--sp-2); }
.doc-body a { color: var(--accent); text-underline-offset: 3px; }
.doc-body blockquote { margin: var(--sp-7) 0; padding: var(--sp-2) 0 var(--sp-2) var(--sp-6); border-left: 3px solid var(--teal, var(--accent)); font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 300; line-height: 1.382; color: var(--fg-2); }
.doc-body figure { margin: var(--sp-7) 0; }
.doc-body figure img { width: 100%; border-radius: var(--r-card); display: block; }
.doc-body figcaption { margin-top: var(--sp-3); font-size: 12.58px; color: var(--fg-2); text-align: center; }
html.embed .page-article .panel { padding-top: var(--sp-8); }

/* home on phones: the paragraph dots sit directly under the swiping paragraphs */
@media (max-width: 899px) {
  .home-hero .side-dots { order: 4; margin-top: var(--sp-4); }
}
@media (max-width: 899px) { .home-hero .side-dots { align-self: stretch; justify-content: center; } }

/* ---------- home on phones: tagline beside a golden-ratio portrait, paragraphs inside the safe margins ---------- */
@media (max-width: 639px) {
  .home-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) 38.2vw; column-gap: var(--sp-4); row-gap: var(--sp-6);
    grid-template-areas: "tag pic" "intro intro" "dots dots"; align-items: center;
  }
  .home-copy { display: contents; }
  .home-hero .display { grid-area: tag; order: 0; margin: 0; font-size: clamp(21px, 6.4vw, 25.89px); line-height: 1.146; }
  .home-hero .display .w1 { display: block; }                 /* each statement on two lines */
  .home-hero .display .line + .line { margin-top: .618em; }   /* more air between the statements than within them */
  .portrait { grid-area: pic; order: 0; align-self: center; justify-self: stretch; margin: 0 calc(var(--page-margin) * -1) 0 0; overflow: hidden; }
  .portrait img { width: 100%; height: auto; aspect-ratio: 1 / 1.618; object-fit: cover; object-position: 30% 12%; max-width: none; }
  .home-hero .home-intro { grid-area: intro; order: 0; grid-auto-columns: 100%; column-gap: var(--page-margin); }
  .home-hero .side-dots { grid-area: dots; order: 0; margin-top: 0; }
}
@media (max-width: 639px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) 30vw; }
  .home-hero .display { font-size: clamp(18px, 5.6vw, 25.89px); }
}

/* step numbers (and article pull-quote rule): the style guide's light blue, sky-400 #6ec3ed, no off-palette teal */
:root, [data-tone="light"], [data-tone="dark"] { --teal: var(--sky-400); }
.step .step-num, .step-num { color: var(--sky-400); }

/* phones: rows that turn into sideways strips keep their card shadows inside, so no hard band cuts the background */
@media (max-width: 639px) {
  .grid.c3 > *, .grid.c4 > *, .work-grid.feature > *, .section-links > *, .creds > *, .chapters > *, .counts > *,
  .grid.c3 .card, .grid.c4 .card, .grid.c3 .card.glass.dark-card, .grid.c4 .card.glass.dark-card {
    box-shadow: inset 0 1px 0 var(--glass-spec);
  }
}

/* Recognition counts on phones: all four at once in a 2 × 2 grid, no sideways swipe */
@media (max-width: 639px) {
  .counts { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto;
            overflow: visible; scroll-snap-type: none; gap: var(--sp-7) var(--sp-5); padding-bottom: 0; }
  .counts .count { display: grid; justify-items: center; text-align: center; }
  .counts .count .n { font-size: clamp(53.28px, 17vw, 86.22px); }
  .counts .count .t { font-size: 14px; line-height: 1.5; }
  .counts + .side-dots { display: none !important; }
}

/* Foundations on phones and tablets: the certificates swipe sideways in one row (desktop keeps all three side by side) */
@media (max-width: 899px) {
  .certs-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 85.4%;
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    scrollbar-width: none; padding: var(--sp-2) 0 var(--sp-3);
  }
  .certs-grid::-webkit-scrollbar { display: none; }
  .certs-grid > .cert { scroll-snap-align: start; }
}

/* Selected Honours on phones: all three at once, stacked compactly, no sideways swipe */
@media (max-width: 639px) {
  .grid.c3:has(> article.honour) {
    grid-auto-flow: row; grid-template-columns: 1fr; grid-auto-columns: auto;
    overflow: visible; scroll-snap-type: none; gap: var(--sp-4); padding-bottom: 0;
  }
  .grid.c3:has(> article.honour) + .side-dots { display: none !important; }
  article.honour.card { padding: var(--sp-5); }
  article.honour .h3 { font-size: 18px; margin: var(--sp-2) 0 var(--sp-1); }
  article.honour .by { margin-bottom: var(--sp-2); }
  article.honour p:last-child { font-size: 14px; line-height: 1.5; }
  section:has(article.honour) .h1 { margin-bottom: var(--sp-5) !important; }
}

/* Recognition Across Disciplines on phones: all four at once in a compact 2 × 2 grid, no sideways swipe */
@media (max-width: 639px) {
  section.contrast .grid.c4 {
    grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto;
    overflow: visible; scroll-snap-type: none; gap: var(--sp-3); padding-bottom: 0;
  }
  section.contrast .grid.c4 + .side-dots { display: none !important; }
  section.contrast .grid.c4 > .card { padding: var(--sp-4); }
  section.contrast .grid.c4 .h3 { font-size: 16px; line-height: 1.236; margin-bottom: var(--sp-2); }
  section.contrast .grid.c4 p { font-size: 13px; line-height: 1.5; }
  section.contrast .h1 { margin-bottom: var(--sp-5) !important; }
}

/* The Expansion on phones and tablets: every swipe lands on the next role card */
@media (max-width: 899px) {
  .sheet-sideways .rail-track { scroll-snap-type: x mandatory; scroll-behavior: auto; --rail-w: 100%; grid-auto-columns: 100%; }
  .sheet-sideways .rail-track > * { scroll-snap-align: start; scroll-snap-stop: always; }
}

/* award programme buttons: each label on a single line */
.tabs .tab { white-space: nowrap; }

/* ---------- the follow-up page: a call to action at the foot of every main page ---------- */
main > .panel:last-of-type { position: relative; }
.next-page { position: absolute; left: 0; right: 0; bottom: calc(var(--frame-bottom) * .382); display: flex; justify-content: center; pointer-events: none; z-index: 5; }
.next-page-link {
  pointer-events: auto; display: inline-flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5) var(--sp-3) var(--sp-4); border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg); text-decoration: none;
  font-size: 12.58px; letter-spacing: var(--tracking-micro); text-transform: uppercase; font-weight: 500;
  box-shadow: 0 8px 21px rgb(var(--shadow-rgb) / var(--o-4));
  transition: transform var(--t-micro) var(--ease-snap), filter var(--t-micro);
}
.next-page-link img { width: 21px; height: 21px; object-fit: contain; }
.next-page-link svg { width: 16px; height: 16px; transition: transform var(--t-ui) var(--ease-out); }
.next-page-link:hover, .next-page-link:focus-visible { transform: translateY(-2px); filter: brightness(1.08); }
.next-page-link:hover svg { transform: translateX(5px); }
.page-journey main > .panel > .next-page { position: fixed; pointer-events: none; }
.page-journey main > .panel:not(.z-on) > .next-page { display: none; }
@media (max-width: 899px) { .next-page { bottom: var(--sp-5); } }
html.embed .next-page { display: none; }
.next-page { bottom: calc(var(--frame-bottom) + var(--sp-3)); }   /* above the footer row, never inside it */
@media (max-width: 899px) { .next-page { bottom: var(--sp-6); } }

/* section-dot titles: wrap onto two lines when needed, so no title is ever cut off at the screen edge */
.dots .label {
  white-space: normal; width: max-content; max-width: min(61.8vw, 233px);
  text-align: right; line-height: 1.382; border-radius: var(--r-button); text-wrap: balance;
}

/* sideways groups and galleries: the dots ride along at the foot of the screen while the strip is in view,
   on a small frosted pill, so the way across is always visible */
.hgroup .h-dots, .side-dots {
  position: sticky; bottom: var(--sp-5); z-index: 6;
  width: fit-content; margin-inline: auto; padding: var(--sp-2) var(--sp-4); border-radius: var(--r-pill);
  background: var(--glass-fill-strong); border: 1px solid var(--glass-rim);
  -webkit-backdrop-filter: blur(var(--blur-card)); backdrop-filter: blur(var(--blur-card));
}
.hgroup .h-dots[hidden], .side-dots[hidden] { display: none; }
@media (max-width: 899px) { .h-track.mixed { align-content: start; } }

/* phones: page icons sit beside the tagline exactly as on desktop — to its left, centred on it, two lines tall */
@media (max-width: 639px) {
  .display.has-icon, .display.has-icon.icon-middle { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .3em; align-items: center; }
  .display.has-icon .title-icon { display: block; float: none; margin: 0; height: calc(var(--lh-display) * 2em); width: auto; }
  .display.has-icon.stmts { font-size: min(32.94px, 6.6vw); }
}
@media (max-width: 639px) { .display.has-icon:not(.stmts) { font-size: min(32.94px, 7.6vw); } }   /* a touch smaller so the tagline beside the icon wraps less */
