/* Local fonts: no downloads or external font service needed. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/geist-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/geist-mono-latin.woff2") format("woff2");
}

/* Shared colours, typography and spacing: edit the design here. */
:root {
  --font-geist-sans: "Geist";
  --font-geist-mono: "Geist Mono";
  color-scheme: dark;
  --background: #101113;
  --foreground: #f4f4f5;
  --card: #181a1d;
  --secondary: #212428;
  --muted-foreground: #a2a6ae;
  --primary: #8db9ff;
  --primary-foreground: #0d1829;
  --border: #303236;
  --success: #a4d9b0;
  --portrait-overlay: linear-gradient(
    90deg,
    var(--background),
    transparent 18%,
    transparent 85%,
    var(--background)
  );
  --portrait-fade-start: 72%;
  --portrait-edge-mask: linear-gradient(
    to right,
    transparent,
    #000 18%,
    #000 85%,
    transparent
  );
  --portrait-mask: linear-gradient(
    to bottom,
    transparent,
    #000 5%,
    #000 var(--portrait-fade-start),
    transparent 100%
  );
  --marquee-mask: linear-gradient(
    to right,
    transparent,
    #000 6%,
    #000 94%,
    transparent
  );
  --type-wordmark: 1.75rem;
  --type-hero-name: clamp(3rem, min(12vw, 16svh), 9rem);
  --type-hero-statement: clamp(1.9rem, min(3.8vw, 6svh), 3.25rem);
  --type-hero-action: var(--type-label);
  --line-nameplate: 1;
  --height-header: clamp(3.5rem, 10svh, 6rem);
  --space-hero-inline: clamp(1rem, 3vw, 3rem);
  --space-hero-content-inline: clamp(1rem, 10vw, 12rem);
  --space-hero-bottom: clamp(1rem, 4svh, 3rem);
  --space-hero-copy: clamp(0.75rem, 2.5svh, 1.5rem);
  --space-marquee: clamp(0.75rem, 2.5svh, 1.75rem);
  --type-display: clamp(2.75rem, 5.5vw, 5rem);
  --type-section: clamp(2rem, 3.6vw, 3.25rem);
  --type-project: clamp(1.75rem, 3vw, 2.5rem);
  --type-heading: 1.375rem;
  --type-lead: 1.125rem;
  --type-body: 1rem;
  --type-label: 0.875rem;
  --type-meta: 0.75rem;
  --type-code: clamp(0.75rem, 1.2vw, 0.875rem);
  --line-display: 1.09;
  --line-heading: 1.2;
  --line-body: 1.75;
  --line-label: 1.5;
  --journey-muted: #c0c7d2;
  --journey-mint: #71dfbc;
  --journey-amber: #ffd087;
  --journey-lilac: #c4acff;
  --journey-ink: #10201b;
  --journey-blue-surface: #182b47;
  --journey-mint-surface: #142f2b;
  --journey-amber-surface: #28231c;
  --journey-amber-glow: #624824;
  --journey-lilac-surface: #262039;
  --shadow-preview: 0 1rem 3rem #0006;
  --type-chapter: clamp(2.25rem, 4.1vw, 3.65rem);
  --type-year: clamp(2.25rem, 4.5vw, 3.5rem);
  --space-chapter-card: clamp(1.25rem, 2.5vw, 2.25rem);
  --space-section: clamp(4.5rem, 7.5vw, 7rem);
  --space-example: 1.25rem;
  --space-example-detail: 0.5rem;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
svg {
  display: block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-geist-sans), Arial, sans-serif;
  font-size: var(--type-body);
  line-height: var(--line-body);
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 6px;
}
::selection {
  background: var(--primary);
  color: var(--primary-foreground);
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 500;
}
h1 {
  font-size: var(--type-display);
  line-height: var(--line-display);
  letter-spacing: -0.065em;
}
h2 {
  font-size: var(--type-section);
  line-height: var(--line-heading);
  letter-spacing: -0.045em;
}
h3 {
  font-size: var(--type-heading);
  line-height: var(--line-heading);
  letter-spacing: -0.025em;
}
svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  stroke-width: 1.5;
}
.shell {
  max-width: 1328px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 5rem);
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 20;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.5rem 1rem;
}
.skip-link:focus {
  top: 1rem;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--height-header);
  padding-inline: var(--space-hero-inline);
  gap: 1.5rem;
}
.wordmark {
  font-weight: 650;
  font-size: var(--type-wordmark);
  letter-spacing: -0.055em;
  line-height: var(--line-heading);
}
.wordmark span,
.hero-nameplate span,
.contact-panel h2 span {
  color: var(--primary);
}
.site-header nav {
  display: flex;
  gap: 2rem;
  color: var(--muted-foreground);
  font-size: var(--type-label);
}
.site-header nav a:hover,
.hero-links a:hover,
.text-link:hover,
.site-footer a:hover {
  color: var(--primary);
}
.nav-contact {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-block: 0.4rem;
  font-size: var(--type-label);
  white-space: nowrap;
}
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  grid-template-rows: minmax(0, 1fr) auto auto;
  height: calc(100svh - var(--height-header));
  padding-inline: var(--space-hero-content-inline);
  padding-bottom: var(--space-hero-bottom);
  align-items: center;
}
.hero-copy {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  margin-left: calc(-1 * var(--space-hero-inline));
  padding: var(--space-hero-copy) var(--space-hero-inline);
}
.hero-nameplate {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  z-index: 3;
  font-size: var(--type-hero-name);
  font-weight: 650;
  letter-spacing: -0.075em;
  line-height: var(--line-nameplate);
  padding-bottom: 0.12em;
  white-space: nowrap;
}
.hero-statement {
  font-size: var(--type-hero-statement);
  line-height: var(--line-display);
  letter-spacing: -0.05em;
  margin-top: var(--space-hero-copy);
}
.hero-statement span {
  color: var(--primary);
}
.eyebrow {
  font-size: var(--type-meta);
  font-family: var(--font-geist-mono), monospace;
  line-height: var(--line-label);
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  font-weight: 400;
}
.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.status-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--secondary);
}
.hero-description {
  color: var(--muted-foreground);
  max-width: 26rem;
  margin-top: var(--space-hero-copy);
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: var(--space-hero-copy);
}
.hero-actions .button {
  font-size: var(--type-hero-action);
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 1.15rem;
  min-height: 50px;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  font-size: var(--type-label);
  font-weight: 500;
  transition:
    background 0.2s,
    transform 0.2s;
}
.button:hover {
  transform: translateY(-2px);
}
.button-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}
.button-quiet {
  background: transparent;
  border: 1px solid var(--border);
}
.button-quiet:hover {
  background: var(--secondary);
}
.hero-links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-top: var(--space-hero-copy);
  font-size: var(--type-label);
  color: var(--muted-foreground);
}
.hero-links a,
.hero-links span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-links a svg:last-child {
  width: 0.85rem;
}
.hero-portrait {
  grid-area: 1 / 2 / 3 / 3;
  align-self: stretch;
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.hero-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--portrait-overlay);
  pointer-events: none;
}
.hero-portrait img {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  mask-image: var(--portrait-mask), var(--portrait-edge-mask);
  mask-composite: intersect;
}
.discipline-bar {
  grid-column: 1 / -1;
  margin-inline: calc(-1 * var(--space-hero-content-inline));
  align-self: stretch;
  min-width: 0;
  overflow: hidden;
  padding-block: var(--space-marquee);
  border-block: 1px solid var(--border);
  -webkit-mask-image: var(--marquee-mask);
  mask-image: var(--marquee-mask);
}
.discipline-track {
  display: flex;
  width: max-content;
  animation: discipline-roll 30s linear infinite;
  will-change: transform;
}
.discipline-set {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(12rem, 18vw, 16rem);
  align-items: center;
}
.discipline-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--muted-foreground);
  font-size: var(--type-label);
  white-space: nowrap;
}
.discipline-item img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  flex-shrink: 0;
}
.discipline-item .github-logo {
  filter: brightness(0) invert(1);
}
.discipline-bar:hover .discipline-track {
  animation-play-state: paused;
}
@keyframes discipline-roll {
  to {
    transform: translateX(-50%);
  }
}
.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding-block: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--border);
  border-block: 1px solid var(--border);
}
.proof-strip a {
  display: grid;
  gap: 0.25rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: var(--background);
}
.proof-strip a:hover strong {
  color: var(--primary);
}
.proof-strip strong {
  font-size: var(--type-lead);
  font-weight: 500;
  line-height: var(--line-heading);
}
.proof-strip small {
  color: var(--muted-foreground);
  font-size: var(--type-meta);
  line-height: var(--line-label);
}
/* The chapters share a reading path. */
.journey {
  --muted-foreground: var(--journey-muted);
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding-top: var(--space-section);
  view-timeline-name: --journey;
}
.journey-nav {
  position: sticky;
  top: 2rem;
  align-self: start;
  padding-block: 0.5rem;
}
.journey-nav > .eyebrow {
  color: var(--foreground);
  margin-bottom: 1.75rem;
}
.journey-stops {
  position: relative;
  display: grid;
  gap: 0.5rem;
}
.journey-stops::before,
.journey-stops::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 1.4rem;
  bottom: 1.4rem;
  width: 1px;
  background: var(--border);
}
.journey-stops::after {
  background: var(--primary);
  transform: scaleY(0);
  transform-origin: top;
}
.journey-stops a {
  display: flex;
  position: relative;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-size: var(--type-label);
  color: var(--muted-foreground);
}
.journey-stops a span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.75rem;
  flex-shrink: 0;
  background: var(--background);
  font: inherit;
  font-family: var(--font-geist-mono), monospace;
  font-size: var(--type-meta);
  color: var(--primary);
}
.journey-stops a:hover,
.journey-stops a:focus-visible {
  color: var(--foreground);
}
.journey-location {
  margin-top: 2rem;
  font-size: var(--type-meta);
  color: var(--muted-foreground);
}
.journey-content {
  min-width: 0;
}
.chapter {
  --chapter-accent: var(--primary);
  position: relative;
  padding-block: var(--space-section);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 2rem;
}
.chapter:first-child {
  padding-top: 0;
}
.chapter-experience,
.chapter-skills {
  --chapter-accent: var(--journey-mint);
}
.chapter-work {
  --chapter-accent: var(--journey-amber);
}
.chapter-research {
  --chapter-accent: var(--journey-lilac);
}
.chapter-heading {
  margin-bottom: 2.5rem;
}
.chapter-heading > div {
  min-width: 0;
}
.chapter .eyebrow {
  color: var(--chapter-accent);
}
.chapter-number {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.65rem;
  border: 1px solid color-mix(in srgb, var(--chapter-accent) 45%, transparent);
  border-radius: 50%;
  font-size: var(--type-label);
  letter-spacing: normal;
  background: color-mix(in srgb, var(--chapter-accent) 9%, var(--background));
}
.chapter h2 {
  margin-top: 1.5rem;
  font-size: var(--type-chapter);
  line-height: var(--line-display);
}
.chapter h2 span {
  color: var(--chapter-accent);
}
.chapter-lede {
  margin-top: 1.25rem;
  max-width: 38rem;
  font-size: var(--type-lead);
  color: var(--muted-foreground);
}
.chapter a.text-link {
  color: var(--chapter-accent);
}
.origin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 3rem);
}
.education-note {
  padding: var(--space-chapter-card);
  background: linear-gradient(145deg, var(--journey-blue-surface), var(--card));
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  border-radius: 1rem;
}
.education-note .eyebrow {
  font-size: var(--type-meta);
  letter-spacing: 0.045em;
}
.education-years {
  margin-block: 2rem;
  font-size: var(--type-year);
  line-height: var(--line-heading);
  letter-spacing: -0.06em;
  color: var(--foreground);
}
.education-years span {
  display: block;
  color: var(--primary);
  font-size: var(--type-heading);
  line-height: var(--line-label);
}
.education-note h3 {
  font-size: var(--type-lead);
}
.education-note > p:last-of-type {
  margin-top: 0.75rem;
  font-size: var(--type-label);
  color: var(--muted-foreground);
}
.leadership-note {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: var(--type-label);
}
.leadership-note span {
  display: block;
  font-family: var(--font-geist-mono), monospace;
  color: var(--primary);
  font-size: var(--type-meta);
}
.about-intro {
  font-size: var(--type-lead);
}
.about-body {
  margin-block: 1.25rem 1.75rem;
  color: var(--muted-foreground);
}
.experience-timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 1px solid color-mix(in srgb, var(--chapter-accent) 50%, var(--border));
}
.experience-row {
  position: relative;
  padding: var(--space-chapter-card);
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
}
.experience-row::before {
  content: '';
  position: absolute;
  left: -2.4rem;
  top: 2rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--chapter-accent);
  box-shadow: 0 0 0 5px var(--background);
}
.experience-row:last-child {
  background: linear-gradient(130deg, var(--journey-mint-surface), var(--card));
  border-color: color-mix(in srgb, var(--chapter-accent) 35%, var(--border));
}
.experience-row > p {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-geist-mono), monospace;
  font-size: var(--type-meta);
  color: var(--chapter-accent);
}
.now-label {
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  background: var(--journey-mint);
  color: var(--journey-ink);
}
.experience-row h3 {
  font-size: var(--type-project);
}
.experience-row div > p {
  margin-top: 1rem;
  color: var(--muted-foreground);
}
.experience-row .text-link,
.experience-row div > .company-name {
  display: inline-flex;
  margin-top: 0.6rem;
  font-size: var(--type-label);
  color: var(--chapter-accent);
}
.experience-row .employer-project {
  margin-top: 1.5rem;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}
