/* Light editorial portfolio system — content-first, flat surfaces, restrained motion. */
@import url("./tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 0;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  background: var(--page-background);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-variant-numeric: tabular-nums;
}

body.command-open,
body.is-transitioning,
body.menu-open,
body.is-loader-active {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--rule-medium) solid var(--color-focus);
  outline-offset: 3px;
}

::selection {
  background: var(--accent-primary);
  color: var(--surface-background);
}

h1,
h2,
h3,
h4,
p {
  min-width: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 400;
}

.shell {
  width: min(100%, var(--content-max-width));
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}

main > section[id],
section[id],
.project-story[id] {
  scroll-margin-top: var(--section-anchor-offset);
}

.skip-link {
  position: fixed;
  inset-block-start: var(--space-md);
  inset-inline-start: var(--space-md);
  z-index: 13000;
  padding: var(--space-sm) var(--space-md);
  background: var(--button-dark);
  color: var(--button-dark-text);
  transform: translateY(-160%);
  transition: transform var(--dur-med) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

/* Loader */
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: end;
  padding: var(--showcase-page-padding);
  background: var(--loader-background);
  color: var(--loader-foreground);
  isolation: isolate;
  animation: loader-safety-exit 3.2s var(--ease-out) forwards;
  transition: opacity var(--dur-med) var(--ease-out), visibility var(--dur-med) var(--ease-out);
}

.site-loader::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 4rem 4rem;
}

html.is-loading .site-loader {
  display: grid;
}

.site-loader.is-loader-managed {
  animation: none;
}

.site-loader[hidden] {
  display: none;
}

.site-loader__inner {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-md) var(--space-xl);
  align-items: end;
}

.site-loader__mark,
.site-loader__status {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-loader__mark {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.75rem);
  letter-spacing: -0.02em;
}

.site-loader__mark i {
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-style: normal;
}

.site-loader__surname {
  font-family: var(--font-display);
  font-size: 1em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.site-loader__number {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(7rem, 24vw, 20rem);
  line-height: 0.68;
  letter-spacing: -0.06em;
}

.site-loader__progress {
  height: var(--loader-progress-height);
  overflow: hidden;
  background: rgb(255 255 255 / 0.18);
}

.site-loader__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left;
}

.site-loader__status {
  text-align: right;
}

.site-loader.is-loader-complete {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Navigation */
.site-nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  min-height: var(--navigation-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-lg);
  align-items: center;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
  border-block-end: var(--rule-hairline) solid var(--line-subtle);
  background: rgb(243 240 232 / 0.94);
  pointer-events: none;
}

.site-nav > * {
  pointer-events: auto;
}

.wordmark {
  min-width: 3rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  gap: clamp(0.9rem, 1.45vw, 1.65rem);
  align-items: center;
  justify-content: flex-end;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links a,
.menu-panel__nav a {
  position: relative;
}

.nav-links a:not(.nav-links__contact)::after {
  content: "";
  position: absolute;
  inset: auto 0 -0.35rem;
  height: 1px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-med) var(--ease-out);
}

.nav-links a.is-active,
.nav-links a[aria-current="location"],
.menu-panel__nav a.is-active,
.menu-panel__nav a[aria-current="location"] {
  color: var(--text-primary);
}

.nav-links a.is-active::after,
.nav-links a[aria-current="location"]::after {
  transform: scaleX(1);
}

.nav-links__contact {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding-inline: var(--space-lg);
  border-radius: 999px;
  background: var(--button-dark);
  color: var(--button-dark-text) !important;
}

