/* Inter (The Inter Project Authors, SIL Open Font License 1.1, see fonts/LICENSE-Inter.txt).
   Apple devices use the system font already on the device (SF Pro); other devices get Inter. */
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Colours. The introduction and the research page stay dark in both modes. */
:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --nav-h: 3.25rem;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --panel: #f5f5f7;      /* tiles on white bands */
  --panel-alt: #ffffff;  /* tiles on grey bands */
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --dim: rgba(29, 29, 31, .17);
  --line: #d2d2d7;
  --link: #0066cc;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --grad: linear-gradient(90deg, #0a84ff 0%, #5e5ce6 40%, #bf5af2 72%, #ff375f 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #000000;
    --bg-alt: #0d0d0f;
    --panel: #161617;
    --panel-alt: #1d1d1f;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --dim: rgba(245, 245, 247, .2);
    --line: #424245;
    --link: #2997ff;
  }
}
@media (max-width: 833px) { :root { --nav-h: 6rem; } }

/* Base: the window itself never scrolls; the pages inside the deck do */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; font-size: 100%; }
/* Above laptop width the whole page grows smoothly with the screen, up to 4K and 8K
   (16px at 1440px wide, about 21px at 2560, 28px at 3840 and 47px at 7680).
   Below that, the visitor's own browser text size applies; very small phones get slightly smaller type. */
