:root {
  --bg: #0a0a0b;
  --bg-soft: #101012;
  --ink: #ececee;
  --ink-dim: #8b8b93;
  --ink-faint: #55555c;
  --hair: #232328;
  --accent: #c0fe04;
  --accent-dim: rgba(192, 254, 4, 0.35);

  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(20px, 3.5vw, 56px);
  --giant: clamp(2.9rem, 8.2svw, 8.6rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #000; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2b2b31; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a41; }

:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

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

#stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1s ease 0.15s;
}
#stage.ready { opacity: 1; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
  pointer-events: none;
  transition: opacity 0.5s;
}
body.ready .loader { opacity: 0; }

.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;
}

.progress {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(280px, 40vw);
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  z-index: 60;
  overflow: hidden;
}
#progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- HUD ---------- */
.hud {
  position: fixed;
  left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud-top { top: 0; }
.hud-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 10, 11, 0.9), rgba(10, 10, 11, 0));
  transition: background 0.35s ease;
}
.hud-bottom {
  bottom: 0;
  transition: opacity 0.3s ease;
}
.hud-bottom::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(10, 10, 11, 0.86), rgba(10, 10, 11, 0));
  transition: background 0.35s ease;
}

.hud-logo,
.hud-nav a,
.hud-clock,
.hud-bottom span {
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.35s ease;
}

.hud-logo { font-weight: 700; }

.hud-nav { display: flex; gap: 26px; }

.hud-nav a {
  position: relative;
  transition: color 0.2s ease;
}
.hud-nav a::after {
  content: "";
  position: absolute;
  inset: -7px -9px;
  border: 1px dotted transparent;
  transition: border-color 0.2s ease;
}
.hud-nav a:hover::after { border-color: currentColor; }

.hud-clock { font-variant-numeric: tabular-nums; }
.hud-bottom span { font-variant-numeric: tabular-nums; }

.hud-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hud-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}
.hud-menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Bubble hero ---------- */
.hero-page {
  position: relative;
  height: calc(100svh + var(--track));
  --track: 55svh;
  --hero-hair: rgba(238, 240, 255, 0.14);
  padding: 0;
  z-index: 1;
}
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
@media (max-width: 720px) {
  .hero-page { --track: 35svh; }
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(var(--hero-hair), var(--hero-hair)) 33.33% 0 / 1px 100% no-repeat,
    linear-gradient(var(--hero-hair), var(--hero-hair)) 66.66% 0 / 1px 100% no-repeat,
    linear-gradient(var(--hero-hair), var(--hero-hair)) 0 54% / 100% 1px no-repeat;
}

.hero-marks {
  position: absolute;
  top: clamp(76px, 13vh, 128px);
  left: var(--pad);
  right: var(--pad);
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
  pointer-events: none;
  text-shadow: 0 2px 24px rgba(5, 5, 20, 0.5);
}
.hm { font-size: 15px; line-height: 1.45; color: var(--ink-dim); }
.hm-a {
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 500;
  color: var(--ink);
}
.hm-c { justify-self: end; max-width: 380px; }

.hero-copy {
  position: absolute;
  left: var(--pad);
  bottom: clamp(44px, 10vh, 110px);
  z-index: 2;
  max-width: min(760px, 86vw);
  pointer-events: none;
  text-shadow: 0 2px 30px rgba(5, 5, 20, 0.45);
}
.kicker {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin-bottom: 16px;
}
.headline {
  font-size: clamp(2.3rem, 6.6vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-transform: uppercase;
}
.footnote {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-dim);
  margin-top: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  background: rgba(10, 10, 50, 0.55);
  border: 1px solid var(--hero-hair);
  border-radius: 999px;
  padding: 8px 16px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  white-space: nowrap;
}

