:root {
  color-scheme: light;
  --ink: #101010;
  --ink-soft: #191919;
  --paper: #f4f0e7;
  --paper-deep: #e8e1d5;
  --white: #fffdf8;
  --red: #ed3d2f;
  --red-dark: #c72b20;
  --red-on-light: #b3261e;
  --muted: #6f6a62;
  --line: rgba(16, 16, 16, 0.18);
  --line-inverse: rgba(255, 253, 248, 0.18);
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
  --shell: min(1240px, calc(100% - 64px));
  --header-height: 86px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

::selection {
  background: var(--red);
  color: var(--white);
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--ink);
}

.archive-notice {
  position: fixed;
  z-index: 200;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 14px;
  color: var(--white);
  background: rgba(16, 16, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.archive-notice a { color: var(--red); text-decoration: none; }

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-height);
  color: var(--white);
  border-bottom: 1px solid transparent;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    backdrop-filter 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(16, 16, 16, 0.86);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.wordmark-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--red-dark);
  color: var(--white);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 800;
}

.wordmark-text span {
  color: var(--red);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 38px);
}

.nav-links a {
  position: relative;
  color: rgba(255, 253, 248, 0.72);
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 180ms ease;
}

.nav-links a:not(.nav-resume)::after {
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 1px;
  background: var(--red);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--white);
}

.nav-links a:not(.nav-resume):hover::after,
.nav-links a:not(.nav-resume):focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links .nav-resume {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border: 1px solid rgba(255, 253, 248, 0.4);
  color: var(--white);
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.nav-links .nav-resume:hover,
.nav-links .nav-resume:focus-visible {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink);
}

.menu-toggle {
  width: 46px;
  height: 46px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.menu-toggle > span:not(.sr-only) {
  width: 20px;
  height: 1px;
  background: currentColor;
  transition: transform 220ms ease;
}

.menu-toggle[aria-expanded="true"] > span:nth-child(2) {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] > span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: calc(var(--header-height) + 96px) 0 0;
  background: var(--ink);
  color: var(--white);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 88%);
  mask-image: linear-gradient(to bottom, black, transparent 88%);
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.12;
  pointer-events: none;
}

.hero-orb-one {
  width: 560px;
  height: 560px;
  top: -250px;
  right: -120px;
  border: 1px solid var(--red);
  box-shadow:
    0 0 0 70px rgba(237, 61, 47, 0.3),
    0 0 0 140px rgba(237, 61, 47, 0.18);
}

.hero-orb-two {
  width: 280px;
  height: 280px;
  bottom: 40px;
  left: -180px;
  border: 1px solid var(--white);
  box-shadow: 0 0 0 65px rgba(255, 255, 255, 0.08);
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.88fr);
  align-items: center;
  gap: clamp(48px, 7vw, 104px);
  padding-bottom: 92px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.section-kicker,
.contact-kicker,
.system-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
  color: rgba(255, 253, 248, 0.68);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(237, 61, 47, 0.14);
}