.nav-actions {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

.search-trigger,
.menu-link {
  min-height: 44px;
  border: var(--rule-hairline) solid var(--line-subtle);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.search-trigger {
  min-width: 4.3rem;
  padding-inline: var(--space-sm);
}

.search-trigger kbd {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
}

.menu-link {
  width: 44px;
  display: none;
  align-content: center;
  gap: 5px;
  padding-inline: var(--space-sm);
}

.menu-link span {
  display: block;
  height: 1px;
  background: currentColor;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  height: auto;
  overflow: clip;
  isolation: isolate;
}

.hero__background {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: clamp(3.5rem, 6vw, 6rem) clamp(3.5rem, 6vw, 6rem);
  mask-image: linear-gradient(90deg, transparent 0%, rgb(0 0 0 / 0.2) 32%, black 66%), linear-gradient(180deg, black 0%, black 70%, transparent 98%);
  mask-composite: intersect;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto minmax(15rem, 1fr) auto;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
  padding-block: calc(var(--navigation-height) + clamp(1.5rem, 4vh, 3rem)) clamp(1.25rem, 3vh, 2rem);
}

.hero__name {
  position: relative;
  z-index: 4;
  grid-column: 1 / 11;
  grid-row: 1;
  display: flex;
  align-items: baseline;
  margin: 0;
  color: var(--text-primary);
  font-size: var(--hero-name-size);
  line-height: var(--hero-name-leading);
  letter-spacing: var(--tracking-display);
  white-space: nowrap;
  overflow: visible;
  padding-block-end: 0.12em;
}

.hero__name-mask {
  display: inline-block;
  overflow: visible;
  padding-block: 0.08em 0.22em;
  margin-block-end: -0.08em;
}

.hero.is-anime-ready:not(.is-name-revealed) .hero__name-mask {
  overflow: clip;
}

.hero__name-mask > span {
  display: block;
}

.hero-name__first {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
}

.hero-name__last {
  color: var(--text-primary);
  margin-inline-start: 0.06em;
  font-family: var(--font-display);
  font-size: 0.88em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.045em;
  text-transform: none;
  transform: translateY(0.07em);
  line-height: 0.92;
  overflow: visible;
}

.hero__copy {
  position: relative;
  z-index: 5;
  grid-column: 1 / 6;
  grid-row: 2;
  align-self: center;
}

.hero__role {
  margin: 0 0 var(--space-lg);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: clamp(0.65rem, 0.75vw, 0.78rem);
  letter-spacing: 0.11em;
}

.hero__statement {
  max-width: 39rem;
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 0.98;
  text-wrap: balance;
}

.hero__statement span {
  color: var(--text-secondary);
}

.hero__statement strong {
  color: var(--text-primary);
  font-weight: 500;
}

.hero__statement em {
  color: var(--text-primary);
  font-weight: 400;
}

.hero__summary {
  max-width: 36rem;
  margin: var(--space-lg) 0 0;
  color: var(--text-muted);
  font-size: clamp(0.9rem, 1vw, 1.02rem);
}

.hero__actions {
  position: relative;
  z-index: 6;
  grid-column: 9 / 13;
  grid-row: 2;
  display: grid;
  gap: var(--space-sm);
  align-self: center;
}

.hero__cta {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding-inline: var(--space-xl);
  border: var(--rule-hairline) solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
}

.hero__cta--primary {
  border-color: var(--button-dark);
  background: var(--button-dark);
  color: var(--button-dark-text);
}

.hero__cta--secondary {
  background: oklch(100% 0 0 / 0.34);
  color: var(--text-primary);
}

.hero__socials {
  display: flex;
  gap: var(--space-xs);
  justify-content: flex-end;
  padding-block-start: var(--space-sm);
}

.hero__socials a {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: var(--rule-hairline) solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-background);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.hero__detail,
.hero-motion-stage {
  position: relative;
  z-index: 2;
  grid-column: 5 / 10;
  grid-row: 2;
  inline-size: 100%;
  max-inline-size: 34rem;
  min-block-size: clamp(16rem, 26vw, 25rem);
  aspect-ratio: 1 / 0.82;
  overflow: clip;
  isolation: isolate;
  contain: layout paint;
  justify-self: center;
}

.hero-specialization {
  position: absolute;
  inset: 24%;
  z-index: 3;
}

.hero-specialization svg {
  width: 100%;
  height: 100%;
  overflow: hidden;
  animation: specialization-rotate 32s linear infinite;
}

.hero.is-ambient-paused .hero-specialization svg {
  animation-play-state: paused;
}

.hero-specialization text {
  fill: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
}

.hero-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  contain: layout paint;
}

.hero-field__canvas,
.hero-field__fallback {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
}

.hero-field__canvas {
  z-index: 2;
}

.hero-field__canvas canvas {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  display: block;
}

.hero-field__fallback {
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--accent-primary);
  opacity: 0.56;
  transition: opacity 500ms var(--ease-out);
}

.hero-field.has-webgl-scene .hero-field__fallback {
  opacity: 0;
}

.hero-field__fallback svg {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-field__paths path {
  fill: none;
  stroke: var(--text-primary);
  stroke-width: 1;
  stroke-dasharray: 3 9;
  opacity: 0.42;
}

.hero-field__core {
  fill: var(--accent-soft);
  stroke: var(--accent-primary);
  stroke-width: 1.5;
}

.hero-field__nodes {
  fill: var(--accent-primary);
}

.hero__metadata {
  position: relative;
  z-index: 6;
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-lg);
  margin: 0;
}

.hero__metadata > div {
  padding-block-start: var(--space-sm);
  border-block-start: var(--rule-hairline) solid var(--line-strong);
}