.word-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
  font-family: 'Pacifico', cursive;
  font-weight: 400;
}
body.no-webgl .hero-page,
body.no-webgl .contact {
  background: linear-gradient(180deg, #0b0b45 0%, #12127c 50%, #1c1c96 100%);
}
body.no-webgl #stage,
body.no-webgl .loader,
body.no-webgl .hint { display: none; }
body.no-webgl .word-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  clip-path: none;
  overflow: visible;
  white-space: nowrap;
  text-align: center;
  font-size: clamp(3.4rem, 13vw, 8rem);
  line-height: 1.2;
  color: var(--ink);
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
  padding: 14px 0;
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: scroll-x 36s linear infinite;
}
.marquee-track span {
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.marquee-track i {
  font-style: normal;
  color: var(--accent);
  font-size: 12px;
}
@keyframes scroll-x {
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
section { padding: clamp(90px, 14vh, 160px) var(--pad); }

.sec-head {
  max-width: 680px;
  margin-bottom: clamp(48px, 8vh, 96px);
}
.sec-index {
  display: block;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
}
.sec-index::before {
  content: "/ ";
  color: var(--ink-faint);
}
.sec-title {
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  text-transform: uppercase;
}
.sec-sub {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-dim);
  max-width: 480px;
}

/* ---------- Projects ---------- */
.work {
  --accent: #f9d84a;
  --accent-dim: rgba(249, 216, 74, 0.35);
  --hair: #2a2a2a;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: clamp(76px, 9vw, 132px);
}

.project { position: relative; }

.project-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: clamp(30px, 4.4vw, 52px);
}
.project-num {
  display: block;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project-title {
  margin-top: 14px;
  color: #ffffff;
  font-size: clamp(3.3rem, 8.4vw, 8.4rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-weight: 900;
  text-transform: none;
}
.project-dates {
  margin-top: clamp(12px, 1.4vw, 18px);
  color: #ffffff;
  font-size: clamp(1.15rem, 1.6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.project-role {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 16px;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
  font-size: clamp(11px, 0.85vw, 12px);
  font-weight: 700;
  line-height: 1.2;
}
.project-deck {
  max-width: 620px;
  margin: 18px auto 0;
  color: #9f9f9f;
  font-size: clamp(0.95rem, 1.05vw, 1.06rem);
  line-height: 1.6;
}

.project-cards {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 1.8vw, 24px);
}
.project-col {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 24px);
  min-width: 0;
}

.project-card {
  position: relative;
  padding: clamp(22px, 2.6vw, 34px);
  border-radius: clamp(20px, 2.1vw, 30px);
  background: var(--card-bg);
  color: var(--card-ink);
  overflow: hidden;
}
.project-card > * { position: relative; z-index: 1; }
.project-card h4 {
  margin: 0;
  color: var(--card-ink);
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.project-card > p {
  margin-top: 12px;
  color: var(--card-muted);
  font-size: clamp(0.875rem, 1vw, 0.96rem);
  line-height: 1.6;
}
.card-label {
  display: block;
  margin-bottom: 14px;
  color: var(--card-accent);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project--airfrance {
  --card-bg: #1a2b60;
  --card-ink: #f7f8ff;
  --card-muted: #b9c3e8;
  --card-line: rgba(255, 255, 255, 0.16);
  --card-accent: #f9d84a;
  --card-soft: rgba(255, 255, 255, 0.07);
}
.project--lloyds {
  --card-bg: #143c2d;
  --card-ink: #f2f8f3;
  --card-muted: #a9c5b8;
  --card-line: rgba(255, 255, 255, 0.15);
  --card-accent: #f9d84a;
  --card-soft: rgba(255, 255, 255, 0.07);
}
.project--commbank {
  --card-bg: #f5c518;
  --card-ink: #111111;
  --card-muted: rgba(17, 17, 17, 0.68);
  --card-line: rgba(17, 17, 17, 0.18);
  --card-accent: #111111;
  --card-soft: rgba(0, 0, 0, 0.06);
}
.project--medibank {
  --card-bg: #b83a2a;
  --card-ink: #fff8f5;
  --card-muted: #ffe4df;
  --card-line: rgba(255, 255, 255, 0.18);
  --card-accent: #ffe4b5;
  --card-soft: rgba(255, 255, 255, 0.08);
}

.project-card--feature::after {
  content: "+";
  position: absolute;
  right: -0.02em;
  bottom: -0.32em;
  color: var(--card-line);
  font-size: clamp(10rem, 16vw, 17rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.06em;
  pointer-events: none;
}

.project-card--media .project-media {
  margin-top: clamp(18px, 2.2vw, 26px);
}
.project-media {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--card-line);
  border-radius: clamp(14px, 1.3vw, 18px);
  background: #000000;
  overflow: hidden;
}
.project-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000000;
}
.project-media-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.video-toggle {
  flex: 0 0 auto;
  padding: 3px 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease;
}
.video-toggle:hover { color: var(--accent); }

.card-stats {
  margin-top: clamp(20px, 2.2vw, 28px);
  padding-top: 18px;
  border-top: 1px solid var(--card-line);
}
.card-stats .card-label {
  margin-bottom: 12px;
  color: var(--card-accent);
}
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
}
.stat-row > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat-row strong {
  color: var(--card-ink);
  font-size: clamp(1.55rem, 2.1vw, 2.15rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.stat-row span {
  color: var(--card-muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
  list-style: none;
}
.project-tags li {
  border: 1px solid var(--card-line);
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--card-soft);
  color: var(--card-muted);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.earlier-card .project-tags { margin-top: 14px; }
.earlier-card .project-tags li {
  border-color: var(--hair);
  background: transparent;
  color: var(--ink-dim);
}

.project-role-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
  list-style: none;
}
.project-role-list li {
  position: relative;
  padding-left: 16px;
  color: var(--card-muted);
  font-size: clamp(0.84rem, 0.95vw, 0.92rem);
  line-height: 1.55;
}
.project-role-list li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--card-accent);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.75;
}
.project-role-list strong {
  color: var(--card-ink);
  font-weight: 700;
}

.project-card--links .project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}
.project-card--links .project-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--card-ink);
  color: var(--card-bg);
  text-decoration: none;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.project-card--links .project-links a:hover {
  transform: translateY(-1px);
  opacity: 0.88;
}