.section-heading > .text-link {
  flex-shrink: 0;
  margin-bottom: 0.4rem;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--type-label);
}
.featured-project {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  border: 1px solid color-mix(in srgb, var(--chapter-accent) 35%, var(--border));
  border-radius: 1rem;
  overflow: hidden;
  background: var(--journey-amber-surface);
}
.project-copy {
  padding: var(--space-chapter-card);
  align-self: center;
}
.project-copy h3 {
  margin-top: 1.25rem;
  font-size: var(--type-project);
}
.project-copy > p:not(.eyebrow) {
  margin-top: 1rem;
  color: var(--muted-foreground);
}
.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-block: 1.5rem;
}
.tags span {
  padding: 0.25rem 0.65rem;
  border-radius: 0.3rem;
  font-size: var(--type-meta);
  background: color-mix(in srgb, var(--chapter-accent) 10%, var(--card));
  color: var(--chapter-accent);
}
.project-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.case-study {
  margin-block: 1.5rem;
  padding-block: 1rem;
  border-block: 1px solid var(--border);
}
.case-study summary {
  cursor: pointer;
  color: var(--chapter-accent);
  font-size: var(--type-label);
  font-weight: 500;
}
.case-study-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.case-study-grid p {
  color: var(--muted-foreground);
  font-size: var(--type-label);
}
.case-study-grid strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--foreground);
  font-weight: 500;
}
.chapter-work .button-primary {
  background: var(--chapter-accent);
  color: var(--journey-ink);
}
.project-copy .project-footnote {
  font-size: var(--type-meta);
  margin-top: 1.5rem;
}
.app-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  padding: var(--space-chapter-card);
  background: linear-gradient(155deg, var(--journey-amber-glow), var(--journey-amber-surface));
}
.app-preview img {
  width: min(100%, 280px);
  height: auto;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-preview);
}
.preview-label,
.app-preview figcaption {
  font-family: var(--font-geist-mono), monospace;
  font-size: var(--type-meta);
  color: var(--chapter-accent);
  text-align: center;
}
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
.package-project {
  margin-top: var(--space-example);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  scroll-margin-top: 5rem;
}
.package-project > * {
  min-width: 0;
}
.package-project h3 {
  margin-top: 0;
}
.project-copy .package-name {
  margin-top: var(--space-example-detail);
  color: var(--chapter-accent);
  font-size: var(--type-label);
  overflow-wrap: anywhere;
}
.package-name code,
.package-example code {
  font-family: var(--font-geist-mono), monospace;
}
.package-example {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-example);
  padding: var(--space-chapter-card);
  background: var(--background);
}
.package-example figcaption {
  color: var(--chapter-accent);
  font-size: var(--type-heading);
  font-weight: 500;
  line-height: var(--line-heading);
}
.package-example .example-context {
  margin-top: calc(-1 * var(--space-example-detail));
}
.package-example pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: var(--type-code);
  line-height: var(--line-body);
}
.code-keyword {
  color: var(--chapter-accent);
}
.code-comment,
.example-context,
.example-note {
  color: var(--journey-muted);
  font-size: var(--type-label);
}
.calculation-result {
  padding-block: var(--space-example);
  border-block: 1px solid var(--border);
}
.calculation-result strong {
  color: var(--chapter-accent);
  font-size: var(--type-heading);
  font-weight: 500;
}
.calculation-result p {
  margin-top: var(--space-example-detail);
  color: var(--journey-muted);
  font-size: var(--type-label);
}
.project-footnote a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.skill-proof {
  margin-top: var(--space-example);
}
.small-project {
  display: flex;
  align-items: start;
  flex-direction: column;
  padding: var(--space-chapter-card);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
}
.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1.75rem;
}
.project-topline svg {
  color: var(--chapter-accent);
}
.small-project h3 {
  font-size: var(--type-heading);
}
.small-project > p {
  margin-top: 1rem;
  color: var(--muted-foreground);
}
.small-project .text-link {
  margin-top: auto;
}
.chapter-skills > .chapter-lede {
  margin-top: -0.5rem;
  margin-bottom: 2.5rem;
}
.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.skill-grid > div {
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--border);
}
.skill-grid > div:first-child {
  padding-left: 0;
}
.skill-grid > div:last-child {
  border-right: 0;
}
.skill-index {
  font-family: var(--font-geist-mono), monospace;
  font-size: var(--type-project);
  color: var(--chapter-accent);
}
.skill-grid h3 {
  margin-top: 1.5rem;
  font-size: var(--type-lead);
}
.skill-grid p {
  margin-top: 0.75rem;
  font-size: var(--type-label);
  color: var(--muted-foreground);
}
.section-aside {
  max-width: 13rem;
  color: var(--muted-foreground);
  font-size: var(--type-label);
}
.research-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: var(--space-chapter-card);
  margin-top: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--chapter-accent) 25%, var(--border));
  border-radius: 1rem;
  background: linear-gradient(120deg, var(--journey-lilac-surface), var(--card));
}
.research-row > .eyebrow {
  grid-column: 1 / -1;
}
.research-row h3 {
  font-size: var(--type-heading);
  overflow-wrap: anywhere;
}
.research-row p {
  margin-top: 0.75rem;
  color: var(--muted-foreground);
}
.research-row .research-meta {
  font-size: var(--type-meta);
}
.round-link {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--chapter-accent);
  border-radius: 50%;
  color: var(--chapter-accent);
}
.round-link:hover {
  background: var(--chapter-accent);
  color: var(--journey-ink);
}
.chapter-contact {
  padding-bottom: var(--space-section);
  border-bottom: 0;
}
.contact-panel {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border-radius: 1rem;
  background: var(--primary);
  color: var(--primary-foreground);
}
.contact-panel .eyebrow,
.contact-panel h2 span {
  color: inherit;
}
.contact-panel .chapter-number {
  border-color: currentColor;
  background: transparent;
}
.contact-panel h2 {
  font-size: var(--type-chapter);
}
.contact-lede {
  max-width: 38rem;
  margin-top: 1.25rem;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid currentColor;
  font-size: var(--type-body);
  overflow-wrap: anywhere;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1.5rem;
}
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--type-label);
}
.contact-links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}
.contact-panel a:focus-visible {
  outline-color: currentColor;
}
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem;
  border-top: 1px solid var(--border);
}
.site-footer p,
.site-footer > a:last-child {
  color: var(--muted-foreground);
  font-size: var(--type-label);
}
.site-footer > a:last-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* Motion follows scrolling without hiding content in unsupported browsers. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) and (animation-range: entry 0% entry 100%) {
    .reveal {
      animation: chapter-arrive 1ms linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 50%;
    }
    .reveal:focus-within {
      animation: none;
    }
    .journey-stops::after {
      animation: journey-progress 1ms linear both;
      animation-timeline: --journey;
      animation-range: contain 0% contain 100%;
    }
  }
}
@keyframes chapter-arrive {
  from {
    opacity: 0.55;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes journey-progress {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .small-project,
  .research-row {
    transition: border-color 0.2s, background-color 0.2s;
  }
  .small-project:hover,
  .research-row:hover {
    border-color: var(--chapter-accent);
  }
}
@media (max-width: 1000px) {
  .proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .journey {
    display: block;
    padding-top: 0;
  }
  .journey-content {
    padding-top: 2rem;
  }
  .journey-nav {
    top: 0;
    z-index: 5;
    margin-inline: calc(-1 * clamp(1.25rem, 5vw, 5rem));
    padding: 0.5rem clamp(1.25rem, 5vw, 5rem);
    background: var(--background);
    border-bottom: 1px solid var(--border);
  }
  .journey-nav > .eyebrow,
  .journey-location,
  .journey-stops::before,
  .journey-stops::after {
    display: none;
  }
  .journey-stops {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .journey-stops a {
    flex-shrink: 0;
  }
  .chapter {
    scroll-margin-top: 5rem;
  }
  .chapter:first-child {
    padding-top: 1.5rem;
  }
}
@media (max-width: 900px) {
  :root {
    --space-hero-content-inline: var(--space-hero-inline);
  }
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .hero-links { gap: 1rem; }
  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}
@media (max-width: 650px) {
  :root {
    --portrait-fade-start: 84%;
    --type-hero-name: min(20vw, 12svh, 7.5rem);
    --type-hero-statement: clamp(1.5rem, min(6.5vw, 4svh), 2rem);
    --type-hero-action: clamp(0.75rem, 3.5vw, 0.875rem);
    --space-hero-copy: clamp(0.5rem, 1.5svh, 0.875rem);
  }
  .site-header {
    gap: 0.5rem;
    height: auto;
    min-height: var(--height-header);
    padding-block: 0.5rem;
    flex-wrap: wrap;
  }
  .site-header nav { gap: 0.75rem; }
  .site-header nav a:last-child { display: none; }
  .nav-contact { gap: 0.3rem; }
  .hero {
    height: auto;
    min-height: calc(100svh - var(--height-header));
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(clamp(12rem, 70vw, 20rem), 1fr) auto auto auto;
  }
  .hero-portrait {
    grid-area: 1 / 1;
  }
  .hero-copy {
    grid-area: 2 / 1;
    max-height: none;
    overflow-y: visible;
  }
  .hero-nameplate {
    grid-row: 3;
  }
  .hero .eyebrow { letter-spacing: 0.025em; }
  .hero-description { max-width: 100%; }
  .hero-actions { gap: 0.5rem; }
  .hero-actions .button {
    gap: 0.5rem;
    padding-inline: 0.75rem;
  }
  .proof-strip {
    grid-template-columns: minmax(0, 1fr);
  }
  .origin-grid,
  .featured-project,
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .skill-grid { grid-template-columns: 1fr 1fr; }
  .skill-grid > div { padding: 1.5rem 1rem; }
  .skill-grid > div:nth-child(odd) { padding-left: 0; }
  .skill-grid > div:nth-child(even) { border-right: 0; }
  .skill-grid > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .education-years span {
    display: inline;
    padding-inline: 0.3rem;
    font-size: inherit;
  }
  .experience-timeline { padding-left: 1.25rem; }
  .experience-row::before { left: -1.65rem; }
  .app-preview { padding-block: 2rem; }
  .app-preview img { width: min(100%, 250px); }
  .site-footer { flex-wrap: wrap; }
}
/* Keep the name and technology strip visible even in a short landscape window. */
@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --height-header: 3rem;
    --type-hero-statement: clamp(1.25rem, 5svh, 1.75rem);
    --type-hero-name: clamp(2.5rem, 14svh, 4rem);
    --space-hero-copy: 0.5rem;
    --space-marquee: 0.5rem;
  }
  .hero {
    height: calc(100svh - var(--height-header));
    min-height: 0;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
  }
  .hero-copy { grid-area: 1 / 1; }
  .hero-portrait { grid-area: 1 / 2 / 3 / 3; }
  .hero-nameplate { grid-row: 2; }
  .hero-description {
    font-size: var(--type-label);
    line-height: var(--line-label);
  }
  .hero-actions .button {
    min-height: 44px;
    padding-block: 0.5rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .discipline-set[aria-hidden="true"] { display: none; }
  .discipline-bar {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
}
@media print {
  .journey { display: block; }
  .journey-nav { display: none; }
  .reveal { animation: none !important; }
}