.hero__metadata dt {
  display: flex;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero__metadata dt span {
  color: var(--accent-primary);
}

.hero__metadata dd {
  margin: var(--space-xs) 0 0;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.hero.is-anime-ready [data-hero-name-line],
.hero.is-anime-ready [data-hero-detail],
.hero.is-anime-ready [data-hero-actions],
.hero.is-anime-ready [data-hero-detail-visual],
.hero.is-anime-ready [data-hero-metadata],
.hero.is-anime-ready .hero__background {
  will-change: transform, opacity;
}

/* Shared editorial sections */
.eyebrow,
.journey-section__chapter,
.achievement-entry__type,
.journey-entry__type,
.journey-entry__period,
.journey-entry__location,
.education-entry__facts dt {
  margin: 0;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about,
.awards,
.work-preview,
.journey,
.stack,
.contact {
  height: auto;
  min-height: auto;
  padding-block: var(--section-padding);
  border-block-start: var(--rule-hairline) solid var(--line-subtle);
}

.editorial-heading,
.section-kicker {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-lg);
  align-items: start;
  margin-block-end: clamp(3rem, 6vw, 6rem);
}

.editorial-heading .eyebrow,
.section-kicker .eyebrow {
  grid-column: 1 / 4;
}

.editorial-heading h2,
.section-kicker h2 {
  grid-column: 4 / 12;
  font-size: var(--text-section);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

.editorial-heading > p:last-child {
  grid-column: 7 / 12;
  max-width: 38rem;
  margin: 0;
  color: var(--text-muted);
}

.about__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 6rem);
  margin-inline-start: 25%;
}

.about__body p {
  margin: 0;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 3.25rem);
  line-height: 1;
}

.about__markers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-lg);
  margin: clamp(3rem, 6vw, 6rem) 0 0;
  padding: 0;
  list-style: none;
}

.about__markers li {
  padding-block-start: var(--space-sm);
  border-block-start: var(--rule-hairline) solid var(--line-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

/* Awards */
.achievement-list,
.experience-list,
.education-list,
.journey-tech,
.project-card__stack {
  margin: 0;
  padding: 0;
  list-style: none;
}

.achievement-list {
  display: grid;
}

.achievement-entry {
  border-block-start: var(--rule-hairline) solid var(--line-subtle);
}

.achievement-entry article {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-lg);
  align-items: start;
  padding-block: clamp(2rem, 4vw, 3.75rem);
}

.achievement-entry__number {
  grid-column: 1 / 2;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.achievement-entry__type {
  grid-column: 2 / 4;
}

.achievement-entry h3 {
  grid-column: 4 / 9;
  font-size: clamp(2rem, 3.4vw, 4rem);
  line-height: 0.94;
}

.achievement-entry__context,
.achievement-entry__description {
  margin: 0;
}

.achievement-entry__context {
  grid-column: 9 / 11;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.achievement-entry__description {
  grid-column: 4 / 10;
  color: var(--text-muted);
}

/* Works */
.work-preview {
  position: relative;
  isolation: isolate;
}

.project-showcase__glow {
  display: none;
}

.work-preview__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3xl);
  align-items: end;
  margin-block-end: clamp(2rem, 4vw, 4rem);
}

.project-showcase__head > div:first-child {
  display: grid;
  gap: var(--space-md);
}

.work-preview h2 {
  font-size: var(--text-section);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

.project-showcase__intro p {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.project-showcase__list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}

.project-story {
  --project-accent: var(--accent-primary);
  position: relative;
  height: auto;
  min-height: auto;
  grid-column: span 6;
  padding: clamp(1rem, 1.7vw, 1.6rem);
  overflow: clip;
  border: var(--rule-hairline) solid var(--line-subtle);
  border-radius: var(--project-media-radius);
  background: var(--surface-background);
}

.project-story:nth-child(1),
.project-story:nth-child(4) { grid-column: span 7; }
.project-story:nth-child(2),
.project-story:nth-child(3) { grid-column: span 5; }
.project-story:nth-child(5) { grid-column: 1 / -1; }

.project-story__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 2vw, 2rem);
  align-content: start;
  height: 100%;
}

.project-story__content {
  grid-column: auto;
  display: grid;
  gap: var(--space-md);
  order: 2;
}

.project-story__media {
  position: relative;
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  grid-column: auto;
  min-width: 0;
  aspect-ratio: var(--project-media-aspect-ratio);
  order: 1;
  overflow: clip;
  padding: clamp(0.6rem, 1.2vw, 1rem);
  border: var(--rule-hairline) solid var(--project-media-border);
  background: var(--project-media-background);
  border-radius: calc(var(--project-media-radius) - 0.35rem);
  box-shadow: 0 1.25rem 3rem rgb(23 22 18 / 0.06);
}

.project-story__media > * {
  max-inline-size: 100%;
  max-block-size: 100%;
}

.project-story__media img,
.project-story__media svg {
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  object-position: center;
}

.project-story:nth-child(5) .project-story__layout {
  grid-template-columns: minmax(18rem, 0.36fr) minmax(0, 0.64fr);
  align-items: center;
}

.project-story:nth-child(5) .project-story__content { order: 1; }
.project-story:nth-child(5) .project-story__media { order: 2; }