.note-label {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-media--static {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #111;
}
.static-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 16 / 9;
  padding: clamp(20px, 3vw, 36px);
  overflow: hidden;
  background:
    radial-gradient(80% 120% at 90% 0, rgba(249, 216, 74, 0.16), transparent 55%),
    linear-gradient(145deg, #211d12, #0b0a08 68%);
}
.static-art::after {
  content: "+";
  position: absolute;
  right: -0.02em;
  bottom: -0.28em;
  color: rgba(255, 255, 255, 0.045);
  font-size: clamp(10rem, 20vw, 22rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
}
.static-art-kicker {
  position: relative;
  z-index: 1;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.static-art-title {
  position: relative;
  z-index: 1;
  max-width: 8ch;
  color: var(--ink);
  font-size: clamp(2.4rem, 4.4vw, 4.8rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.static-art-meta {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-earlier {
  margin-top: clamp(44px, 6vw, 78px);
}
.earlier-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hair);
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.earlier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
  margin-top: 18px;
}
.earlier-card {
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--hair);
  border-radius: 16px;
  background: #1a1a1a;
}
.earlier-index {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.earlier-card h4 {
  margin: 10px 0 8px;
  font-size: clamp(1.08rem, 1.4vw, 1.3rem);
  font-weight: 700;
  line-height: 1.2;
}
.earlier-card p {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.55;
}
.earlier-card .project-tags { margin-top: 14px; }

.project-more {
  display: inline-flex;
  gap: 8px;
  margin-top: clamp(24px, 3vw, 36px);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--hair);
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.project-more:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}

/* ---------- Experience ---------- */
.xp-list { list-style: none; border-top: 1px solid var(--hair); }

.xp-row { border-bottom: 1px solid var(--hair); }

.xp-toggle {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: baseline;
  gap: 20px;
  width: 100%;
  padding: 26px 4px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.xp-toggle:hover .xp-role { color: var(--accent); }

.xp-idx { font-size: 12px; color: var(--ink-faint); }

.xp-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.xp-role {
  font-size: clamp(1.25rem, 2.6vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}
.xp-org { font-size: 14px; color: var(--ink-dim); }

.xp-meta {
  display: flex;
  align-items: baseline;
  gap: 22px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.xp-chev {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
  color: var(--ink-dim);
}
.xp-row.open .xp-chev {
  transform: rotate(135deg);
  color: var(--accent);
}

.xp-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.xp-panel ul {
  list-style: none;
  padding: 0 4px 30px 84px;
  display: grid;
  gap: 10px;
  max-width: 720px;
}
.xp-panel li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink-dim);
}
.xp-panel li::before {
  content: "//";
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.55;
  font-family: var(--mono);
  font-size: 12px;
  top: 3px;
}

/* ---------- Capabilities ---------- */
.cap-list {
  border-top: 1px solid var(--hair);
  max-width: 980px;
}
.cap-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 26px 4px;
  border-bottom: 1px solid var(--hair);
  transition: padding-left 0.25s ease;
}
.cap-row:hover { padding-left: 14px; }
.cap-row dt {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.cap-row dd {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.about-lede {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.scribbled { position: relative; }
.scribble {
  position: absolute;
  left: 0; right: 0;
  bottom: -10px;
  width: 100%;
  height: 24px;
  overflow: visible;
}
.scribble path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.4s;
}
.in .scribble path { stroke-dashoffset: 0; }

.facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hair);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.facts div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
}
.facts dt {
  text-transform: uppercase;
  color: var(--ink-faint);
}
.facts dd { color: var(--ink-dim); text-transform: uppercase; }

/* ---------- Contact footer ---------- */
.contact {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(96px, 13vh, 140px) var(--pad) 30px;
  position: relative;
  isolation: isolate;
  z-index: 1;
  text-shadow: 0 2px 24px rgba(5, 5, 20, 0.35);
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(238, 240, 255, 0.12), rgba(238, 240, 255, 0.12)) 33.33% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(238, 240, 255, 0.12), rgba(238, 240, 255, 0.12)) 66.66% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(238, 240, 255, 0.12), rgba(238, 240, 255, 0.12)) 0 54% / 100% 1px no-repeat;
}

