/* Design tokens: Apple Minimal design system */
:root {
  color-scheme: light;
  --color-primary: #0071E3;
  --color-secondary: #2997FF;
  --color-tertiary: #0066CC;
  --color-neutral: #1D1D1F;
  --color-surface: #FFFFFF;
  --color-background: #FFFFFF;
  --color-on-surface: #1D1D1F;
  --color-muted-surface: #F5F5F7;
  --color-border: #E5E7EB;
  --color-accent: #0071E3;
  --color-error: #D92D20;
  --color-dark-background: #1D1D1F;
  --color-on-dark: #FFFFFF;
  --color-dark-secondary: #F5F5F7;

  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --type-display-size: 56px;
  --type-display-weight: 700;
  --type-display-line-height: 67px;
  --type-headline-lg-size: 47px;
  --type-headline-lg-weight: 600;
  --type-headline-lg-line-height: 60px;
  --type-headline-md-size: 40px;
  --type-headline-md-weight: 600;
  --type-headline-md-line-height: 44px;
  --type-headline-sm-size: 33px;
  --type-headline-sm-weight: 600;
  --type-headline-sm-line-height: 40px;
  --type-body-lg-size: 28px;
  --type-body-lg-weight: 400;
  --type-body-lg-line-height: 42px;
  --type-body-md-size: 17px;
  --type-body-md-weight: 400;
  --type-body-md-line-height: 24px;
  --type-body-sm-size: 15px;
  --type-body-sm-weight: 400;
  --type-body-sm-line-height: 22px;
  --type-label-lg-size: 17px;
  --type-label-lg-weight: 400;
  --type-label-lg-line-height: 24px;
  --type-label-md-size: 15px;
  --type-label-md-weight: 400;
  --type-label-md-line-height: 22px;
  --type-label-sm-size: 12px;
  --type-label-sm-weight: 500;
  --type-label-sm-line-height: 16px;
  --type-nav-size: 12px;
  --type-nav-weight: 400;
  --type-nav-line-height: 16px;
  --type-button-size: 17px;
  --type-button-weight: 400;
  --type-button-line-height: 24px;
  --letter-spacing: 0;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 54px;
  --space-xl: 70px;
  --button-height: 44px;
  --button-padding-block: 11px;
  --button-padding-inline: 21px;
  --card-padding: 16px;
  --input-padding-block: 11px;
  --input-padding-inline: 16px;
  --chip-padding-block: 6px;
  --chip-padding-inline: 12px;

  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --border-width: 1px;
  --focus-ring-width: 3px;
  --focus-ring-offset: 2px;
  --shadow-subtle: 0 8px 24px rgb(29 29 31 / 8%);
  --shadow-lifted: 0 16px 32px rgb(29 29 31 / 12%);
  --motion-duration-fast: 200ms;
  --motion-duration-base: 400ms;
  --motion-duration-slow: 800ms;
  --motion-stagger: 100ms;
  --motion-item-stagger: 80ms;
  --motion-hover-lift: -6px;
  --motion-float-distance: -4px;
  --motion-fast: 180ms;
  --motion-standard: 240ms;
  --motion-easing: cubic-bezier(0.25, 0.1, 0.25, 1);

  --bs-body-font-family: var(--font-sans);
  --bs-body-font-size: var(--type-body-md-size);
  --bs-body-font-weight: var(--type-body-md-weight);
  --bs-body-line-height: var(--type-body-md-line-height);
  --bs-body-color: var(--color-on-surface);
  --bs-body-bg: var(--color-background);
  --bs-border-color: var(--color-border);
  --bs-primary: var(--color-primary);
  --bs-link-color: var(--color-tertiary);
  --bs-link-hover-color: var(--color-primary);
}

/* Base and accessibility */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-lg);
}

body {
  min-width: 0;
  font-family: var(--font-sans);
  font-size: var(--type-body-md-size);
  line-height: var(--type-body-md-line-height);
  letter-spacing: var(--letter-spacing);
  color: var(--color-on-surface);
  background: var(--color-background);
  overflow-wrap: anywhere;
}

body:focus {
  outline: none;
}

a {
  color: var(--color-tertiary);
  text-underline-offset: var(--space-xs);
  transition: background-color var(--motion-duration-fast) var(--motion-easing);
}

a:hover {
  color: var(--color-primary);
}

a:focus-visible,
button:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-secondary);
  outline-offset: var(--focus-ring-offset);
}

::selection {
  color: var(--color-on-dark);
  background: var(--color-primary);
}

/* Sticky navigation */
.site-header {
  position: sticky;
  z-index: 1020;
  top: 0;
  background-color: transparent;
  border-bottom: var(--border-width) solid transparent;
  transition: background-color var(--motion-duration-base) var(--motion-easing);
}

.site-header.is-scrolled {
  background-color: color-mix(in srgb, var(--color-surface) 86%, transparent);
  border-bottom-color: color-mix(in srgb, var(--color-border) 78%, transparent);
  backdrop-filter: blur(var(--space-sm));
}

.navbar {
  --bs-navbar-padding-y: var(--space-xs);
  --bs-navbar-color: var(--color-neutral);
  --bs-navbar-hover-color: var(--color-tertiary);
  --bs-navbar-active-color: var(--color-primary);
}

.navbar-brand {
  margin-right: var(--space-md);
  color: var(--color-neutral);
  font-size: var(--type-label-md-size);
  font-weight: 600;
}

.navbar-nav {
  gap: var(--space-xs);
}

.navbar .nav-link {
  position: relative;
  min-height: var(--button-height);
  display: inline-flex;
  align-items: center;
  padding-inline: var(--space-xs);
  color: var(--color-neutral);
  font-size: var(--type-nav-size);
  font-weight: var(--type-nav-weight);
  line-height: var(--type-nav-line-height);
  letter-spacing: var(--letter-spacing);
}