.project-story::before {
  content: "";
  width: 3.5rem;
  height: 2px;
  display: block;
  margin-block-end: var(--space-md);
  background: var(--project-accent);
  transform-origin: left;
  transition: width var(--dur-med) var(--ease-out);
}

.project-card__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-card__meta span:first-child,
.project-card__outcome span {
  color: var(--project-accent);
}

.project-story h3 {
  font-size: clamp(2.25rem, 3.6vw, 4.4rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.project-card__summary,
.project-card__outcome {
  margin: 0;
}

.project-card__summary {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
}

.project-card__outcome {
  padding-inline-start: var(--space-md);
  border-inline-start: var(--rule-medium) solid var(--project-accent);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.project-card__outcome span {
  display: block;
  margin-block-end: var(--space-2xs);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
}

.project-card__stack li {
  padding-block: 0.35rem;
  border-block-end: var(--rule-hairline) solid var(--line-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.work-card__arrow {
  position: absolute;
  z-index: 4;
  inset-block-start: clamp(1rem, 2vw, 1.5rem);
  inset-inline-end: clamp(1rem, 2vw, 1.5rem);
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--button-dark);
  color: var(--button-dark-text);
  font-size: 1rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.86);
  transform-origin: center;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 220ms;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding-inline: var(--space-lg);
  border: var(--rule-hairline) solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  transition: transform var(--dur-med) var(--ease-out), background-color var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}

.btn--primary {
  border-color: var(--button-dark);
  background: var(--button-dark);
  color: var(--button-dark-text);
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
}

.project-preview {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: var(--space-md);
  border: var(--rule-hairline) solid var(--line-subtle);
  border-radius: calc(var(--project-media-radius) - 0.6rem);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-color: var(--surface-background);
  background-size: 2.5rem 2.5rem;
  transition: transform 500ms var(--ease-out);
}

.project-preview__bar {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block-end: var(--space-sm);
  border-block-end: var(--rule-hairline) solid var(--line-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-preview__note {
  position: absolute;
  inset-inline: var(--space-md);
  inset-block-end: var(--space-sm);
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.graph-preview__query {
  width: 78%;
  margin: var(--space-xl) auto 0;
  padding: var(--space-sm) var(--space-md);
  border: var(--rule-hairline) solid var(--project-accent);
  background: var(--surface-background);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.graph-preview__canvas {
  position: relative;
  height: 58%;
}

.graph-preview__node {
  position: absolute;
  z-index: 1;
  padding: 0.4rem 0.55rem;
  border: var(--rule-hairline) solid var(--project-accent);
  border-radius: 50%;
  background: var(--surface-background);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.graph-preview__node--one { inset: 38% auto auto 5%; }
.graph-preview__node--two { inset: 18% auto auto 34%; }
.graph-preview__node--three { inset: 56% auto auto 58%; }
.graph-preview__node--four { inset: 25% 3% auto auto; }

.graph-preview__line {
  position: absolute;
  height: 1px;
  background: var(--project-accent);
  transform-origin: left;
}

.graph-preview__line--one { width: 68%; inset: 47% auto auto 15%; transform: rotate(-8deg); }
.graph-preview__line--two { width: 48%; inset: 39% auto auto 38%; transform: rotate(28deg); }

.retina-preview__layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-lg);
  height: 72%;
  padding-block: var(--space-lg);
}

.retina-preview__scan {
  display: grid;
  place-items: center;
  border: var(--rule-hairline) solid var(--line-subtle);
  background: radial-gradient(circle, var(--accent-primary), var(--accent-soft) 48%, var(--surface-muted) 49%);
}

.retina-preview__scan span {
  width: 32%;
  aspect-ratio: 1;
  border: var(--rule-hairline) solid var(--project-accent);
  border-radius: 50%;
}

.retina-preview__results {
  display: grid;
  align-content: center;
  gap: var(--space-md);
}

.retina-preview__results p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.retina-preview__results span {
  height: 0.35rem;
  background: var(--project-accent);
}

.retina-preview__results .is-long { width: 82%; }
.retina-preview__results .is-medium { width: 64%; }
.retina-preview__results .is-short { width: 42%; }

.workflow-preview__columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
  min-width: 0;
  height: 76%;
  padding-block: var(--space-lg);
}

.workflow-preview__columns > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border: var(--rule-hairline) solid var(--line-subtle);
  background: var(--surface-muted);
}

.workflow-preview__columns b {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
}

.workflow-preview__columns span {
  min-width: 0;
  padding: var(--space-sm);
  border: var(--rule-hairline) solid var(--line-subtle);
  background: var(--surface-background);
  color: var(--text-secondary);
  font-size: 0.62rem;
  overflow-wrap: anywhere;
}

.workflow-preview__columns .is-accent {
  border-color: var(--project-accent);
}

.voice-preview__wave {
  min-width: 0;
  height: 58%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.2rem, 1vw, 0.65rem);
}

.voice-preview__wave span {
  width: clamp(0.18rem, 0.8vw, 0.3rem);
  min-width: 0.18rem;
  height: 25%;
  min-height: 1.5rem;
  background: var(--project-accent);
}

.voice-preview__wave span:nth-child(2n) { height: 46%; }
.voice-preview__wave span:nth-child(3n) { height: 72%; }
.voice-preview__wave span:nth-child(5n) { height: 34%; }

.voice-preview__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
  min-width: 0;
}

.voice-preview__metrics span {
  min-width: 0;
  padding: var(--space-sm);
  border-block-start: var(--rule-hairline) solid var(--project-accent);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.cancer-preview__map {
  position: relative;
  height: 72%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--space-sm);
}

.cancer-preview__map b {
  z-index: 1;
  padding: var(--space-md);
  border: var(--rule-hairline) solid var(--project-accent);
  border-radius: 50%;
  background: var(--surface-background);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
}

.cancer-preview__path {
  position: absolute;
  inset-block-start: 50%;
  height: 1px;
  width: 34%;
  background: var(--project-accent);
}

.cancer-preview__path--one { inset-inline-start: 17%; transform: rotate(-8deg); }
.cancer-preview__path--two { inset-inline-end: 17%; transform: rotate(8deg); }

/* Journey */
.journey__heading {
  margin-block-end: clamp(2.5rem, 4vw, 4rem);
}

.journey__content {
  display: block;
}

.journey-section {
  --journey-accent: var(--accent-primary);
  position: relative;
  min-width: 0;
  padding: 0;
}

.journey-section--education {
  --journey-accent: var(--education-accent);
  margin-block-start: clamp(5rem, 9vw, 9rem);
}

.journey-section__connector {
  position: absolute;
  inset-block: clamp(9rem, 12vw, 11rem) 0;
  inset-inline-start: 0;
  width: 1px;
  background: linear-gradient(var(--journey-accent), var(--line-subtle) 85%, transparent);
  transform-origin: top;
  pointer-events: none;
}

.journey-section__header {
  display: grid;
  gap: var(--space-md);
  margin-block-end: 0;
  padding-block-end: clamp(1.5rem, 3vw, 2.5rem);
  border-block-end: var(--rule-hairline) solid var(--journey-rule-color);
}

.journey-section__chapter {
  color: var(--journey-accent);
}

.journey-section__heading-mask {
  overflow: clip;
}

.journey-section__heading-mask h3 {
  max-width: var(--journey-heading-max);
  font-family: var(--font-display);
  font-size: var(--text-subsection);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

.experience-list,
.education-list {
  display: grid;
}

.experience-entry,
.education-entry {
  position: relative;
  padding-inline-start: clamp(2.25rem, 4vw, 4rem);
  border-block-start: var(--rule-hairline) solid var(--line-subtle);
}

.experience-entry::before,
.education-entry::before {
  content: "";
  position: absolute;
  inset-block-start: calc(var(--journey-entry-gap) + 0.3rem);
  inset-inline-start: -0.29rem;
  width: 0.55rem;
  aspect-ratio: 1;
  border: 2px solid var(--surface-background);
  border-radius: 50%;
  background: var(--journey-accent);
}

.experience-entry__layout {
  display: grid;
  grid-template-columns: minmax(10rem, 0.32fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: var(--journey-entry-gap);
}

.experience-entry__meta {
  display: grid;
  align-content: start;
  gap: var(--space-xs);
  padding-inline-end: 0;
}

.journey-entry__number,
.education-entry__level span {
  display: block;
  margin-block-end: var(--space-lg);
  color: var(--journey-index-color);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 0.75;
}

.experience-entry__company,
.education-entry__institution,
.education-entry__parent {
  margin: 0;
}

.experience-entry__company {
  color: var(--text-primary);
  font-weight: 600;
}

.journey-entry__location,
.journey-entry__period {
  color: var(--text-muted);
}

.journey-entry__period {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-block-start: var(--space-sm);
}

.experience-entry__body {
  display: grid;
  gap: var(--space-lg);
}

.experience-entry h4 {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 3.3rem);
  font-weight: 400;
  line-height: 0.94;
}

.experience-entry__contributions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
}

.experience-entry__contributions p {
  margin: 0;
  color: var(--text-secondary);
}

.journey-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
}

.journey-tech li {
  padding-block: 0.35rem;
  border-block-end: var(--rule-hairline) solid var(--line-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.education-entry__layout {
  display: grid;
  grid-template-columns: minmax(7rem, 0.18fr) minmax(0, 1fr) minmax(13rem, 0.3fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: var(--journey-entry-gap);
}

.education-entry__level p {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.education-entry__body {
  display: grid;
  gap: var(--space-md);
}

.education-entry h4 {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.8rem);
  font-weight: 400;
  line-height: 0.94;
  text-wrap: balance;
}

.education-entry h4 span {
  display: block;
  margin-block-start: var(--space-xs);
  color: var(--text-secondary);
  font-size: 0.58em;
  line-height: 1.05;
}

.education-entry__institution {
  color: var(--education-accent);
  font-weight: 600;
}

.education-entry__parent {
  color: var(--text-muted);
}

.education-entry__facts {
  grid-column: auto;
  display: grid;
  gap: var(--space-lg);
  margin: 0;
}

.education-entry__facts div {
  display: grid;
  gap: var(--space-2xs);
}

.education-entry__facts dt {
  color: var(--text-muted);
}

.education-entry__facts dd {
  margin: 0;
  color: var(--text-secondary);
}

/* Stack, resume, contact */
.spec-sheet {
  display: grid;
  margin: 0;
  border-block-start: var(--rule-hairline) solid var(--line-subtle);
}

.spec-sheet > div {
  display: grid;
  grid-template-columns: minmax(10rem, 0.35fr) 1fr;
  gap: var(--space-xl);
  padding-block: var(--space-xl);
  border-block-end: var(--rule-hairline) solid var(--line-subtle);
}

.spec-sheet dt {
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.spec-sheet dd {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.8rem);
  line-height: 1;
}

.resume-callout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xl);
  align-items: center;
  padding-block: clamp(2rem, 4vw, 3.5rem);
  border-block: var(--rule-hairline) solid var(--line-subtle);
}

.resume-callout p {
  margin: 0;
  color: var(--text-muted);
}

.resume-callout p span {
  margin-inline-end: var(--space-lg);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.resume-callout a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  padding-inline: var(--space-lg);
  border-radius: 999px;
  background: var(--button-dark);
  color: var(--button-dark-text);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(3rem, 8vw, 8rem);
  align-items: end;
}

.contact__statement h2 {
  max-width: 58rem;
  font-size: clamp(4rem, 8.5vw, 9rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
}

.contact__links {
  display: grid;
  min-width: min(22rem, 100%);
}

.contact__links a {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block-start: var(--rule-hairline) solid var(--line-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.contact__links a::after {
  content: "↗";
  color: var(--accent-primary);
}

.site-footer {
  border-block-start: var(--rule-hairline) solid var(--line-subtle);
}

.footer-marquee {
  display: none;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
  padding-block: var(--space-xl);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.site-footer__inner p {
  margin: 0;
}

/* Command palette */
.command-dialog {
  width: min(92vw, 42rem);
  max-height: min(80dvh, 38rem);
  padding: 0;
  border: var(--rule-hairline) solid var(--line-strong);
  border-radius: 0;
  background: var(--surface-background);
  color: var(--text-primary);
  box-shadow: 0 2rem 6rem oklch(20% 0.02 55 / 0.14);
}

.command-dialog::backdrop {
  background: oklch(15% 0.01 55 / 0.34);
}

.command {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-lg);
}

.command label {
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
}

.command input {
  min-height: 52px;
  padding-inline: var(--space-md);
  border: var(--rule-hairline) solid var(--line-subtle);
  border-radius: 0;
  background: var(--page-background);
  color: var(--text-primary);
}

.command__list {
  max-height: 25rem;
  overflow: auto;
}

.command__list a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding-inline: var(--space-md);
  border-block-start: var(--rule-hairline) solid var(--line-subtle);
  color: var(--text-secondary);
}

.command__list a:focus,
.command__list a:hover {
  background: var(--surface-muted);
  color: var(--text-primary);
}

.command__list a[hidden] {
  display: none;
}

/* Overlay navigation */
.menu-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  justify-items: end;
  visibility: hidden;
  pointer-events: none;
}

.menu-panel.is-open {
  visibility: visible;
  pointer-events: auto;
}

.menu-panel__backdrop {
  position: absolute;
  inset: 0;
  background: oklch(15% 0.01 55 / 0.34);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out);
}

.menu-panel.is-open .menu-panel__backdrop {
  opacity: 1;
}

.menu-panel__nav {
  position: relative;
  width: min(100%, 35rem);
  min-height: 100%;
  display: grid;
  align-content: center;
  gap: clamp(0.2rem, 1vh, 0.6rem);
  padding: clamp(4rem, 9vw, 6rem) clamp(2rem, 5vw, 3.5rem);
  border-inline-start: var(--rule-hairline) solid var(--line-subtle);
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-color: var(--surface-background);
  background-size: 4rem 4rem;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-in-out);
}

.menu-panel.is-open .menu-panel__nav {
  transform: translateX(0);
}

.menu-panel__nav a {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vh, 4.8rem);
  line-height: 0.9;
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), color var(--dur-med) var(--ease-out);
  transition-delay: calc(70ms * var(--i));
}