.contact-inner {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(40px, 7vw, 120px);
}

.contact-main {
  min-width: 0;
  max-width: 820px;
}

.contact-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.contact-kicker-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.contact-title {
  margin-top: clamp(22px, 3.5vh, 36px);
  font-size: clamp(3.1rem, 6.1vw, 6.4rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 800;
  color: var(--ink);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: clamp(30px, 5vh, 48px);
}

.contact-hello {
  display: inline-flex;
  align-items: center;
  gap: clamp(28px, 3.5vw, 48px);
  padding: 14px 18px 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.contact-hello:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  transform: translateY(-2px);
}
.contact-hello:hover .contact-hello-arrow {
  border-color: rgba(10, 10, 11, 0.25);
  color: var(--bg);
}
.contact-hello-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(10, 10, 11, 0.25);
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.contact-resume {
  display: inline-flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 34px);
  padding: 14px 18px 14px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.contact-resume-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(10, 10, 11, 0.25);
  border-radius: 50%;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.contact-resume:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  transform: translateY(-2px);
}
.contact-resume:hover .contact-resume-arrow {
  border-color: rgba(10, 10, 11, 0.25);
  color: var(--bg);
}
.contact-resume:focus-visible,
.contact-hello:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: clamp(38px, 6vh, 64px);
}

.contact-channel {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease;
}
.contact-channel--email {
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  max-width: 100%;
}
.contact-channel--email > span:last-child { overflow-wrap: anywhere; }

.contact-channel-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: var(--bg);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.contact-channel-icon svg { width: 18px; height: 18px; }

a.contact-channel:hover { color: var(--accent); }
a.contact-channel:hover .contact-channel-icon {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.contact-channel-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px clamp(22px, 3vw, 34px);
}