.navbar .nav-link::after {
  position: absolute;
  right: var(--space-xs);
  bottom: var(--space-xs);
  left: var(--space-xs);
  height: var(--border-width);
  background-color: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--motion-duration-fast) var(--motion-easing);
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--color-primary);
}

.navbar .nav-link:hover::after,
.navbar .nav-link:focus-visible::after,
.navbar .nav-link.active::after {
  transform: scaleX(1);
}

.navbar-toggler {
  min-width: var(--button-height);
  min-height: var(--button-height);
  padding: var(--space-xs);
  border-color: var(--color-border);
  border-radius: var(--radius-sm);
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Buttons */
.btn {
  min-height: var(--button-height);
  padding: var(--button-padding-block) var(--button-padding-inline);
  border-radius: var(--radius-full);
  font-size: var(--type-button-size);
  font-weight: var(--type-button-weight);
  line-height: var(--type-button-line-height);
  letter-spacing: var(--letter-spacing);
  transition: transform var(--motion-duration-fast) var(--motion-easing), background-color var(--motion-duration-fast) var(--motion-easing);
}

.btn:hover,
.btn:focus-visible {
  transform: scale(1.02);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  color: var(--color-neutral);
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  color: var(--color-tertiary);
  background-color: var(--color-muted-surface);
  border-color: var(--color-primary);
}

.btn-primary {
  --bs-btn-color: var(--color-on-dark);
  --bs-btn-bg: var(--color-primary);
  --bs-btn-border-color: var(--color-primary);
  --bs-btn-hover-color: var(--color-neutral);
  --bs-btn-hover-bg: var(--color-secondary);
  --bs-btn-hover-border-color: var(--color-secondary);
  --bs-btn-active-color: var(--color-on-dark);
  --bs-btn-active-bg: var(--color-tertiary);
  --bs-btn-active-border-color: var(--color-tertiary);
  --bs-btn-focus-shadow-rgb: 0, 113, 227;
}

.btn-secondary {
  --bs-btn-color: var(--color-tertiary);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--color-secondary);
  --bs-btn-hover-color: var(--color-tertiary);
  --bs-btn-hover-bg: var(--color-muted-surface);
  --bs-btn-hover-border-color: var(--color-primary);
  --bs-btn-active-color: var(--color-tertiary);
  --bs-btn-active-bg: var(--color-muted-surface);
  --bs-btn-active-border-color: var(--color-primary);
}

/* Hero: a white stage with the name cut out of it; scrolling flies through the letters into the photo.
   js/main.js drives --mask-scale, --mask-fade, --meta-fade and --intro on .hero-scroll.is-animated. */
.hero-scroll {
  --mask-scale: 1;
  --mask-fade: 1;
  --meta-fade: 1;
  --intro: 1;
  --mx: 0;
  --my: 0;
  position: relative;
}

.hero-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: calc(100svh - var(--button-height) - var(--space-md));
  min-height: 520px;
  background: #000;
}

.hero-photo {
  position: absolute;
  inset: -3%;
  z-index: 0;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  transform: translate(calc(var(--mx) * -14px), calc(var(--my) * -10px)) scale(calc(1 + (1 - var(--intro)) * 0.08));
  transition: transform 300ms var(--motion-easing);
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 62%) 0%, rgb(0 0 0 / 25%) 45%, rgb(0 0 0 / 0%) 65%),
    linear-gradient(180deg, rgb(0 0 0 / 0%) 50%, rgb(0 0 0 / 55%) 100%);
  opacity: var(--intro);
}

/* White sheet with black type; "screen" blending turns the white opaque and the black letters into windows onto the photo. */
.hero-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: var(--color-background);
  mix-blend-mode: screen;
  opacity: var(--mask-fade);
  transform: scale(var(--mask-scale));
  transform-origin: 50% 46%;
  pointer-events: none;
}

/* Only promote the mask while it is actually zooming, so it is re-drawn sharp and complete at rest */
.hero-scroll.is-zooming .hero-mask {
  will-change: transform, opacity;
}

.hero-scroll.is-through .hero-mask {
  visibility: hidden;
}

.hero-name {
  margin: 0;
  --name-size: min(22.5vw, 30vh);
  color: #000;
  font-size: var(--name-size);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: normal;
}

.hero-name span {
  display: block;
}

/* "RAZA" is set larger so both words span the same width */
.hero-name span:first-child {
  font-size: 1.56em;
  line-height: 0.8;
}

.hero-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: var(--space-sm);
  padding: var(--space-md) max(var(--space-sm), calc((100vw - 1200px) / 2));
  color: var(--color-neutral);
  font-size: var(--type-label-md-size);
  line-height: var(--type-label-md-line-height);
  opacity: var(--meta-fade);
  pointer-events: none;
}

.hero-meta-cue {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--type-label-sm-size);
}

.hero-meta-arrow {
  display: inline-block;
  animation: hero-cue 1.8s ease-in-out infinite;
}