.hero h1 {
  max-width: 880px;
  margin-bottom: 34px;
  font-size: clamp(3.7rem, 7.2vw, 7.35rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.89;
}

.hero h1 em,
.display-heading em {
  color: var(--red);
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.hero h1 em {
  display: inline-block;
}

.hero-intro {
  max-width: 700px;
  margin-bottom: 38px;
  color: rgba(255, 253, 248, 0.7);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 0 22px;
  border: 1px solid transparent;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    transform 220ms var(--ease),
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.button:hover {
  transform: translateY(-3px);
}

.button-primary {
  background: var(--red-dark);
  color: var(--white);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--white);
  color: var(--ink);
}

.button-ghost {
  border-color: rgba(255, 253, 248, 0.34);
  color: var(--white);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.07);
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 26px;
}

.profile-links a {
  color: rgba(255, 253, 248, 0.68);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-underline-offset: 4px;
  transition: color 160ms ease;
}

.profile-links a:hover,
.profile-links a:focus-visible {
  color: var(--white);
}

.system-card {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(255, 253, 248, 0.22);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 22px 22px 0 rgba(237, 61, 47, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.system-card::before {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 36px;
  height: 4px;
  background: var(--red);
  content: "";
}

.system-card-head,
.system-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.system-card-head {
  border-bottom: 1px solid rgba(255, 253, 248, 0.16);
  color: rgba(255, 253, 248, 0.58);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--white);
}

.live-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7df07a;
  box-shadow: 0 0 10px rgba(125, 240, 122, 0.8);
}

.system-card-body {
  padding: clamp(28px, 4vw, 46px);
}

.system-label {
  margin-bottom: 18px;
  color: var(--red);
}

.system-card h2 {
  margin-bottom: 10px;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.system-company {
  margin-bottom: 44px;
  color: rgba(255, 253, 248, 0.62);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.flow {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 36px;
}

.flow-node {
  display: grid;
  gap: 5px;
  font-family: var(--mono);
}

.flow-node span {
  color: var(--red);
  font-size: 0.55rem;
}

.flow-node strong {
  font-size: 0.62rem;
  font-weight: 500;
}

.flow-line {
  position: relative;
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
}

.flow-line i {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: var(--red);
  animation: flow-pulse 2.4s linear infinite;
}

.flow-line:nth-of-type(4) i {
  animation-delay: 1.1s;
}

@keyframes flow-pulse {
  to {
    left: 120%;
  }
}

.system-note {
  margin-bottom: 0;
  color: rgba(255, 253, 248, 0.66);
  font-size: 0.87rem;
  line-height: 1.75;
}

.system-card-foot {
  flex-wrap: wrap;
  justify-content: flex-start;
  border-top: 1px solid rgba(255, 253, 248, 0.16);
  color: rgba(255, 253, 248, 0.58);
}

.system-card-foot span:not(:last-child)::after {
  margin-left: 14px;
  color: var(--red);
  content: "/";
}

.metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 253, 248, 0.18);
}

.metric {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 34px clamp(18px, 2.5vw, 34px);
}

.metric:first-child {
  padding-left: 0;
}

.metric:not(:last-child) {
  border-right: 1px solid rgba(255, 253, 248, 0.18);
}

.metric strong {
  color: var(--white);
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.metric span {
  max-width: 180px;
  color: rgba(255, 253, 248, 0.58);
  font-family: var(--mono);
  font-size: 0.67rem;
  line-height: 1.6;
  text-transform: uppercase;
}

/* Shared sections */
.section {
  padding: clamp(104px, 12vw, 170px) 0;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.23fr) minmax(0, 1fr);
  gap: clamp(48px, 8vw, 130px);
}

.section-kicker {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-top: 12px;
  color: var(--muted);
}

.section-kicker span {
  color: var(--red-on-light);
}

.section-kicker p {
  margin-bottom: 0;
}

.display-heading {
  max-width: 920px;
  margin-bottom: clamp(56px, 7vw, 96px);
  font-size: clamp(2.8rem, 5.8vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(160px, 0.23fr) minmax(0, 1fr);
  gap: clamp(48px, 8vw, 130px);
}

.section-intro .display-heading {
  margin-bottom: 78px;
}

.section-intro.inverse .section-kicker {
  color: rgba(255, 253, 248, 0.5);
}

/* About */
.about {
  background: var(--paper);
}

.about-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(36px, 7vw, 100px);
  margin-bottom: 90px;
}

.about-lead {
  margin-bottom: 0;
  font-size: clamp(1.28rem, 2vw, 1.72rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.48;
}

.about-detail {
  max-width: 620px;
  color: #4e4a44;
  font-size: 1rem;
}

.about-detail p:last-child {
  margin-bottom: 0;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle {
  padding: 36px clamp(18px, 3vw, 36px) 38px 0;
}

.principle:not(:last-child) {
  border-right: 1px solid var(--line);
}

.principle:not(:first-child) {
  padding-left: clamp(18px, 3vw, 36px);
}

.principle span {
  display: block;
  margin-bottom: 30px;
  color: var(--red-on-light);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

.principle h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
  letter-spacing: -0.025em;
}

.principle p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Impact */
.impact,
.toolkit {
  background: var(--ink);
  color: var(--white);
}

.impact-list {
  border-top: 1px solid var(--line-inverse);
}

.impact-row {
  display: grid;
  grid-template-columns: 54px minmax(220px, 0.8fr) minmax(280px, 1.05fr) minmax(190px, 0.55fr);
  align-items: start;
  gap: clamp(22px, 3.8vw, 58px);
  padding: 42px 0;
  border-bottom: 1px solid var(--line-inverse);
  transition:
    padding 260ms var(--ease),
    background-color 220ms ease;
}

.impact-row:hover {
  padding-right: 24px;
  padding-left: 24px;
  background: rgba(255, 255, 255, 0.035);
}

.impact-index,
.impact-title span,
.impact-result span {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.impact-index,
.impact-title span {
  color: var(--red);
}

.impact-title span {
  display: block;
  margin-bottom: 12px;
}

.impact-title h3 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.impact-row > p {
  margin-bottom: 0;
  color: rgba(255, 253, 248, 0.6);
  font-size: 0.9rem;
}

.impact-result {
  display: grid;
  gap: 10px;
  justify-items: end;
  text-align: right;
}

.impact-result strong {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.impact-result span {
  max-width: 170px;
  color: rgba(255, 253, 248, 0.58);
  line-height: 1.5;
}

/* Experience */
.experience {
  background: var(--paper-deep);
}

.experience .section-kicker,
.timeline-meta {
  color: #5c574f;
}

.timeline {
  position: relative;
  border-top: 1px solid var(--line);
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(160px, 0.32fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding: 46px 0 52px;
  border-bottom: 1px solid var(--line);
}

.timeline-marker {
  position: relative;
  z-index: 2;
  width: 17px;
  height: 17px;
  display: block;
  align-self: start;
  margin-top: 7px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper-deep);
}

.timeline-item.current .timeline-marker {
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(237, 61, 47, 0.12);
}

.timeline-meta {
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 0.67rem;
  line-height: 1.65;
}

.timeline-meta p {
  margin-bottom: 2px;
}

.timeline-content {
  max-width: 760px;
}

.role-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.company {
  margin-bottom: 8px;
  color: var(--red-on-light);
  font-family: var(--mono);
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-content h3 {
  margin-bottom: 18px;
  font-size: clamp(1.3rem, 2vw, 1.78rem);
  letter-spacing: -0.04em;
  line-height: 1.25;
}

.timeline-content > p:last-of-type {
  margin-bottom: 0;
  color: #5c574f;
  font-size: 0.92rem;
}

.current-badge {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 6px 9px;
  border: 1px solid var(--red);
  color: var(--red-on-light);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
}

.timeline-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.timeline-highlights li {
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.2);
  font-family: var(--mono);
  font-size: 0.61rem;
}

/* Toolkit */
.toolkit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-inverse);
  border-bottom: 1px solid var(--line-inverse);
}

.tool-group {
  min-width: 0;
  padding: 34px clamp(20px, 3vw, 38px) 42px 0;
}

.tool-group:not(:last-child) {
  border-right: 1px solid var(--line-inverse);
}

.tool-group:not(:first-child) {
  padding-left: clamp(20px, 3vw, 38px);
}

.tool-number {
  margin-bottom: 48px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.67rem;
}

.tool-group h3 {
  margin-bottom: 26px;
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}

.tool-group ul {
  display: grid;
  gap: 10px;
  margin-bottom: 0;
  padding: 0;
  color: rgba(255, 253, 248, 0.58);
  font-family: var(--mono);
  font-size: 0.72rem;
  list-style: none;
}

.tool-group li::before {
  margin-right: 10px;
  color: var(--red);
  content: "+";
}

.security-line {
  display: grid;
  grid-template-columns: minmax(180px, 0.3fr) 1fr;
  gap: 36px;
  padding-top: 38px;
}

.security-line span {
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.07em;
}

.security-line p {
  margin-bottom: 0;
  color: rgba(255, 253, 248, 0.58);
  font-family: var(--mono);
  font-size: 0.72rem;
}

/* Contact */
.contact {
  padding: clamp(90px, 10vw, 140px) 0;
  background: var(--red-dark);
  color: var(--white);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.6fr);
  align-items: end;
  gap: clamp(48px, 8vw, 120px);
}

.contact-kicker {
  margin-bottom: 22px;
  color: var(--white);
}

.contact h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(3rem, 6vw, 6.2rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.94;
}

.contact-actions {
  display: grid;
  gap: 28px;
}

.contact-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 253, 248, 0.48);
  color: var(--white);
  font-family: var(--mono);
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  text-decoration: none;
  transition: border-color 180ms ease;
}