html { font-size: max(100%, calc(0.5vw + 0.55rem)); }
@media (max-width: 350px) { html { font-size: 93.75%; } }
body {
  height: 100%; margin: 0; overflow: hidden; background: #000; color: var(--text);
  font: 400 1.0625rem/1.47 var(--font); letter-spacing: -.015em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid #0071e3; outline-offset: 3px; border-radius: 0.375rem; }
sup { font-size: .6em; line-height: 0; margin-left: .1em; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.container { max-width: 67.5rem; margin: 0 auto; padding: 0 1.375rem; }
.narrow { max-width: 56.25rem; }
.skip { position: fixed; left: -999px; top: 0; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; padding: .5rem .8rem; border-radius: 0.5rem; background: #fff; color: #1d1d1f; }
@media (max-width: 734px) { .wide-only { display: none; } }

/* Buttons and links */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.375rem; border-radius: 61.25rem; background: var(--blue); color: #fff;
  font-size: 1.0625rem; line-height: 1.18; letter-spacing: -.02em; white-space: nowrap;
  transition: background-color .2s ease;
}
.pill:hover { background: var(--blue-hover); color: #fff; text-decoration: none; }
.pill--small { padding: 0.25rem 0.75rem; font-size: 0.75rem; line-height: 1.34; letter-spacing: -.01em; }
.chev { display: inline-flex; align-items: center; color: var(--link); font-size: 1.0625rem; }
.chev::after {
  content: ""; width: .4em; height: .4em; margin-left: .35em; margin-top: .06em;
  border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; transform: rotate(45deg);
}
.chev--on-dark { color: #2997ff; }

/* Top bar with the section tabs */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; color: #f5f5f7;
  background: rgba(22, 22, 23, .8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.nav-inner {
  max-width: 67.5rem; height: 3.25rem; margin: 0 auto; padding: 0 1.375rem;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
}
.nav-title { color: #f5f5f7; font-size: 1.1875rem; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.nav-title:hover { color: #fff; text-decoration: none; }
.nav-title .short { display: none; }
.tabs { position: relative; display: flex; justify-content: flex-end; align-self: stretch; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; padding: 0 0.6875rem; white-space: nowrap;
  color: rgba(245, 245, 247, .7); font-size: 0.8125rem; letter-spacing: -.01em; transition: color .25s ease;
}
.tab:hover { color: #fff; text-decoration: none; }
.tab[aria-selected="true"] { color: #fff; }
.tab-indicator { position: absolute; bottom: 0; left: 0; width: 0; height: 2px; border-radius: 2px; background: #f5f5f7; pointer-events: none; }
@media (max-width: 833px) {
  .nav-inner { height: auto; grid-template-columns: 1fr auto; grid-template-areas: "title pill" "tabs tabs"; gap: 0 1rem; }
  .nav-title { grid-area: title; height: 3.25rem; display: flex; align-items: center; font-size: 1.0625rem; }
  .nav-title .full { display: none; }
  .nav-title .short { display: inline; }
  .nav .pill--small { grid-area: pill; }
  .tabs { grid-area: tabs; height: 2.75rem; justify-content: flex-start; margin: 0 -22px; padding: 0 0.75rem; border-top: 1px solid rgba(255, 255, 255, .08); }
}

/* Side arrows */
.paddle {
  position: fixed; top: 50%; z-index: 40; display: none; place-items: center;
  width: 2.75rem; height: 2.75rem; margin-top: -22px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(210, 210, 215, .64); color: rgba(0, 0, 0, .56);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background-color .2s ease, color .2s ease;
}
.paddle:hover { background: rgba(223, 223, 227, .78); color: rgba(0, 0, 0, .7); }
.paddle svg { width: 1.125rem; height: 1.125rem; stroke-width: 2.4; }
.paddle--prev { left: 1.125rem; }
.paddle--next { right: 1.125rem; }
@media (hover: hover) and (min-width: 1240px) { .paddle { display: grid; } }
.paddle[hidden] { display: none; }

/* The deck: pages side by side, one per tab */
.deck {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; display: flex;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }
.page {
  position: relative; flex: 0 0 100%; width: 100%; height: 100%;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain;
  scroll-snap-align: start; scroll-snap-stop: always;
  padding-top: var(--nav-h); scroll-padding-top: var(--nav-h);
  background: var(--bg);
}
.page:focus { outline: none; }
.page--dark { background: #000; color: #f5f5f7; }
/* Top and bottom colours match the first and last band, so over-scrolling looks seamless */
.page--home { background: linear-gradient(#000 50%, var(--bg-alt) 50%); color: #f5f5f7; }
.page--edu { background: linear-gradient(var(--bg) 50%, var(--bg-alt) 50%); }
.page--alt { background: var(--bg-alt); }

/* Home: introduction */
.hero {
  position: relative; overflow: hidden; text-align: center; color: #f5f5f7;
  padding: clamp(3.5rem, 7vw, 6.25rem) 1.375rem 0;
  background: radial-gradient(55% 42% at 50% 82%, rgba(41, 151, 255, .22), rgba(94, 92, 230, .08) 55%, transparent 75%), #000;
}
.hero-eyebrow { font-size: clamp(1.1875rem, 1.1vw + 0.875rem, 1.75rem); font-weight: 600; letter-spacing: -.01em; }
.hero-title { margin-top: 0.625rem; font-size: clamp(2.5rem, 6.4vw, 6rem); font-weight: 700; line-height: 1.04; letter-spacing: -.035em; }
.hero-title span {
  display: inline-block; padding-bottom: .08em;
  background: var(--grad) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.hero-title span:nth-child(2) { background-position: 50% 0; }
.hero-title span:nth-child(3) { background-position: 100% 0; }
.hero-sub { max-width: 47.5rem; margin: 1.375rem auto 0; color: #a1a1a6; font-size: clamp(1.1875rem, .9vw + 0.875rem, 1.5625rem); line-height: 1.35; font-weight: 500; letter-spacing: -.015em; }
.hero-sub b { color: #f5f5f7; font-weight: 600; }
.hero-cta { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 1.125rem 1.875rem; margin-top: 2.125rem; }
.hint { display: inline-flex; align-items: center; gap: 0.375rem; margin-top: 1.625rem; color: #86868b; font-size: 0.8125rem; letter-spacing: 0; }
.hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .hint-keys { display: none; } .hint-touch { display: inline; } }
.hint kbd { min-width: 1.375rem; padding: 1px 0.375rem; border: 1px solid #424245; border-radius: 0.375rem; color: #a1a1a6; font: inherit; text-align: center; }
.hero-visual {
  width: min(37.5rem, 88vw); aspect-ratio: 1 / .8; margin: clamp(2.125rem, 4.5vw, 4rem) auto 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent);
  mask-image: linear-gradient(to bottom, #000 58%, transparent);
}
.wafer { display: block; width: 100%; height: auto; overflow: visible; }
.wafer .edge { fill: #0b0b0d; stroke: #3a3a3c; stroke-width: .8; }
.wafer .notch { fill: #000; stroke: #3a3a3c; stroke-width: .8; }
.wafer .die { fill: #1c1c1e; stroke: none; }
.wafer .ring { fill: none; stroke: #2997ff; stroke-opacity: .35; stroke-width: .6; stroke-dasharray: 1.5 3.5; }
.wafer .halo { fill: #2997ff; stroke: none; opacity: .22; }
.wafer .site { fill: #6cb8ff; stroke: none; }
.wafer .slit { stroke: none; }
.wafer .mark { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .js .hero-eyebrow, .js .hero-title span, .js .hero-sub, .js .hero-cta, .js .hint {
    opacity: 0; transform: translateY(22px); animation: rise 1s cubic-bezier(.2, .8, .2, 1) forwards;
  }
  .js .hero-eyebrow { animation-delay: .1s; }
  .js .hero-title span:nth-child(1) { animation-delay: .25s; }
  .js .hero-title span:nth-child(2) { animation-delay: .4s; }
  .js .hero-title span:nth-child(3) { animation-delay: .55s; }
  .js .hero-sub { animation-delay: .8s; }
  .js .hero-cta { animation-delay: .95s; }
  .js .hint { animation-delay: 1.4s; }
  .js .hero-visual { opacity: 0; transform: translateY(40px) scale(.96); animation: rise 1.6s cubic-bezier(.2, .8, .2, 1) .6s forwards; }
  .js .wafer .mark { opacity: 0; animation: pop .6s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i) * 70ms + 1.3s); }
  .wafer .slit { animation: scan 5.5s cubic-bezier(.45, 0, .55, 1) 1.4s infinite alternate; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  @keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
  @keyframes scan { from { transform: translateY(-118px); } to { transform: translateY(118px); } }
}
@media (prefers-reduced-motion: reduce) { .wafer .slit { display: none; } }

/* Home: statement that lights up word by word */
.statement { padding: clamp(5.5rem, 11vw, 10.625rem) 0; background: var(--bg); color: var(--text); }
.statement-text { font-size: clamp(1.75rem, 1.9vw + 1rem, 3.125rem); line-height: 1.16; font-weight: 600; letter-spacing: -.028em; }
.js .statement-text .w { color: var(--dim); transition: color .4s ease; }
.js .statement-text .w.on { color: var(--text); }

/* Bands and headings */
.band { padding: clamp(4.5rem, 8vw, 8.125rem) 0 clamp(2.5rem, 4vw, 4rem); background: var(--bg); color: var(--text); }
.band--alt { background: var(--bg-alt); }
.band--dark { position: relative; overflow: hidden; background: #000; color: #f5f5f7; }
.band--dark::before {
  content: ""; position: absolute; left: 50%; top: -35%; width: 130%; height: 85%; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(94, 92, 230, .22), rgba(41, 151, 255, .08) 60%, transparent);
}
.band--dark .container { position: relative; }
.eyebrow { margin-bottom: 0.625rem; color: var(--text-2); font-size: clamp(1.0625rem, .5vw + 0.875rem, 1.3125rem); font-weight: 600; letter-spacing: -.01em; }
.band--dark .eyebrow { color: #a1a1a6; }
.section-title { font-size: clamp(2.5rem, 4.6vw + 0.625rem, 5rem); line-height: 1.05; font-weight: 700; letter-spacing: -.035em; }
.section-sub { max-width: 45rem; margin-top: 1.375rem; color: var(--text-2); font-size: clamp(1.1875rem, .6vw + 0.9375rem, 1.5rem); line-height: 1.38; letter-spacing: -.015em; }
.band--dark .section-sub { color: #a1a1a6; }
.band--dark .section-sub a { color: #2997ff; }
.grad { padding-bottom: .06em; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }

/* Numbers (bento) */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin-top: clamp(2.5rem, 4.5vw, 4rem); }
.tile {
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 14.375rem;
  padding: clamp(1.625rem, 2.5vw, 2.375rem); border-radius: 1.75rem; background: var(--panel-alt);
}
.tile--wide { grid-column: span 2; }
.big { font-size: clamp(3.125rem, 3.6vw + 1.125rem, 5.25rem); font-weight: 700; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.big--grad { padding-bottom: .06em; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.tile-cap { margin-top: 0.875rem; color: var(--text-2); font-size: 1.1875rem; line-height: 1.32; font-weight: 600; letter-spacing: -.018em; }
.tile-cap b { color: var(--text); font-weight: 600; }
.footnote { margin-top: 1.875rem; color: var(--text-2); font-size: 0.75rem; line-height: 1.4; letter-spacing: 0; }
@media (max-width: 1068px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 734px) { .bento { gap: 0.875rem; } .tile { min-height: 11.25rem; } }
@media (max-width: 559px) {
  .bento { grid-template-columns: 1fr; gap: 0.875rem; }
  .tile--wide { grid-column: auto; }
  .tile { min-height: 11.25rem; }
}

/* Panels and cards */
.grid-2, .grid-3 { display: grid; gap: 1.25rem; margin-top: clamp(2.5rem, 4.5vw, 4rem); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel { padding: clamp(1.75rem, 3vw, 2.75rem); border-radius: 1.75rem; background: var(--panel); }
.band--alt .panel { background: var(--panel-alt); }
.when { color: var(--text-2); font-size: 0.875rem; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.panel h3 { margin-top: 0.625rem; font-size: clamp(1.625rem, 1vw + 1.25rem, 2.125rem); font-weight: 700; line-height: 1.12; letter-spacing: -.03em; }
.org { margin-top: 0.375rem; color: var(--text-2); font-size: 1.0625rem; }
.text { margin-top: 1rem; font-size: 1.0625rem; line-height: 1.5; }
.honour { margin-top: 0.75rem; color: var(--text-2); font-size: 0.875rem; }
.panel--dark { background: #161617; color: #f5f5f7; }
.panel--dark .text { color: #a1a1a6; font-size: 1.1875rem; line-height: 1.42; }
.panel--dark h3 { font-size: clamp(1.875rem, 1.4vw + 1.25rem, 2.625rem); }
.kicker {
  display: inline-block; font-size: 0.875rem; font-weight: 600; letter-spacing: -.01em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 2.25rem; }
.chips li { padding: 0.5rem 1rem; border-radius: 61.25rem; background: #1d1d1f; color: #f5f5f7; font-size: 0.875rem; }
.supervisors { margin-top: 1.625rem; color: #86868b; font-size: 0.875rem; }
.card { display: flex; flex-direction: column; gap: 0.625rem; padding: clamp(1.625rem, 2.6vw, 2.375rem); border-radius: 1.5rem; background: var(--panel-alt); }
.card h3 { font-size: 1.3125rem; font-weight: 600; line-height: 1.24; letter-spacing: -.02em; }
.kind { display: flex; align-items: center; gap: 0.5rem; color: var(--text-2); font-size: 0.75rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; }
.dot--journal { background: #0a84ff; }
.dot--conf { background: #bf5af2; }
.dot--patent { background: #ff9f0a; }
.authors, .venue { color: var(--text-2); font-size: 0.875rem; line-height: 1.45; letter-spacing: -.01em; }
.authors strong { color: var(--text); font-weight: 600; }
.card .chev { margin-top: auto; padding-top: 0.5rem; }
.sub-title { margin-top: clamp(4rem, 7vw, 6.25rem); font-size: clamp(1.875rem, 1.8vw + 1.125rem, 2.75rem); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.sub-text { margin-top: 0.625rem; color: var(--text-2); font-size: 1.1875rem; }
.sub-text + .grid-2 { margin-top: 2rem; }
.center { margin-top: 3.25rem; text-align: center; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.375rem; }
.tags li { padding: 0.375rem 0.875rem; border: 1px solid var(--line); border-radius: 61.25rem; font-size: 0.875rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 734px) { .grid-2 { grid-template-columns: 1fr; gap: 0.875rem; } .grid-3 { gap: 0.875rem; } }

/* "Next" link and footer at the end of each page */
.next { padding: clamp(3rem, 5vw, 5rem) 1.375rem; text-align: center; }
.next-link { display: inline-flex; flex-direction: column; align-items: center; gap: 0.25rem; color: var(--text); }
.next-link:hover { text-decoration: none; }
.next-label { color: var(--text-2); font-size: 0.875rem; font-weight: 600; letter-spacing: -.01em; }
.next-title { display: inline-flex; align-items: center; color: var(--link); font-size: clamp(1.875rem, 1.8vw + 1.125rem, 2.75rem); font-weight: 700; letter-spacing: -.03em; }
.next-title::after {
  content: ""; width: .32em; height: .32em; margin-left: .3em; margin-top: .08em;
  border-top: .07em solid currentColor; border-right: .07em solid currentColor; transform: rotate(45deg);
  transition: transform .25s ease;
}
.next-link:hover .next-title::after { transform: translateX(.12em) rotate(45deg); }
.page--dark .next-label { color: #a1a1a6; }
.page--dark .next-title { color: #2997ff; }
.page-footer { padding: 0 0 calc(2.5rem + env(safe-area-inset-bottom)); color: var(--text-2); font-size: 0.75rem; line-height: 1.4; letter-spacing: 0; }
.footer-inner { max-width: 67.5rem; margin: 0 auto; padding: 1.125rem 1.375rem 0; display: flex; justify-content: space-between; gap: 0.625rem 1.5rem; flex-wrap: wrap; border-top: 1px solid var(--line); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { color: var(--text); }
.page--dark .page-footer { color: #86868b; }
.page--dark .footer-inner { border-color: #424245; }
.page--dark .footer-links a { color: #f5f5f7; }

/* Scroll reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s cubic-bezier(.2, .8, .2, 1), transform 1s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* Printing: all pages one after another, as a clean CV-like document */
@media print {
  :root { color-scheme: light; --bg: #fff; --bg-alt: #fff; --panel: #fff; --panel-alt: #fff; --text: #000; --text-2: #444; --line: #ccc; --link: #000; }
  html, body { height: auto; overflow: visible; background: #fff; }
  .nav, .paddle, .hero-visual, .hero-cta, .hint, .next, .skip { display: none; }
  .deck { position: static; display: block; overflow: visible; }
  .page { height: auto; overflow: visible; padding-top: 0; background: #fff; color: #000; }
  .page-footer { display: none; }
  .page:last-child .page-footer { display: block; }
  .hero, .band--dark, .panel--dark { background: #fff; color: #000; }
  .hero { padding: 0 0 1.5rem; text-align: left; }
  .hero-sub, .band--dark .section-sub, .panel--dark .text, .supervisors { color: #333; }
  .hero-title span, .grad, .big--grad, .kicker { -webkit-text-fill-color: #000; color: #000; background: none; }
  .chips li { background: #fff; color: #000; border: 1px solid #ccc; }
  .statement, .band { padding: 1.5rem 0; }
  .panel, .card, .tile { border: 1px solid #ddd; break-inside: avoid; min-height: 0; }
  .js .reveal, .js .statement-text .w { opacity: 1; transform: none; color: inherit; }
}

/* ---- Robustness across devices ---- */

/* Notches and rounded corners (iPhone in landscape): keep content inside the safe area */
.container, .nav-inner, .footer-inner {
  padding-left: max(1.375rem, env(safe-area-inset-left));
  padding-right: max(1.375rem, env(safe-area-inset-right));
}
.hero, .next {
  padding-left: max(1.375rem, env(safe-area-inset-left));
  padding-right: max(1.375rem, env(safe-area-inset-right));
}
.paddle--prev { left: max(1.125rem, env(safe-area-inset-left)); }
.paddle--next { right: max(1.125rem, env(safe-area-inset-right)); }

/* Phones on their side: short screens get a one-row top bar and a smaller introduction */
@media (orientation: landscape) and (max-height: 540px) {
  :root { --nav-h: 3.25rem; }
  .nav-inner { height: 3.25rem; grid-template-columns: auto 1fr auto; grid-template-areas: "title tabs pill"; gap: 0 1rem; }
  .tabs { grid-area: tabs; height: 3.25rem; margin: 0; padding: 0; border-top: 0; justify-content: flex-start; }
  .hero { padding-top: 1.75rem; }
  .hero-sub { margin-top: 0.875rem; }
  .hero-cta { margin-top: 1.25rem; }
  .hint { margin-top: 1rem; }
  .hero-visual { width: min(27.5rem, 62vw); margin-top: 1.5rem; }
  .statement { padding: 4rem 0; }
  .band { padding-top: 3.5rem; }
  .tile { min-height: 10rem; }
}

/* Browsers that cannot paint gradient text show plain text instead of invisible text */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title span, .grad, .big--grad, .kicker { background: none; -webkit-text-fill-color: currentColor; color: inherit; }
}

/* "Page not found" page */
.notfound { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; padding-bottom: 4rem; }

/* Portrait at the top of the home page (placeholder initials until the photo arrives) */
.portrait-ring { width: 7rem; height: 7rem; margin: 0 auto 1.4rem; padding: 0.1875rem; border-radius: 50%; background: var(--grad); }
.portrait { display: block; width: 100%; height: 100%; border: 0.1875rem solid #000; border-radius: 50%; object-fit: cover; background: #111113; }
.portrait--placeholder { display: grid; place-items: center; color: #f5f5f7; font-size: 1.75rem; font-weight: 600; letter-spacing: .04em; }
.hero-links { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 1.75rem; }
@media (orientation: landscape) and (max-height: 540px) { .portrait-ring { width: 4.5rem; height: 4.5rem; margin-bottom: 0.75rem; } .portrait--placeholder { font-size: 1.15rem; } }
@media (prefers-reduced-motion: no-preference) {
  .js .portrait-ring { opacity: 0; transform: translateY(1.375rem) scale(.96); animation: rise 1s cubic-bezier(.2, .8, .2, 1) .05s forwards; }
}
/* Closing band of the home page: "Next" link and footer */
.tail { background: var(--bg-alt); color: var(--text); padding-top: 0.5rem; }