.hero-meta-clock {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hero-intro {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  max-width: 1200px;
  margin-inline: auto;
  padding: var(--space-lg) var(--space-sm);
  color: var(--color-on-dark);
  opacity: var(--intro);
  transform: translateY(calc((1 - var(--intro)) * 60px));
  pointer-events: none;
}

.hero-scroll:not(.is-animated) .hero-intro,
.hero-intro.is-live {
  pointer-events: auto;
}

.hero-intro-kicker {
  margin-bottom: var(--space-sm);
  color: rgb(255 255 255 / 80%);
  font-size: var(--type-label-md-size);
  letter-spacing: 0.04em;
}

.hero-intro-statement {
  max-width: min(8.5em, 100%);
  margin-bottom: var(--space-sm);
  font-size: clamp(36px, 4.6vw, 68px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
}

.hero-intro-statement em {
  font-style: normal;
  color: oklch(85% 0.15 75);
}

.hero-intro-lead {
  max-width: min(30em, 40vw);
  margin-bottom: var(--space-md);
  color: rgb(255 255 255 / 85%);
  font-size: clamp(var(--type-body-md-size), 1.5vw, 20px);
  line-height: 1.5;
}

.hero-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.btn-ghost-light {
  --bs-btn-color: var(--color-on-dark);
  --bs-btn-border-color: rgb(255 255 255 / 70%);
  --bs-btn-hover-color: var(--color-neutral);
  --bs-btn-hover-bg: var(--color-on-dark);
  --bs-btn-hover-border-color: var(--color-on-dark);
  --bs-btn-active-color: var(--color-neutral);
  --bs-btn-active-bg: var(--color-on-dark);
  backdrop-filter: blur(6px);
}

/* Scroll-driven version: the section gets tall and the stage pins while the name zooms open. */
.hero-scroll.is-animated {
  height: 260vh;
}

.hero-scroll.is-animated .hero-stage {
  position: sticky;
  top: 0;
  height: 100svh;
}

/* Without the scroll effect (no JS or reduced motion): name and photo share the stage, intro sits below on white. */
.hero-scroll:not(.is-animated) .hero-shade {
  display: none;
}

.hero-scroll:not(.is-animated) .hero-intro {
  position: static;
  color: var(--color-neutral);
  opacity: 1;
  transform: none;
}

.hero-scroll:not(.is-animated) .hero-intro-kicker,
.hero-scroll:not(.is-animated) .hero-intro-lead {
  color: color-mix(in srgb, var(--color-neutral) 75%, transparent);
}

.hero-scroll:not(.is-animated) .hero-intro-statement em {
  color: var(--color-primary);
}

.hero-scroll:not(.is-animated) .btn-ghost-light {
  --bs-btn-color: var(--color-primary);
  --bs-btn-border-color: var(--color-primary);
}

/* Entrance: the name letters rise in on load */
.hero-name span {
  animation: hero-name-in 1000ms cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.hero-name span + span {
  animation-delay: 120ms;
}

@keyframes hero-name-in {
  from {
    opacity: 0;
    transform: translateY(0.25em);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-cue {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(4px);
  }
}

@media (max-width: 575.98px) {
  .hero-meta {
    grid-template-columns: 1fr 1fr;
  }

  .hero-meta-cue {
    display: none;
  }

  .hero-scroll.is-animated .hero-intro {
    top: calc(var(--button-height) + var(--space-md));
    bottom: auto;
    padding-top: var(--space-md);
  }

  .hero-scroll.is-animated .hero-shade {
    background: linear-gradient(180deg, rgb(0 0 0 / 70%) 0%, rgb(0 0 0 / 45%) 50%, rgb(0 0 0 / 0%) 72%);
  }

  .hero-intro-lead {
    max-width: none;
  }

  .hero-intro-actions .btn {
    flex: 1 1 auto;
  }
}

.eyebrow,
.project-kicker {
  margin-bottom: var(--space-xs);
  color: var(--color-tertiary);
  font-size: var(--type-label-sm-size);
  font-weight: var(--type-label-sm-weight);
  line-height: var(--type-label-sm-line-height);
  letter-spacing: var(--letter-spacing);
}

/* Full-width section bands */
.section-band {
  padding-block: var(--space-xl);
  scroll-margin-top: var(--space-lg);
}

.section-container {
  max-width: 960px;
}

.projects-container {
  max-width: 1200px;
}

.section-dark {
  color: var(--color-on-dark);
  background: var(--color-dark-background);
}

.section-muted {
  background: var(--color-muted-surface);
}

.section-dark .eyebrow,
.section-dark a:not(.btn) {
  color: var(--color-secondary);
}

.section-dark a:not(.btn):hover {
  color: var(--color-on-dark);
}

.section-layout {
  --bs-gutter-x: var(--space-md);
  --bs-gutter-y: var(--space-md);
}

.section-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-illustration {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin-inline: auto;
}

.illustration-panel {
  width: 100%;
  padding: var(--card-padding);
  background: var(--color-surface);
  border-radius: var(--radius-md);
}

.section-title {
  max-width: 800px;
  margin: 0 0 var(--space-md);
  color: inherit;
  font-size: var(--type-headline-md-size);
  font-weight: var(--type-headline-md-weight);
  line-height: var(--type-headline-md-line-height);
  letter-spacing: var(--letter-spacing);
}

.text-center .section-title {
  margin-inline: auto;
}

.section-lead {
  max-width: 760px;
  margin: 0 auto var(--space-sm);
  font-size: var(--type-body-lg-size);
  line-height: var(--type-body-lg-line-height);
}

.section-copy {
  max-width: 680px;
  margin: 0 auto;
  color: var(--color-dark-secondary);
}

/* Experience timeline */
.experience-list {
  border-top: var(--border-width) solid var(--color-border);
}

.experience-item {
  padding-block: var(--space-lg);
  border-bottom: var(--border-width) solid var(--color-border);
}

.experience-heading {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.experience-item h3,
.project-tile h3,
.subsection-title {
  margin: 0 0 var(--space-xs);
  font-size: var(--type-headline-sm-size);
  font-weight: var(--type-headline-sm-weight);
  line-height: var(--type-headline-sm-line-height);
}

.experience-company,
.experience-meta,
.experience-project,
.education-item p,
.certificate-source {
  margin-bottom: 0;
}

.experience-company {
  font-weight: 600;
}

.experience-meta {
  flex: 0 0 auto;
  text-align: right;
  font-size: var(--type-body-sm-size);
  line-height: var(--type-body-sm-line-height);
}

.experience-meta span {
  display: block;
}

.experience-project {
  margin-bottom: var(--space-xs);
  font-weight: 600;
}

.experience-item ul,
.certificate-list {
  margin: 0;
  padding-left: var(--space-md);
}

.experience-item li + li,
.certificate-list li + li {
  margin-top: var(--space-xs);
}

/* About: live integration map + scroll-lit lead paragraph */
.about-map {
  margin: 0;
}

.about-map svg {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  margin-inline: auto;
  overflow: visible;
  font-family: var(--font-sans);
}

.map-line {
  fill: none;
  stroke: rgb(255 255 255 / 16%);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  transition: stroke var(--motion-duration-fast) var(--motion-easing), stroke-width var(--motion-duration-fast) var(--motion-easing);
}

.map-packet {
  fill: oklch(80% 0.16 var(--h));
  filter: drop-shadow(0 0 4px oklch(80% 0.16 var(--h)));
}

.map-packet-dim {
  opacity: 0.55;
}

.map-node rect {
  fill: var(--color-dark-background);
  stroke: oklch(75% 0.15 var(--h));
  stroke-width: 1.5;
  transition: fill var(--motion-duration-fast) var(--motion-easing);
}

.map-node text,
.map-hub text {
  fill: var(--color-on-dark);
  font-size: 13px;
  font-weight: 600;
  text-anchor: middle;
}

.about-map .map-sub {
  fill: rgb(255 255 255 / 55%);
  font-size: 10px;
  font-weight: 400;
}

.map-node {
  outline: none;
}

.map-node:hover rect,
.map-node:focus-visible rect {
  fill: oklch(32% 0.08 var(--h));
}

.map-flow:hover .map-line {
  stroke: rgb(255 255 255 / 45%);
  stroke-dasharray: none;
}

.about-map .map-label {
  fill: rgb(255 255 255 / 50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-anchor: middle;
  text-transform: uppercase;
}

.map-divider {
  stroke: rgb(255 255 255 / 12%);
  stroke-width: 1;
}

.map-hub-core {
  fill: var(--color-primary);
}

.map-hub-ring {
  fill: none;
  stroke: var(--color-secondary);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: map-ring 3s ease-out infinite;
}

.map-hub-ring-late {
  animation-delay: 1.5s;
}

@keyframes map-ring {
  from {
    opacity: 0.7;
    transform: scale(0.9);
  }

  to {
    opacity: 0;
    transform: scale(1.6);
  }
}

@media (min-width: 992px) {
  .about-map-col {
    align-self: stretch;
  }

  .about-map {
    position: sticky;
    top: 18vh;
  }
}

.about-lead {
  margin-inline: 0;
}

.lead-key {
  color: var(--color-secondary);
}

/* Words are wrapped by js/main.js; each lights up as the paragraph scrolls past */
.scrub-word {
  opacity: 0.22;
  transition: opacity 250ms linear;
}

.scrub-word.is-lit {
  opacity: 1;
}

/* Experience scroll layout: job title pinned on the left, bullets scroll and light up at the centre */
.experience-container {
  max-width: 1100px;
}

.experience-list {
  --exp-hue-start: 210;
  --exp-hue-end: 510;
  --exp-dim: 0.25;
  --exp-step: calc((var(--exp-hue-end) - var(--exp-hue-start)) / (var(--count, 6) - 1));
}

.experience-item {
  --exp-color: oklch(54% 0.17 calc(var(--exp-hue-start) + var(--exp-step) * var(--i, 0)));
  position: relative;
  padding-left: var(--space-md);
}

.experience-item::before {
  position: absolute;
  top: var(--space-lg);
  bottom: var(--space-lg);
  left: 0;
  width: 3px;
  border-radius: var(--radius-full);
  background: var(--exp-color);
  content: "";
}

.experience-item .experience-company {
  color: var(--exp-color);
}

.experience-item ul {
  margin-top: var(--space-sm);
}

@media (min-width: 992px) {
  .experience-item {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-lg);
    align-items: start;
  }

  .experience-side {
    position: sticky;
    top: 30vh;
  }

  .experience-side .experience-heading {
    display: block;
  }

  .experience-side .experience-meta {
    margin-top: var(--space-xs);
    text-align: left;
  }

  .experience-item ul {
    margin-top: 0;
  }

  .experience-item li + li {
    margin-top: var(--space-md);
  }
}

@supports (animation-timeline: view()) and (animation-range: 0% 100%) {
  .experience-item li {
    animation: exp-bullet linear both;
    animation-timeline: view();
    animation-range: cover 25% cover 75%;
  }
}

@keyframes exp-bullet {
  0% {
    opacity: var(--exp-dim);
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: var(--exp-dim);
  }
}

/* Fallback for browsers without scroll-driven animations (driven by js/main.js) */
.exp-fallback .experience-item li {
  opacity: var(--exp-dim);
  transition: opacity var(--motion-duration-base) var(--motion-easing);
}

.exp-fallback .experience-item li.is-active {
  opacity: 1;
}

/* Selected project tiles */
.project-grid {
  --bs-gutter-x: var(--space-md);
  --bs-gutter-y: var(--space-md);
}

.project-tile {
  padding: var(--card-padding);
  color: var(--color-on-surface);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: transform var(--motion-duration-fast) var(--motion-easing), box-shadow var(--motion-duration-fast) var(--motion-easing);
}

.project-tile:hover,
.project-tile:focus-visible {
  transform: translateY(var(--motion-hover-lift));
  box-shadow: var(--shadow-lifted);
}

.project-tile:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-secondary);
  outline-offset: var(--focus-ring-offset);
}

.project-tile h3 {
  font-size: var(--type-headline-sm-size);
}

.project-tile p {
  margin-bottom: var(--space-sm);
}

.project-tile .project-kicker {
  margin-bottom: var(--space-xs);
}

.project-tile .project-tools {
  margin: 0;
  color: var(--color-tertiary);
  font-size: var(--type-body-sm-size);
  line-height: var(--type-body-sm-line-height);
}

/* Numbered project stack: cards pin and pile up as you scroll */
.project-stack {
  display: flex;
  flex-direction: column;
}

.project-stack .project-tile {
  position: sticky;
  top: calc(var(--space-xl) + var(--i, 0) * var(--space-md));
  margin-bottom: 18vh;
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
}

.project-stack .project-tile:last-child {
  margin-bottom: 0;
}

.project-number {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
  font-size: var(--type-display-size);
  font-weight: var(--type-display-weight);
  line-height: 1;
  letter-spacing: -0.03em;
}

/* Technology marquee: an endless strip of tools under the hero */
.tech-marquee {
  overflow: hidden;
  padding-block: var(--space-md);
  border-block: var(--border-width) solid var(--color-border);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.tech-marquee-track {
  display: flex;
  width: max-content;
  animation: tech-marquee 45s linear infinite;
}

.tech-marquee:hover .tech-marquee-track {
  animation-play-state: paused;
}

.tech-marquee-list {
  display: flex;
  flex-shrink: 0;
  gap: var(--space-lg);
  margin: 0;
  padding: 0 var(--space-lg) 0 0;
  list-style: none;
}

.tech-marquee-list li {
  color: var(--color-neutral);
  font-size: var(--type-body-lg-size);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0.5;
  transition: opacity var(--motion-duration-fast) var(--motion-easing);
}

.tech-marquee-list li:hover {
  opacity: 1;
}

@keyframes tech-marquee {
  to {
    transform: translateX(-50%);
  }
}

/* About stats: numbers count up when they scroll into view */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0 0;
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding-top: var(--space-sm);
  border-top: var(--border-width) solid rgb(255 255 255 / 20%);
}

.stat dd {
  margin: 0;
  color: var(--color-on-dark);
  font-size: var(--type-headline-lg-size);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat dt {
  margin-top: var(--space-xs);
  color: rgb(255 255 255 / 70%);
  font-size: var(--type-body-sm-size);
  font-weight: 400;
  line-height: var(--type-body-sm-line-height);
}

/* Skills: periodic table of the stack */
.pt-container {
  max-width: 1200px;
}

.pt-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-md);
  align-items: end;
  margin-bottom: var(--space-md);
}

.pt-intro {
  margin: 0;
  color: rgb(255 255 255 / 70%);
}

.pt-readout {
  --h: 250;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 96px;
  padding: var(--space-sm);
  border: var(--border-width) solid oklch(70% 0.14 var(--h) / 50%);
  border-radius: var(--radius-md);
  background: oklch(70% 0.14 var(--h) / 10%);
  transition: border-color var(--motion-duration-fast) var(--motion-easing), background-color var(--motion-duration-fast) var(--motion-easing);
}

.pt-readout-sym {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  color: #0E0E10;
  background: oklch(78% 0.14 var(--h));
  border-radius: var(--radius-sm);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.pt-readout-text {
  display: grid;
  min-width: 0;
}

.pt-readout-name {
  font-size: var(--type-label-lg-size);
  font-weight: 700;
}

.pt-readout-cat {
  color: oklch(80% 0.12 var(--h));
  font-size: var(--type-label-sm-size);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pt-readout-note {
  color: rgb(255 255 255 / 75%);
  font-size: var(--type-body-sm-size);
  line-height: var(--type-body-sm-line-height);
}

.pt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: 0 0 var(--space-md);
  padding: 0;
  list-style: none;
}

.pt-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 36px;
  padding: 0 14px;
  color: var(--color-on-dark);
  background: transparent;
  border: var(--border-width) solid rgb(255 255 255 / 22%);
  border-radius: var(--radius-full);
  font-size: var(--type-label-md-size);
  transition: background-color var(--motion-duration-fast) var(--motion-easing), border-color var(--motion-duration-fast) var(--motion-easing);
}

.pt-filter:hover,
.pt-filter:focus-visible,
.pt-filter[aria-pressed="true"] {
  border-color: oklch(75% 0.14 var(--h));
  background: oklch(75% 0.14 var(--h) / 15%);
}

.pt-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: oklch(75% 0.14 var(--h));
}

.pt-table {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  perspective: 900px;
}

.pt-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1;
  padding: 10px;
  color: var(--color-on-dark);
  background: oklch(30% 0.06 var(--h));
  border: var(--border-width) solid oklch(60% 0.12 var(--h) / 60%);
  border-radius: var(--radius-sm);
  cursor: default;
  outline: none;
  transition: transform var(--motion-duration-fast) var(--motion-easing), opacity var(--motion-duration-base) var(--motion-easing), background-color var(--motion-duration-fast) var(--motion-easing), box-shadow var(--motion-duration-fast) var(--motion-easing), filter var(--motion-duration-base) var(--motion-easing);
}