.contact-email:hover,
.contact-email:focus-visible {
  border-color: var(--white);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.contact-links a {
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-underline-offset: 4px;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  color: var(--white);
}

/* Footer */
.site-footer {
  padding: 26px 0;
  background: var(--ink);
  color: rgba(255, 253, 248, 0.62);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.footer-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-layout p {
  margin-bottom: 0;
}

.footer-layout a {
  color: var(--white);
  text-underline-offset: 4px;
}

/* Reveal motion */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 720ms var(--ease),
    transform 720ms var(--ease);
}

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

.reveal-ready .reveal-delay-1 {
  transition-delay: 80ms;
}

.reveal-ready .reveal-delay-2 {
  transition-delay: 160ms;
}

.reveal-ready .reveal-delay-3 {
  transition-delay: 240ms;
}

/* Error page */
.error-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--ink);
  color: var(--white);
}

.error-content {
  width: min(760px, 100%);
  padding: clamp(34px, 7vw, 84px);
  border: 1px solid rgba(255, 253, 248, 0.22);
  box-shadow: 20px 20px 0 var(--red);
}

.error-code {
  margin-bottom: 10px;
  color: var(--red);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.error-content h1 {
  margin-bottom: 22px;
  font-size: clamp(3.2rem, 8vw, 7rem);
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.error-content > p:not(.error-code) {
  max-width: 520px;
  margin-bottom: 34px;
  color: rgba(255, 253, 248, 0.65);
}

/* Responsive */
@media (max-width: 1080px) {
  :root {
    --shell: min(100% - 48px, 1120px);
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.76fr);
    gap: 48px;
  }

  .impact-row {
    grid-template-columns: 40px minmax(200px, 0.8fr) minmax(250px, 1fr);
  }

  .impact-result {
    grid-column: 2 / -1;
    justify-items: start;
    text-align: left;
  }

  .experience .section-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .experience .section-kicker {
    padding-top: 0;
  }

  .experience .display-heading {
    margin-bottom: 52px;
  }

  .experience .timeline-item {
    grid-template-columns: 18px minmax(150px, 0.28fr) minmax(0, 1fr);
    gap: 32px;
  }

  .contact-layout {
    grid-template-columns: 1fr minmax(320px, 0.55fr);
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 74px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: var(--header-height) 0 0;
    min-height: 0;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    justify-content: safe center;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 36px 24px 72px;
    background: rgba(16, 16, 16, 0.98);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    transition:
      opacity 220ms ease,
      transform 220ms var(--ease),
      visibility 0s linear 220ms;
  }

  .nav-links.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .nav-links a {
    width: min(100%, 600px);
    min-height: 62px;
    display: flex;
    align-items: center;
    margin: 0 auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    color: var(--white);
    font-size: 0.85rem;
  }

  .nav-links a:not(.nav-resume)::after {
    display: none;
  }

  .nav-links .nav-resume {
    min-height: 58px;
    justify-content: space-between;
    margin-top: 26px;
    border: 1px solid rgba(255, 255, 255, 0.35);
  }

  .hero {
    padding-top: calc(var(--header-height) + 70px);
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 70px;
    padding-bottom: 92px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .system-card {
    width: min(620px, calc(100% - 22px));
  }

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

  .metric:first-child {
    padding-left: 24px;
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 253, 248, 0.18);
  }

  .section-grid,
  .section-intro {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .section-kicker {
    padding-top: 0;
  }

  .about-columns {
    grid-template-columns: 1fr;
  }

  .principles {
    grid-template-columns: 1fr;
  }

  .principle,
  .principle:not(:first-child) {
    padding: 28px 0;
    border-right: 0;
  }

  .principle:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }

  .principle span {
    margin-bottom: 18px;
  }

  .impact-row {
    grid-template-columns: 40px 1fr;
  }

  .impact-row > p,
  .impact-result {
    grid-column: 2;
  }

  .experience .timeline-item {
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 24px;
    row-gap: 12px;
    padding: 36px 0 40px;
  }

  .experience .timeline-meta,
  .experience .timeline-content {
    grid-column: 2;
  }

  .timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
  }

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

  .tool-group,
  .tool-group:not(:first-child) {
    padding: 30px;
  }

  .tool-group:nth-child(2) {
    border-right: 0;
  }

  .tool-group:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-inverse);
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    max-width: 620px;
  }
}