.contact-footer {
  width: 100%;
  max-width: 1320px;
  margin: clamp(48px, 8vh, 90px) auto 0;
  padding-top: clamp(20px, 3vh, 30px);
  border-top: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.contact-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-name {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}
.contact-copyright {
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-motto {
  color: var(--accent);
  font-family: "Pacifico", cursive;
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  transform: rotate(-2deg);
}

.contact-top {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}
.contact-top-circle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hair);
  border-radius: 50%;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.contact-top:hover { color: var(--accent); }
.contact-top:hover .contact-top-circle {
  border-color: var(--accent);
  background: var(--accent);
  color: #0a0a0b;
}

/* ---------- Contact dialog ---------- */
body.dialog-open { overflow: hidden; }

.contact-dialog {
  width: min(960px, calc(100vw - 32px));
  max-width: 960px;
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 26px;
  background: transparent;
  color: var(--ink);
}
.contact-dialog::backdrop {
  background: rgba(3, 4, 10, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.contact-dialog[open] {
  animation: contact-dialog-in 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes contact-dialog-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.contact-dialog-card {
  position: relative;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(30px, 5vw, 72px);
  max-height: calc(100svh - 32px);
  padding: clamp(28px, 4.5vw, 54px);
  border: 1px solid #2b2b31;
  border-radius: 26px;
  background: #111114;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
  overflow-y: auto;
}

.contact-dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--hair);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact-dialog-close:hover { color: var(--ink); border-color: var(--ink-dim); }

.contact-dialog-intro { padding-top: 20px; }
.contact-dialog-title {
  margin-top: 20px;
  color: var(--ink);
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.contact-dialog-lede {
  margin-top: 20px;
  color: var(--ink-dim);
  font-size: 17px;
  line-height: 1.6;
}

.contact-form {
  min-width: 0;
  padding-top: 24px;
}
.contact-fieldset { border: 0; }
.contact-form-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.contact-form-label span { color: var(--ink-faint); font-weight: 400; }
.contact-fieldset + .contact-form-label { margin-top: 22px; }

.contact-intents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.contact-intent { position: relative; display: inline-flex; }
.contact-intent input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.contact-intent span {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  color: var(--ink-dim);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.contact-intent input:checked + span {
  border-color: rgba(192, 254, 4, 0.45);
  background: rgba(192, 254, 4, 0.09);
  color: var(--accent);
}
.contact-intent input:focus-visible + span {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

.contact-note {
  width: 100%;
  min-height: 118px;
  padding: 14px 16px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.contact-note::placeholder { color: var(--ink-faint); }
.contact-note:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.055);
}

.contact-form-hint {
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 11.5px;
}

.contact-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}
.contact-submit {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding: 14px 18px 14px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0b;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.contact-submit:hover { background: var(--ink); color: var(--bg); }
.contact-submit span { font-size: 17px; }

.contact-dialog-copy {
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.contact-dialog-copy:hover { color: var(--accent); }

.contact-dialog-email {
  display: inline-block;
  margin-top: 24px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--hair);
  color: var(--ink-dim);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.contact-dialog-email:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal],
  .xp-panel {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .marquee-track { animation: none; }
  .scribble path { stroke-dashoffset: 0; transition: none; }
  .contact-dialog[open] { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .cap-row { grid-template-columns: 150px 1fr; }
  .project-card { padding: clamp(20px, 3vw, 26px); }
  .project-card h4 { font-size: clamp(1.35rem, 2.8vw, 1.75rem); }
  .earlier-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  :root { --giant: clamp(2.4rem, 11.5svw, 4rem); }
  html { scroll-padding-top: 92px; }
  .hud-logo,
  .hud-menu-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .hud-nav {
    position: absolute;
    top: calc(100% - 2px);
    left: var(--pad);
    right: var(--pad);
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--hair);
    border-radius: 18px;
    background: rgba(13, 13, 15, 0.97);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
  }
  .hud-top[data-nav-open="true"] .hud-nav { display: flex; }
  .hud-top[data-nav-open="true"] .hud-menu-toggle {
    background: var(--accent);
    border-color: var(--accent);
    color: #0a0a0b;
  }
  .hud-nav a {
    padding: 15px 12px;
    border-bottom: 1px solid var(--hair);
    font-size: 13px;
  }
  .hud-nav a:last-child { border-bottom: 0; }
  .hud-nav a::after { display: none; }
  .hud-nav a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
    border-radius: 8px;
  }
  .hud-bottom { display: none; }
  #coords { display: none; }
  .hero-marks { grid-template-columns: 1fr; }
  .hm-c { display: none; }
  .hero-copy { bottom: calc(var(--pad) + 34px); }
  .hint { display: none; }
  .project-list { gap: 68px; }
  .project-head { margin-bottom: 28px; }
  .project-title { font-size: clamp(2.9rem, 8.4vw, 4.6rem); }
  .project-dates { font-size: 1.15rem; }
  .project-role { padding: 7px 15px; font-size: 11px; }
  .project-deck { max-width: 92%; margin-top: 15px; font-size: 14px; }
  .project-cards { flex-direction: column; align-items: stretch; gap: 16px; }
  .project-col { display: contents; }
  .project-card { padding: 22px; border-radius: 22px; }
  .project-card h4 { font-size: 1.45rem; }
  .project-card > p { font-size: 14px; }
  .project-card--media { order: 1; }
  .project-card--scope { order: 2; }
  .project-card--feature { order: 3; }
  .project-card--role { order: 4; }
  .project-card--stack { order: 5; }
  .project-card--links { order: 6; }
  .project-more {
    min-height: 44px;
    align-items: center;
  }
  .project-media-bar { padding: 0 11px; min-height: 44px; }
  .video-toggle {
    min-height: 44px;
    padding: 0 8px;
  }
  .project-card--links .project-links a {
    min-height: 44px;
    padding: 10px 15px;
    font-size: 11px;
  }
  .contact {
    padding-top: clamp(110px, 15vh, 140px);
    padding-bottom: 24px;
  }
  .contact-inner {
    flex-direction: column;
    gap: 36px;
  }
  .contact-title {
    font-size: clamp(2.8rem, 11vw, 4.4rem);
  }
  .contact-hello {
    gap: 24px;
    padding: 13px 15px 13px 22px;
  }
  .contact-resume {
    gap: 20px;
    padding: 13px 15px 13px 22px;
  }
  .contact-channels {
    gap: 12px;
    margin-top: 32px;
  }
  .contact-channel { min-height: 44px; }
  .contact-channel--email {
    align-items: flex-start;
    font-size: clamp(0.9rem, 4.2vw, 1.15rem);
  }
  .contact-channel-links { gap: 10px 20px; }
  .contact-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 18px 20px;
    margin-top: 48px;
  }
  .contact-motto {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }
  .contact-top {
    grid-column: 2;
    grid-row: 1;
  }
  .contact-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100svh - 20px);
  }
  .contact-dialog-card {
    grid-template-columns: 1fr;
    gap: 22px;
    max-height: calc(100svh - 20px);
    padding: 28px 22px;
  }
  .contact-dialog-close {
    top: 14px;
    right: 14px;
  }
  .contact-dialog-intro { padding-top: 10px; }
  .contact-dialog-title { font-size: clamp(2.2rem, 10vw, 3.2rem); }
  .contact-dialog-lede { margin-top: 12px; font-size: 15px; }
  .contact-form { padding-top: 0; }
  .contact-dialog-email { font-size: 12px; overflow-wrap: anywhere; }
  .stat-row { gap: 14px 22px; }
  .earlier-grid { grid-template-columns: 1fr; }
  .xp-toggle { grid-template-columns: 44px 1fr; }
  .xp-meta {
    grid-column: 2;
    grid-row: 2;
    flex-wrap: wrap;
    gap: 6px 16px;
    white-space: normal;
  }
  .xp-meta > span { white-space: nowrap; }
  .xp-panel ul { padding-left: 48px; }
  .cap-row { grid-template-columns: 1fr; gap: 8px; }
}