.pt-tile:hover,
.pt-tile:focus-visible,
.pt-tile.is-active {
  z-index: 1;
  background: oklch(42% 0.1 var(--h));
  box-shadow: 0 0 0 2px oklch(78% 0.14 var(--h)), 0 12px 30px -8px oklch(70% 0.16 var(--h) / 60%);
  transform: translateY(-4px) scale(1.04);
}

.pt-num {
  color: rgb(255 255 255 / 55%);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pt-sym {
  color: oklch(85% 0.12 var(--h));
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.pt-name {
  overflow: hidden;
  color: rgb(255 255 255 / 85%);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pt-table.is-filtered .pt-tile:not(.is-match) {
  opacity: 0.18;
  filter: grayscale(1);
  transform: scale(0.94);
}

/* Entrance: tiles flip up in sequence when the table scrolls into view */
.js .pt-table:not(.is-in) .pt-tile {
  opacity: 0;
  transform: rotateX(-80deg) translateY(16px);
}

.js .pt-table.is-in .pt-tile {
  animation: pt-flip 600ms cubic-bezier(0.2, 0.7, 0.1, 1) calc(var(--i) * 35ms) both;
}

@keyframes pt-flip {
  from {
    opacity: 0;
    transform: rotateX(-80deg) translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 992px) {
  .pt-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  }
}

@media (max-width: 991.98px) {
  .pt-table {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .pt-table {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .pt-tile {
    padding: 7px;
  }

  .pt-name {
    display: -webkit-box;
    font-size: 10px;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

/* Education and certificates */
.subsection-title {
  margin-bottom: var(--space-md);
}

/* Education boarding pass: route draws in, plane flies PK -> DE, certificate stamps thump down */
.ticket {
  --ticket-notch: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  margin-top: var(--space-md);
  color: var(--color-neutral);
  filter: drop-shadow(0 18px 30px rgb(29 29 31 / 12%));
}

.ticket-main,
.ticket-stub {
  position: relative;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface);
}

/* Notches cut where the stub tears off */
.ticket-main {
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  -webkit-mask: radial-gradient(circle var(--ticket-notch) at 100% 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--ticket-notch) at 100% 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle var(--ticket-notch) at 100% 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--ticket-notch) at 100% 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}

.ticket-stub {
  display: flex;
  flex-direction: column;
  padding-inline: var(--space-md);
  border-left: 2px dashed var(--color-border);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  -webkit-mask: radial-gradient(circle var(--ticket-notch) at 0 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--ticket-notch) at 0 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle var(--ticket-notch) at 0 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle var(--ticket-notch) at 0 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  border-bottom: var(--border-width) solid var(--color-border);
  color: var(--color-tertiary);
  font-size: var(--type-label-sm-size);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ticket-route {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.ticket-stop {
  display: flex;
  flex-direction: column;
}

.ticket-stop-end {
  text-align: right;
}

.ticket-code {
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.ticket-country {
  margin-top: var(--space-xs);
  color: color-mix(in srgb, var(--color-neutral) 60%, transparent);
  font-size: var(--type-label-md-size);
}

.ticket-flight {
  width: 100%;
  height: auto;
  margin-bottom: var(--space-md);
  overflow: visible;
}

.ticket-flight-track {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 2;
  stroke-dasharray: 0.015 0.012;
}

.ticket-flight-line {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.45, 0, 0.2, 1);
}

.ticket-flight-dot {
  fill: var(--color-surface);
  stroke: var(--color-primary);
  stroke-width: 2;
}

.ticket-plane {
  fill: var(--color-primary);
}

.js .ticket:not(.is-visible) .ticket-flight-line {
  stroke-dashoffset: 1;
}

.ticket-legs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.ticket-leg + .ticket-leg {
  text-align: right;
}

.ticket-label {
  margin-bottom: var(--space-xs);
  color: color-mix(in srgb, var(--color-neutral) 55%, transparent);
  font-size: var(--type-label-sm-size);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: var(--type-label-sm-line-height);
  text-transform: uppercase;
}

.ticket-leg h3 {
  margin-bottom: var(--space-xs);
  font-size: var(--type-label-lg-size);
  font-weight: 700;
  line-height: 1.3;
}

.ticket-place {
  margin: 0;
  color: color-mix(in srgb, var(--color-neutral) 70%, transparent);
  font-size: var(--type-body-sm-size);
}

.ticket-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: var(--space-xs);
  color: #248A3D;
  letter-spacing: 0.06em;
}

.ticket-live-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: #34C759;
  animation: ticket-live 1.6s ease-in-out infinite;
}

@keyframes ticket-live {
  50% {
    box-shadow: 0 0 0 4px rgb(52 199 89 / 25%);
  }
}

.stamps {
  display: grid;
  gap: var(--space-sm);
  justify-items: center;
  margin: 0 0 var(--space-md);
  padding: 0;
  list-style: none;
}

.stamp {
  display: grid;
  place-content: center;
  gap: 4px;
  width: 150px;
  aspect-ratio: 1;
  padding: 14px;
  overflow-wrap: normal;
  color: oklch(50% 0.17 var(--h));
  border: 3px double currentColor;
  border-radius: var(--radius-full);
  text-align: center;
  transform: rotate(var(--r));
  mix-blend-mode: multiply;
}

.stamp strong {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.stamp-top,
.stamp-bottom {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Stamp "thump": overrides the generic reveal */
.js .stamp.reveal {
  opacity: 0;
  transform: rotate(var(--r)) scale(1.8);
  transition: opacity 200ms ease-out calc(600ms + var(--i, 0) * 120ms), transform 450ms cubic-bezier(0.3, 1.6, 0.5, 1) calc(600ms + var(--i, 0) * 120ms);
}

.js .stamp.reveal.is-visible {
  opacity: 0.92;
  transform: rotate(var(--r)) scale(1);
}

.ticket-barcode {
  height: 36px;
  margin-top: auto;
  background: repeating-linear-gradient(90deg, var(--color-neutral) 0 2px, transparent 2px 4px, var(--color-neutral) 4px 5px, transparent 5px 8px, var(--color-neutral) 8px 11px, transparent 11px 13px);
  opacity: 0.8;
}

@media (max-width: 767.98px) {
  .ticket {
    grid-template-columns: minmax(0, 1fr);
  }

  .ticket-main {
    padding: var(--space-md);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    -webkit-mask: radial-gradient(circle var(--ticket-notch) at 0 100%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--ticket-notch) at 100% 100%, #0000 98%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle var(--ticket-notch) at 0 100%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--ticket-notch) at 100% 100%, #0000 98%, #000) right / 51% 100% no-repeat;
  }

  .ticket-stub {
    border-top: 2px dashed var(--color-border);
    border-left: 0;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    -webkit-mask: radial-gradient(circle var(--ticket-notch) at 0 0, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--ticket-notch) at 100% 0, #0000 98%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle var(--ticket-notch) at 0 0, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle var(--ticket-notch) at 100% 0, #0000 98%, #000) right / 51% 100% no-repeat;
  }

  .stamps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stamp {
    width: min(150px, 100%);
  }

  .ticket-legs {
    grid-template-columns: minmax(0, 1fr);
  }

  .ticket-leg + .ticket-leg {
    text-align: left;
  }

  .ticket-head span + span {
    display: none;
  }
}

/* Scroll word reel: sticky "I can" with words lighting up as they pass the centre */
.can-section {
  --can-hue-start: 210;
  --can-hue-end: 570;
  --can-lightness: 76%;
  --can-chroma: 0.19;
  --can-dim: 0.2;
  padding-block: 30vh;
  overflow-wrap: normal;
}

.can-layout {
  display: flex;
  justify-content: center;
  font-size: clamp(32px, 8.5vw, 88px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.can-lead {
  position: sticky;
  top: calc(50% - 0.6em);
  height: fit-content;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: var(--color-on-dark);
}

.can-list {
  --can-step: calc((var(--can-hue-end) - var(--can-hue-start)) / (var(--count) - 1));
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.can-list li {
  color: oklch(var(--can-lightness) var(--can-chroma) calc(var(--can-hue-start) + var(--can-step) * var(--i)));
}

.can-list li:last-child {
  background: linear-gradient(var(--color-on-dark) 50%, color-mix(in oklch, var(--color-dark-background), var(--color-on-dark) 35%));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

@supports (animation-timeline: view()) and (animation-range: 0% 100%) {
  .can-list li {
    opacity: var(--can-dim);
    animation: can-brighten linear both;
    animation-timeline: view();
    animation-range: cover calc(50% - 1lh) cover calc(50% + 1lh);
  }

  .can-list li:first-child {
    --can-start-opacity: 1;
  }

  .can-list li:last-child {
    --can-end-opacity: 1;
  }
}

@keyframes can-brighten {
  0% {
    opacity: var(--can-start-opacity, var(--can-dim));
  }

  50% {
    opacity: 1;
    filter: brightness(1.15);
  }

  100% {
    opacity: var(--can-end-opacity, var(--can-dim));
  }
}

/* Fallback for browsers without scroll-driven animations (driven by js/main.js) */
.can-fallback .can-list li {
  opacity: var(--can-dim);
  transition: opacity var(--motion-duration-fast) var(--motion-easing);
}

.can-fallback .can-list li.is-active {
  opacity: 1;
}

/* Contact: channels list + API-style request form */
.contact-container {
  max-width: 1200px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
  align-items: start;
}

.contact-title {
  margin-bottom: var(--space-sm);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.contact-title span {
  color: var(--color-secondary);
}

.contact-lead {
  max-width: 30em;
  margin-bottom: var(--space-lg);
  color: rgb(255 255 255 / 72%);
  font-size: var(--type-label-lg-size);
  line-height: 1.5;
}

.channels {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--border-width) solid rgb(255 255 255 / 14%);
}

.channel {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-sm);
  min-height: 64px;
  border-bottom: var(--border-width) solid rgb(255 255 255 / 14%);
}

.channel-label {
  color: rgb(255 255 255 / 50%);
  font-size: var(--type-label-sm-size);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-dark a.channel-value {
  justify-self: start;
  color: var(--color-on-dark);
  font-size: var(--type-label-lg-size);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.section-dark a.channel-value:hover,
.section-dark a.channel-value:focus-visible {
  color: var(--color-secondary);
}

.channel-arrow {
  display: inline-block;
  margin-left: 4px;
  transition: transform var(--motion-duration-fast) var(--motion-easing);
}

.channel-value:hover .channel-arrow,
.channel-value:focus-visible .channel-arrow {
  transform: translate(3px, -3px);
}

.channel-copy {
  min-height: 36px;
  padding: 0 var(--space-sm);
  color: var(--color-on-dark);
  background: transparent;
  border: var(--border-width) solid rgb(255 255 255 / 30%);
  border-radius: var(--radius-full);
  font-size: var(--type-label-md-size);
  transition: background-color var(--motion-duration-fast) var(--motion-easing), color var(--motion-duration-fast) var(--motion-easing);
}

.channel-copy:hover,
.channel-copy:focus-visible {
  color: var(--color-neutral);
  background: var(--color-on-dark);
}

.channel-copy.is-copied {
  color: #fff;
  background: #248A3D;
  border-color: #248A3D;
}

/* Request card */
.request {
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --key: oklch(78% 0.12 250);
  --string: oklch(82% 0.14 150);
  overflow: hidden;
  background: #0E0E10;
  border: var(--border-width) solid rgb(255 255 255 / 12%);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 80%);
  font-family: var(--mono);
}

.request-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px var(--space-md);
  border-bottom: var(--border-width) solid rgb(255 255 255 / 10%);
  background: rgb(255 255 255 / 4%);
  font-size: 14px;
}

.request-method {
  padding: 2px 8px;
  color: #0E0E10;
  background: oklch(82% 0.15 75);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.request-url {
  min-width: 0;
  color: rgb(255 255 255 / 85%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-dots {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.request-dots span {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgb(255 255 255 / 18%);
}

.request-body {
  display: grid;
  gap: 6px;
  padding: var(--space-md);
  font-size: 15px;
  line-height: 1.6;
}

.request-brace,
.request-punct {
  color: rgb(255 255 255 / 45%);
}

.request-field {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  gap: 0 var(--space-xs);
  padding-left: var(--space-md);
}

.request-key {
  color: var(--key);
  white-space: nowrap;
}

.request-input {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
  color: var(--string);
  background: transparent;
  border: 0;
  border-bottom: 1px dashed rgb(255 255 255 / 18%);
  border-radius: 0;
  font: inherit;
  transition: border-color var(--motion-duration-fast) var(--motion-easing), background-color var(--motion-duration-fast) var(--motion-easing);
}

.request-input::placeholder {
  color: rgb(255 255 255 / 30%);
}

.request-input:focus {
  outline: none;
  background: rgb(255 255 255 / 5%);
  border-bottom: 1px solid var(--string);
}

select.request-input {
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--string) 50%), linear-gradient(135deg, var(--string) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

select.request-input option {
  color: var(--color-neutral);
  background: var(--color-surface);
}

textarea.request-input {
  resize: vertical;
  min-height: 96px;
}

.request-field-message {
  align-items: start;
}

.request-input[aria-invalid="true"] {
  border-bottom-color: #FF6B5E;
  background: rgb(255 107 94 / 8%);
}

.request-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  padding: var(--space-sm) var(--space-md) var(--space-md);
  border-top: var(--border-width) solid rgb(255 255 255 / 10%);
}

.request-send {
  font-family: var(--font-sans);
}

.request-response {
  color: rgb(255 255 255 / 55%);
  font-size: 13px;
}

.request-status {
  color: rgb(255 255 255 / 80%);
  font-weight: 700;
}

.request-response.is-ok .request-status {
  color: var(--string);
}

.request-response.is-error .request-status {
  color: #FF6B5E;
}

@media (min-width: 992px) {
  .contact-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: var(--space-xl);
  }
}

@media (max-width: 575.98px) {
  .channel {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px var(--space-sm);
    padding-block: var(--space-sm);
  }

  .channel-label {
    grid-column: 1 / -1;
  }

  .request-field {
    grid-template-columns: auto minmax(0, 1fr);
    padding-left: var(--space-sm);
  }

  .request-field .request-input {
    grid-column: 1 / -1;
  }

  .request-punct {
    display: none;
  }
}

a:not(.btn):not(.navbar-brand):not(.nav-link) {
  position: relative;
  text-decoration: none;
}

a:not(.btn):not(.navbar-brand):not(.nav-link)::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--border-width);
  background-color: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--motion-duration-fast) var(--motion-easing);
}

a:not(.btn):not(.navbar-brand):not(.nav-link):hover::after,
a:not(.btn):not(.navbar-brand):not(.nav-link):focus-visible::after {
  transform: scaleX(1);
}

.site-footer {
  padding-block: var(--space-sm);
  color: var(--color-neutral);
  background: var(--color-muted-surface);
  font-size: var(--type-body-sm-size);
  line-height: var(--type-body-sm-line-height);
}

.site-footer p {
  margin: 0;
}

/* Motion */
/* Progressive scroll reveals */
.js .reveal {
  opacity: 0;
  transform: translateY(var(--space-md));
  transition: opacity var(--motion-duration-base) var(--motion-easing) calc(var(--i, 0) * var(--motion-item-stagger)), transform var(--motion-duration-base) var(--motion-easing) calc(var(--i, 0) * var(--motion-item-stagger));
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js .illustration-reveal {
  transform: translateY(var(--space-md)) scale(0.96);
}

.js .illustration-reveal.is-visible {
  transform: translateY(0) scale(1);
}

.js .project-tile.reveal:hover,
.js .project-tile.reveal:focus-visible {
  transform: translateY(var(--motion-hover-lift));
}

.js .btn.reveal:hover,
.js .btn.reveal:focus-visible {
  transform: scale(1.02);
}

@media (min-width: 992px) {
  .navbar {
    --bs-navbar-padding-y: var(--space-xs);
  }
}

@media (max-width: 767.98px) {
  .section-band {
    padding-block: var(--space-lg);
  }

  .section-title {
    font-size: var(--type-headline-sm-size);
    line-height: var(--type-headline-sm-line-height);
  }

  .section-lead {
    font-size: var(--type-body-md-size);
    line-height: var(--type-body-md-line-height);
  }

  .experience-heading {
    display: block;
  }

  .experience-meta {
    margin-top: var(--space-xs);
    text-align: left;
  }

  .experience-item h3,
  .project-tile h3 {
    font-size: var(--type-label-lg-size);
    line-height: var(--type-label-lg-line-height);
  }
}

/* Mobile-only layout adjustments */
@media (max-width: 767.98px) {
  /* The collapsed navbar is 65px tall: size and pin the hero stage below it, so the bottom meta bar is on screen */
  .hero-scroll.is-animated {
    --header-h: 65px;
  }

  .hero-scroll.is-animated .hero-stage {
    top: var(--header-h);
    height: calc(100svh - var(--header-h));
    min-height: 0;
  }

  /* Keep the pre-"thump" scaled stamps from widening the page */
  .ticket-stub {
    overflow: hidden;
  }

  .section-illustration {
    max-width: 280px;
  }
}

@media (max-width: 575.98px) {
  .hero-scroll.is-animated .hero-intro {
    top: 0;
  }

  .hero-scroll.is-animated .hero-shade {
    background: linear-gradient(180deg, rgb(0 0 0 / 82%) 0%, rgb(0 0 0 / 62%) 45%, rgb(0 0 0 / 0%) 78%);
  }

  .hero-intro-kicker {
    margin-bottom: var(--space-xs);
    font-size: var(--type-label-sm-size);
  }

  .hero-intro-statement {
    font-size: clamp(30px, 9vw, 40px);
  }

  .hero-intro-lead {
    font-size: var(--type-body-sm-size);
    line-height: 1.45;
    margin-bottom: var(--space-sm);
  }

  .hero-meta {
    font-size: var(--type-label-sm-size);
    line-height: var(--type-label-sm-line-height);
    padding-block: var(--space-sm);
  }

  .project-number {
    font-size: var(--type-headline-md-size);
  }

  .tech-marquee-list li {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto;
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }

  .js .reveal,
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-name span,
  .hero-meta-arrow {
    animation: none;
  }

  .hero-photo img {
    transition: none;
  }

  .map-hub-ring,
  .ticket-live-dot,
  .js .pt-table.is-in .pt-tile {
    animation: none;
  }

  .can-list li,
  .can-fallback .can-list li {
    opacity: 1;
    animation: none;
    transition: none;
  }

  .can-lead {
    position: static;
  }

  .can-section {
    padding-block: var(--space-xl);
  }

  .experience-item li,
  .exp-fallback .experience-item li {
    opacity: 1;
    animation: none;
    transition: none;
  }

  .experience-side {
    position: static;
  }

  .tech-marquee-track {
    width: auto;
    animation: none;
  }

  .tech-marquee-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs) var(--space-md);
    padding: 0 var(--space-sm);
  }

  .tech-marquee-list[aria-hidden="true"] {
    display: none;
  }
}