@media (max-width: 620px) {
  :root {
    --shell: calc(100% - 40px);
  }

  .hero {
    padding-top: calc(var(--header-height) + 54px);
  }

  .hero h1 {
    font-size: clamp(3.15rem, 15vw, 4.7rem);
  }

  .hero h1 em {
    font-size: 0.72em;
    white-space: nowrap;
  }

  .hero-intro {
    font-size: 0.95rem;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .profile-links {
    gap: 14px 20px;
  }

  .system-card-body {
    padding: 30px 24px;
  }

  .system-card h2 {
    font-size: 2.55rem;
  }

  .flow {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .flow-node {
    grid-template-columns: 24px 1fr;
  }

  .flow-line {
    width: 1px;
    height: 20px;
    margin-left: 7px;
  }

  .flow-line i {
    top: -40%;
    left: 0;
    width: 100%;
    height: 40%;
    animation-name: flow-pulse-mobile;
  }

  @keyframes flow-pulse-mobile {
    to {
      top: 120%;
    }
  }

  .system-card-foot span:not(:last-child)::after {
    display: none;
  }

  .metrics {
    width: 100%;
  }

  .metric,
  .metric:first-child {
    padding: 26px 20px;
  }

  .metric strong {
    font-size: 1.65rem;
  }

  .display-heading {
    font-size: clamp(2.6rem, 13vw, 4rem);
  }

  .about-columns {
    margin-bottom: 60px;
  }

  .impact-row {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 34px 0;
  }

  .impact-row:hover {
    padding-right: 0;
    padding-left: 0;
    background: transparent;
  }

  .impact-row > p,
  .impact-result {
    grid-column: 1;
  }

  .impact-index {
    margin-bottom: 2px;
  }

  .experience .timeline-item {
    column-gap: 20px;
    padding: 30px 0 34px;
  }

  .role-line {
    display: block;
  }

  .current-badge {
    display: inline-block;
    margin: 0 0 14px;
  }

  .experience .timeline-highlights {
    display: grid;
    gap: 8px;
  }

  .toolkit-grid {
    grid-template-columns: 1fr;
  }

  .tool-group,
  .tool-group:not(:first-child) {
    padding: 28px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line-inverse);
  }

  .tool-number {
    margin-bottom: 24px;
  }

  .security-line {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .contact h2 {
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  .contact-email {
    overflow-wrap: anywhere;
  }

  .footer-layout {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  :root {
    --shell: calc(100% - 32px);
  }

  .hero h1 em {
    font-size: 0.62em;
  }

  .wordmark-text {
    display: none;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .metric:not(:last-child) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 253, 248, 0.18);
  }
}

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

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

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

@media (forced-colors: active) {
  .wordmark-mark,
  .button-primary,
  .status-dot,
  .timeline-item.current .timeline-marker {
    border: 1px solid ButtonText;
  }

  .hero-grid,
  .hero-orb {
    display: none;
  }
}