.menu-panel.is-open .menu-panel__nav a {
  opacity: 1;
  transform: translateY(0);
}

.menu-panel__nav a.is-active::before,
.menu-panel__nav a[aria-current="location"]::before {
  content: "";
  position: absolute;
  inset: 50% auto auto -1rem;
  width: 0.4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent-primary);
}

.menu-panel__close {
  position: absolute;
  inset-block-start: var(--space-lg);
  inset-inline-end: var(--space-lg);
  min-height: 44px;
  padding-inline: var(--space-md);
  border: var(--rule-hairline) solid var(--line-subtle);
  background: var(--surface-background);
  color: var(--text-secondary);
  cursor: pointer;
}

/* Page transitions */
.page-wipe {
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: var(--button-dark);
  pointer-events: none;
  transform: scaleY(0);
  transform-origin: bottom;
}

body.is-transitioning .page-wipe {
  animation: page-wipe 700ms var(--ease-in-out) forwards;
}

.reveal {
  opacity: 1;
  transform: none;
}

@media (hover: hover) and (pointer: fine) {
  .hero__cta:hover,
  .btn:hover,
  .resume-callout a:hover {
    transform: translateY(-2px);
  }

  .hero__cta--secondary:hover,
  .hero__socials a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
  }

  .project-story .btn:hover,
  .contact__links a:hover,
  .nav-links a:not(.nav-links__contact):hover {
    color: var(--accent-primary);
  }

  .project-story:hover::before,
  .project-story:focus-within::before {
    width: 6rem;
  }

  .project-story:hover .project-preview,
  .project-story:focus-within .project-preview {
    transform: scale(1.02);
  }

}

.work-card--has-repository:hover .work-card__arrow,
.work-card--has-repository:focus-within .work-card__arrow {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

@media (hover: none), (pointer: coarse) {
  .work-card__arrow {
    display: none;
  }

  .work-card__repository {
    min-height: 44px;
    background: transparent;
    color: var(--text-primary);
  }
}

@media (max-width: 80rem) {
  .site-nav {
    grid-template-columns: auto 1fr;
  }

  .nav-links {
    display: none;
  }

  .menu-link {
    display: grid;
  }
}

@media (max-width: 68.74rem) {
  .hero__inner {
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: var(--space-xl);
    padding-block: calc(var(--navigation-height) + 2.5rem) 3rem;
  }

  .hero__name,
  .hero__copy,
  .hero__actions,
  .hero__detail,
  .hero__metadata {
    grid-column: 1;
    grid-row: auto;
  }

  .hero__name {
    font-size: clamp(5rem, 14vw, 9rem);
  }

  .hero__copy {
    max-width: 48rem;
  }

  .hero__actions {
    width: min(100%, 30rem);
  }

  .hero__socials {
    justify-content: flex-start;
  }

  .hero__detail {
    width: min(100%, 34rem);
    min-height: clamp(17rem, 42vw, 24rem);
    height: auto;
    aspect-ratio: 1 / 0.82;
    justify-self: end;
  }

  .hero-specialization {
    inset: 24%;
  }

  .hero-field {
    inset: 0;
  }

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

  .work-preview__head,
  .contact {
    grid-template-columns: minmax(0, 1fr);
  }

  .about__body {
    margin-inline-start: 0;
  }

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

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

  .education-entry__layout {
    grid-template-columns: minmax(5rem, 1fr) minmax(0, 5fr);
  }

  .education-entry__facts {
    grid-column: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 62.5rem) {
  .project-showcase__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-story,
  .project-story:nth-child(1),
  .project-story:nth-child(2),
  .project-story:nth-child(3),
  .project-story:nth-child(4),
  .project-story:nth-child(5) {
    grid-column: auto;
  }

  .project-story:nth-child(5) .project-story__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-story:nth-child(5) .project-story__content { order: 2; }
  .project-story:nth-child(5) .project-story__media { order: 1; }

  .project-story__media {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 48rem) {
  .hero__inner {
    gap: var(--space-lg);
    padding-block-end: 2rem;
  }

  .hero__name {
    display: block;
    font-size: clamp(3.25rem, 17.5vw, 5rem);
    line-height: 0.82;
    white-space: normal;
  }

  .hero-name__last {
    width: max-content;
    margin-inline-start: clamp(1rem, 8vw, 2.5rem);
    font-size: 0.88em;
    transform: translateY(-0.02em);
  }

  .hero__statement {
    font-size: clamp(1.75rem, 7.8vw, 2.5rem);
    overflow-wrap: break-word;
  }

  .hero__actions {
    width: 100%;
  }

  .hero__cta {
    width: 100%;
  }

  .hero__detail {
    width: 100%;
    min-height: var(--hero-canvas-mobile-height);
    height: auto;
    justify-self: stretch;
  }

  .hero-specialization {
    inset: 24% auto 24% 50%;
    width: min(54vw, 12rem);
    transform: translateX(-50%);
  }

  .hero-field {
    inset: 0;
  }

  .hero__metadata {
    gap: var(--space-md);
  }

  .editorial-heading,
  .section-kicker,
  .journey-section__header {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-lg);
  }

  .editorial-heading .eyebrow,
  .editorial-heading h2,
  .editorial-heading > p:last-child,
  .section-kicker .eyebrow,
  .section-kicker h2,
  .journey-section__chapter,
  .journey-section__heading-mask {
    grid-column: 1;
  }

  .editorial-heading h2,
  .section-kicker h2,
  .work-preview h2 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

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

  .achievement-entry article {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: var(--space-sm) var(--space-md);
  }

  .achievement-entry__number,
  .achievement-entry__type,
  .achievement-entry h3,
  .achievement-entry__context,
  .achievement-entry__description {
    grid-column: 2;
  }

  .achievement-entry__number {
    grid-column: 1;
    grid-row: 1 / span 4;
  }

  .achievement-entry h3 {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .work-preview__head {
    gap: var(--space-xl);
  }

  .project-story__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
  }

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

  .project-story,
  .project-story:nth-child(1),
  .project-story:nth-child(2),
  .project-story:nth-child(3),
  .project-story:nth-child(4),
  .project-story:nth-child(5) {
    grid-column: 1;
  }

  .project-story:nth-child(5) .project-story__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-story:nth-child(5) .project-story__content { order: 2; }
  .project-story:nth-child(5) .project-story__media { order: 1; }

  .project-story__content,
  .project-story__media,
  .project-story:nth-child(even) .project-story__content,
  .project-story:nth-child(even) .project-story__media {
    grid-column: 1;
    grid-row: auto;
  }

  .project-story__media {
    aspect-ratio: 4 / 3;
  }

  .project-story h3 {
    font-size: clamp(3rem, 14vw, 5rem);
  }

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

  .workflow-preview__columns > div:last-child {
    display: none;
  }

  .journey-section__connector {
    display: block;
    inset-block: clamp(8rem, 24vw, 10rem) 0;
    inset-inline-start: 0;
  }

  .experience-entry__layout,
  .education-entry__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-xl);
  }

  .experience-entry__meta,
  .experience-entry__body,
  .education-entry__facts {
    grid-column: 1;
  }

  .experience-entry__meta {
    padding-inline-end: 0;
  }

  .experience-entry h4 {
    font-size: clamp(2.8rem, 13vw, 4.75rem);
  }

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

  .education-entry h4 {
    font-size: clamp(2rem, 10vw, 3.2rem);
    overflow-wrap: anywhere;
  }

  .spec-sheet > div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-md);
  }

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

  .resume-callout a {
    width: max-content;
  }

  .contact {
    align-items: start;
  }

  .contact__statement h2 {
    font-size: clamp(3.8rem, 18vw, 6rem);
  }

  .contact__links {
    min-width: 0;
  }

  .site-footer__inner {
    display: grid;
  }
}

@media (min-width: 48.01rem) and (max-width: 75rem) {
  .project-story--workflow .project-story__media {
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 30rem) {
  .project-story--rag .project-story__media {
    aspect-ratio: 1 / 1;
  }

  .project-story--workflow .project-story__media {
    aspect-ratio: 3 / 4;
  }

  .project-story--voice .project-story__media {
    aspect-ratio: 4 / 5;
  }

  .workflow-preview__columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
    padding-block: var(--space-sm);
  }

  .workflow-preview__columns > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.45rem;
  }

  .workflow-preview__columns b {
    grid-column: 1 / -1;
  }

  .workflow-preview__columns span {
    padding: 0.45rem;
  }

  .voice-preview__metrics {
    gap: clamp(0.35rem, 2vw, var(--space-sm));
  }

  .voice-preview__metrics span {
    padding-inline: clamp(0.35rem, 2vw, var(--space-sm));
    text-align: center;
  }
}

@media (max-width: 28rem) {
  .hero__metadata {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__socials {
    flex-wrap: wrap;
  }

  .project-card__meta,
  .project-preview__bar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .retina-preview__results {
    display: none;
  }
}

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

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

  .hero-specialization svg {
    animation: none;
  }

  [data-hero-name-line],
  [data-hero-detail],
  [data-hero-actions],
  [data-hero-detail-visual],
  [data-hero-metadata],
  [data-editorial-section],
  [data-project-story],
  [data-journey-section],
  [data-journey-entry],
  [data-journey-line] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}

@keyframes specialization-rotate {
  to { transform: rotate(360deg); }
}

@keyframes loader-safety-exit {
  0%, 88% { opacity: 1; visibility: visible; pointer-events: auto; }
  100% { opacity: 0; visibility: hidden; pointer-events: none; }
}

@keyframes page-wipe {
  0% { transform: scaleY(0); transform-origin: bottom; }
  48% { transform: scaleY(1); transform-origin: bottom; }
  52% { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: top; }
}
