:root {
  color-scheme: dark;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  --frame: clamp(1.375rem, 6.6vw, 7rem);
  --header-height: 4.875rem;
  --dark: #09090b;
  --paper: #f5f2ee;
  --ink: #171619;
  --muted: #625d62;
  --gold: #f2ca96;
  --day: 0;
  --blackout: 0;
  --burst-glow: 0;
  --art-x: 74%;
  --art-y: 51%;
  --glow-x: 72%;
  --glow-y: 52%;
  --orbit-opacity: .72;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { margin: 0; background: var(--dark); color: #eeeef0; }
body.detail-open { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}
p, h1, h2 { margin: 0; }
section { scroll-margin-top: var(--header-height); }
.shell { width: min(100% - var(--frame) * 2, 88rem); margin-inline: auto; }

.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed; z-index: 5; top: 1rem; left: 1rem; padding: .75rem 1rem;
  background: #fff; color: var(--ink); border-radius: .5rem;
}

.scene, .scene > * { position: fixed; inset: 0; pointer-events: none; }
.scene { overflow: hidden; background: var(--dark); }
.scene-day {
  opacity: var(--day);
  background:
    radial-gradient(ellipse at var(--art-x) var(--art-y), #f4e5dd 0%, transparent 60%),
    linear-gradient(145deg, #faf8f5 10%, var(--paper) 100%);
}
.scene-atmosphere {
  opacity: calc((1 - var(--day)) * (1 - var(--blackout)) * (1 - var(--burst-glow)));
  background:
    radial-gradient(ellipse 19% 23% at var(--glow-x) var(--glow-y), #fff3da48, #f2d5ad1e 38%, transparent 95%),
    radial-gradient(ellipse 39% 52% at var(--art-x) var(--art-y), #2a292e, #16161b 48%, transparent 92%);
}
.scene-burst {
  inset: 50% auto auto 50%;
  width: min(117vw, 83rem); height: min(82svh, 45rem);
  translate: -50% -50%; scale: var(--burst-spread, .36);
  opacity: var(--burst-glow);
  background:
    radial-gradient(ellipse 13% 24% at 50% 50%, #fffef6 0 6%, #fff4bd 19%, #ffb65c94 42%, transparent 100%),
    radial-gradient(ellipse 21% 36% at 29% 38%, #a2d9f195, #8ec9ec45 53%, transparent 100%),
    radial-gradient(ellipse 26% 27% at 35% 64%, #f18cae73, #e582a638 52%, transparent 100%),
    radial-gradient(ellipse 31% 33% at 70% 43%, #ffcd7185, #ffc97e42 54%, transparent 100%),
    radial-gradient(ellipse 20% 24% at 73% 61%, #ff9d585b, transparent);
}
.scene-burst::before, .scene-burst::after {
  content: ""; position: absolute; inset: 0;
}
.scene-burst::before {
  background: conic-gradient(
    from 7deg,
    #fffbed88 0deg, transparent 2deg 23deg,
    #fff4cc75 25deg, transparent 28deg 59deg,
    #fff1c594 62deg, transparent 64deg 79deg,
    #fffaf1bd 81deg, transparent 83deg 106deg,
    #fff7da91 109deg, transparent 111deg 142deg,
    #fff4d279 144deg, transparent 147deg 177deg,
    #fff9e8a1 180deg, transparent 182deg 223deg,
    #fff1cc80 226deg, transparent 230deg 251deg,
    #fffaf1bd 254deg, transparent 257deg 283deg,
    #fff3cd9b 285deg, transparent 289deg 305deg,
    #fff5dc91 307deg, transparent 309deg 339deg,
    #ffefbb70 342deg, transparent 346deg 357deg, #fffbed88 360deg
  );
  mask-image: radial-gradient(ellipse 65% 56%, black 8%, transparent 78%);
}
.scene-burst::after {
  background:
    radial-gradient(ellipse 42% .65% at 50% 50%, #fffdefd9, transparent),
    radial-gradient(ellipse .65% 43% at 50% 50%, #fffdefbd, transparent),
    radial-gradient(ellipse 7% 14% at 50% 50%, #fffdf5 0 9%, transparent 100%);
}
.scene-orbits {
  inset: var(--art-y) auto auto var(--art-x);
  width: min(48vw, 79svh); aspect-ratio: 1;
  translate: -50% -50%; rotate: -29deg; opacity: var(--orbit-opacity);
}
.scene-orbits i {
  position: absolute; inset: 3% 0; border: 1px solid #d4d0e71c; border-radius: 50%;
  transform: rotateX(53deg);
}
.scene-orbits i:nth-child(2) { inset: 15% -10%; transform: rotateX(55deg) rotateZ(15deg); }
.scene-orbits i:nth-child(3) { inset: 16% 14%; transform: rotateX(59deg) rotateZ(24deg); }
.scene-fallback {
  opacity: calc(.84 - var(--day) * .47);
  inset: var(--art-y) auto auto var(--art-x);
  width: min(47vw, 74svh); aspect-ratio: 1;
  translate: -50% -50%; rotate: -28deg;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 8% 8% at 53% 50%, #fff5de 4%, #ffc47f44 38%, transparent 95%),
    radial-gradient(ellipse 63% 27% at 51% 50%, transparent 48%, #c1bdcf45 57%, transparent 71%),
    radial-gradient(ellipse 69% 36% at 51% 47%, transparent 57%, #9d9faf38 63%, transparent 73%),
    radial-gradient(ellipse 70% 43% at 51% 58%, transparent 51%, #8f889e26 55%, transparent 67%),
    radial-gradient(ellipse 63% 42% at 52% 47%, #63546029 11%, transparent 72%);
}
.scene-fallback::after {
  content: ""; position: absolute; inset: 7%; border-radius: inherit; opacity: var(--day);
  background: conic-gradient(from 210deg, #f7a15c, #e67899, #ad8be4, #75bfde, #fbbf8c, #f7a15c);
  mask: radial-gradient(ellipse 68% 46%, transparent 54%, black 67%, transparent 90%);
}
.scene canvas { width: 100%; height: 100%; display: block; }
.has-webgl .scene-fallback { visibility: hidden; }
.scene-shade {
  opacity: calc((1 - var(--day)) * (1 - var(--burst-glow)));
  background: linear-gradient(90deg, #09090b 0%, #09090bf0 18%, #09090b55 39%, transparent 66%);
}
.scene-blackout { opacity: var(--blackout); background: #08080a; }

.site-header {
  --header-ink: #efeff2;
  --header-contrast-ink: #fff;
  --header-surface: #0b0b0dda;
  --header-divider: #f5f1ff16;
  --header-link: #bebdc6;
  --resume-border: #f5f1ff3e;
  --resume-hover: #ffffff12;
  position: fixed; z-index: 3; inset: 0 0 auto;
  color: var(--header-ink); background: var(--header-surface); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--header-divider);
}
.header-inner {
  height: var(--header-height); display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 1rem;
}
.brand {
  justify-self: start; display: flex; gap: .7rem; align-items: center; text-decoration: none;
  font-size: 1rem; font-weight: 650; letter-spacing: -.025em; white-space: nowrap;
}
.brand img { display: block; border-radius: 50%; object-fit: cover; }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 3.2vw, 2.75rem); }
.site-nav a {
  padding: .55rem 0; position: relative; font-size: .875rem; font-weight: 540;
  color: var(--header-link); text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current] { color: inherit; }
.site-nav a[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .15rem;
  height: 1px; background: currentColor;
}
.resume-link {
  justify-self: end; padding: .6rem .95rem; border: 1px solid var(--resume-border);
  border-radius: 999px; font-size: .875rem; font-weight: 600; text-decoration: none;
}
.resume-link:hover { background: var(--resume-hover); }
[data-tone="light"] { color-scheme: light; }
[data-tone="light"] .site-header {
  --header-ink: var(--ink);
  --header-contrast-ink: #000;
  --header-surface: #faf7f1dd;
  --header-divider: #2118201a;
  --header-link: #615b63;
  --resume-border: #21182036;
  --resume-hover: #2118200e;
}

@supports (color: color-mix(in srgb, black, white)) {
  .site-header {
    --header-day: calc(var(--day) * 100%);
    --header-contrast: calc(400% * var(--day) * (1 - var(--day)));
    background-color: color-mix(in srgb, #0b0b0dda, #faf7f1dd var(--header-day));
    border-bottom-color: color-mix(in srgb, #f5f1ff16, #2118201a var(--header-day));
    color: color-mix(in srgb, var(--header-ink), var(--header-contrast-ink) var(--header-contrast));
  }
  .site-nav a { color: color-mix(in srgb, var(--header-link), currentColor var(--header-contrast)); }
  .resume-link { border-color: color-mix(in srgb, #f5f1ff3e, #21182036 var(--header-day)); }
  .resume-link:hover { background-color: color-mix(in srgb, #ffffff12, #2118200e var(--header-day)); }
}

main { position: relative; }
.hero { min-height: 100svh; }
.hero-inner {
  min-height: 100svh; display: flex; align-items: center; position: relative;
  padding-block: calc(var(--header-height) + 2.5rem) 6rem;
}
.hero-copy { max-width: min(100%, 45rem); position: relative; z-index: 1; }
.eyebrow {
  font-size: .8125rem; font-weight: 680; line-height: 1.4; letter-spacing: .17em;
  text-transform: uppercase;
}
.hero-role { display: flex; align-items: center; gap: .65rem; color: #e3c29a; }
.hero-role span { width: .375rem; height: .375rem; background: var(--gold); border-radius: 50%; }
h1, h2 { font-weight: 580; letter-spacing: -.078em; }
h1 {
  font-size: clamp(2rem, calc(1.25rem + 6.4vw), 6rem); line-height: .94;
  margin: 1.55rem 0 1.65rem; color: #f4f2f3;
}
.hero-description {
  color: #c8c5ce; max-width: max(24rem, 20em); line-height: 1.55; font-size: clamp(1.05rem, 1.75vw, 1.35rem);
}
.button {
  display: inline-flex; justify-content: center; align-items: center; text-decoration: none;
  border-radius: 999px; min-height: 3rem; padding: .65rem 1.25rem; font-size: .9375rem;
  font-weight: 680; transition: background .18s ease, color .18s ease;
}
.button-hero { margin-top: 1.85rem; background: #f3f0eb; color: #151419; }
.button-hero:hover { background: #f2d2ac; }
.button-hero:focus-visible { outline-color: #f3f0eb; }
.hero-bottom {
  position: absolute; inset: auto 0 1.8rem; display: flex; justify-content: space-between; gap: 1rem;
  padding-top: 1.05rem; border-top: 1px solid #ece6ff27;
}
.scroll-link, .cursor-hint {
  display: inline-flex; align-items: center; gap: .55rem; color: #b6b2bf;
  font-size: .875rem; line-height: 1.4; text-decoration: none;
}
.scroll-link:hover { color: #f3f0eb; }
.scroll-link span { display: block; width: .93rem; height: 1px; background: var(--gold); }
.cursor-hint span {
  position: relative; display: block; width: .8rem; height: 1.12rem;
  border: 1px solid currentColor; border-radius: .45rem;
}
.cursor-hint span::after {
  content: ""; position: absolute; left: 50%; top: 3px;
  border-radius: 3px; width: 1px; height: 4px; background: currentColor;
}
html:not(.has-webgl) .cursor-hint { display: none; }

.about-inner, .now-inner, .contact-inner {
  display: flex; align-items: center; min-height: 91svh;
  padding-block: clamp(4.5rem, 11vh, 8rem);
}
.section-copy { width: min(100%, 35rem); }
h2 { font-size: clamp(3.1rem, 6.2vw, 6rem); line-height: .96; text-wrap: balance; }
section .eyebrow { margin-bottom: 1.15rem; }
.about .eyebrow { color: #e3c29a; }
.about .section-copy > p:not(.eyebrow) {
  margin-top: 1.2rem; color: #c8c5ce; max-width: 29rem; font-size: 1.075rem; line-height: 1.65;
}
.about .section-copy > h2 + p { margin-top: 1.6rem; }
.transition { min-height: 112svh; display: none; }
.has-webgl .transition { display: block; }
.bright-section { color: var(--ink); background: var(--paper); }
.has-timeline .bright-section { background: transparent; }
.bright-section .eyebrow { color: #803d54; }
.section-intro {
  max-width: 29rem; margin-top: 1.3rem; color: var(--muted);
  font-size: 1.075rem; line-height: 1.55;
}
.now-inner {
  justify-content: end; align-items: flex-start; min-height: 104svh;
  padding-top: clamp(2rem, 4svh, 3rem);
}
.now h2 { max-width: 32rem; }
.project-list { margin-top: 1.65rem; border-top: 1px solid #24192129; }
.project { border-bottom: 1px solid #24192129; }

.project-trigger, .work-trigger {
  display: grid; align-items: center; gap: 1rem; width: 100%; min-height: 4.6rem;
  padding: .9rem 0; border: 0; background: transparent; cursor: pointer;
  color: var(--ink); text-align: left;
}
.project-trigger { grid-template-columns: 1fr auto; }
.project-trigger strong, .work-trigger strong {
  display: block; font-size: 1.125rem; font-weight: 690; letter-spacing: -.028em;
}
.project-summary, .work-entry > span {
  display: block; margin-top: .25rem; font-size: .9375rem; line-height: 1.4; color: var(--muted);
}
.plus {
  display: grid; place-items: center; width: 2.15rem; height: 2.15rem; position: relative;
  border: 1px solid #22171c32; border-radius: 50%;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.plus::before, .plus::after {
  content: ""; position: absolute; width: .66rem; height: 1px; background: currentColor;
}
.plus::after { rotate: 90deg; }
.detail-trigger:hover .plus, .detail-trigger:focus-visible .plus {
  background: var(--ink); color: #fff; border-color: var(--ink);
}
.work-inner {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: start; column-gap: clamp(2rem, 5vw, 6rem); min-height: 105svh;
  padding-block: clamp(6rem, 16vh, 11rem);
}
.work-heading { position: sticky; top: calc(var(--header-height) + 2rem); }
.work-heading h2 { text-wrap: initial; }
.work-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #24192129; }
.work-list li { border-bottom: 1px solid #24192129; }
.work-trigger { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 4.95rem; }
.work-date { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.contact-inner { min-height: 94svh; position: relative; padding-bottom: 7.5rem; }
.contact h2, .contact .section-copy { max-width: 40rem; }
.button-contact { margin-top: 1.55rem; background: var(--ink); color: #fff; }
.button-contact:hover { background: #653a48; }
.button-contact:focus-visible { outline-color: var(--ink); }
.contact-links {
  display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; list-style: none; padding: 0; margin: 1.3rem 0 0;
}
.contact-links a, .site-footer a {
  font-size: .9375rem; color: #464047; text-decoration-color: #6d626d6f; text-underline-offset: .2em;
}
.contact-links a:hover, .site-footer a:hover { color: #803d54; }
.site-footer {
  position: absolute; inset: auto 0 1.7rem; display: flex; justify-content: space-between;
  gap: 1rem; padding-top: 1rem; border-top: 1px solid #24192129; color: var(--muted); font-size: .875rem;
}

.detail-panel {
  position: fixed; inset: 0 0 0 auto; width: min(100%, 34rem); max-width: none;
  height: 100%; max-height: none; margin: 0; padding: 0; border: 0;
  background: #faf7f4; color: var(--ink); box-shadow: -18px 0 70px #17131f30;
}
.detail-panel[open] { animation: slide-in .25s cubic-bezier(.2, .75, .3, 1); }
@keyframes slide-in { from { transform: translateX(100%); } }
.detail-panel::backdrop { background: #19151f55; backdrop-filter: blur(7px); }
.detail-inner { position: relative; padding: 6rem clamp(1.5rem, 5.5vw, 3.75rem) 3rem; }
.detail-close {
  position: absolute; top: 1.4rem; right: 1.4rem; width: 2.75rem; height: 2.75rem;
  border: 1px solid #21182031; border-radius: 50%; background: transparent; color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}
.detail-close:hover { background: #21182011; }
.detail-close::before, .detail-close::after {
  content: ""; position: absolute; width: .85rem; height: 1px; background: currentColor; rotate: 45deg;
}
.detail-close::after { rotate: -45deg; }
.detail-panel .eyebrow { color: #803d54; margin-bottom: .8rem; }
.detail-panel h2 { font-size: clamp(2.8rem, 7vw, 4.3rem); }
.detail-subtitle { color: var(--muted); margin-top: .85rem; font-weight: 600; line-height: 1.4; }
.detail-summary, .detail-highlights { margin-top: 1.55rem; font-size: 1.025rem; line-height: 1.6; }
.detail-highlights { padding-left: 1.2rem; }
.detail-highlights li { padding-left: .2rem; margin-top: .65rem; }
.detail-highlights li::marker { color: #803d54; }
.detail-stack { margin-top: 1.8rem; border-top: 1px solid #24192129; padding-top: 1rem; color: var(--muted); line-height: 1.65; }
.detail-link { display: inline-block; margin-top: 1.3rem; color: #803d54; font-weight: 650; text-underline-offset: .25em; }

@media (max-width: 850px) {
  :root { --frame: clamp(1.375rem, 5vw, 3rem); --header-height: 4.25rem; }
  .scene-shade { background: linear-gradient(90deg, #09090be8 0%, #09090b69 35%, transparent 75%); }
  .work-inner { column-gap: 2rem; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
  .work-trigger { grid-template-columns: minmax(0, 1fr) auto; column-gap: .75rem; row-gap: .3rem; }
  .work-entry { grid-column: 1; }
  .work-date { grid-row: 2; grid-column: 1; }
  .work-trigger .plus { grid-row: 1 / 3; grid-column: 2; }
}

@media (max-width: 640px) {
  :root { --art-x: 58%; --art-y: 71%; --glow-x: 58%; --glow-y: 71%; --header-height: 4rem; }
  html { scrollbar-gutter: auto; }
  .header-inner { gap: .6rem; }
  .brand img { width: 1.85rem; height: 1.85rem; }
  .brand span { display: none; }
  .site-nav { gap: clamp(.45rem, 3vw, 1rem); }
  .site-nav a { font-size: .8125rem; }
  .resume-link { padding: .45rem .6rem; font-size: .8125rem; }
  .hero-inner { align-items: flex-start; padding-top: calc(var(--header-height) + 2.75rem); }
  h1 { margin: 1rem 0 1.2rem; }
  .hero-description { max-width: 18rem; }
  .button-hero { margin-top: 1.15rem; }
  .hero-bottom { bottom: 1.2rem; }
  .cursor-hint { display: none; }
  .scene-orbits, .scene-fallback { width: min(92vw, 58svh); }
  .scene-atmosphere {
    background:
      radial-gradient(ellipse 31% 17% at var(--glow-x) var(--glow-y), #fff3da44, #f2d5ad1e 38%, transparent 95%),
      radial-gradient(ellipse 62% 28% at var(--art-x) var(--art-y), #29272c, #15151a 50%, transparent 93%);
  }
  .scene-shade { background: linear-gradient(180deg, #09090b 6%, #09090bb0 29%, transparent 77%); }
  .about-inner, .now-inner, .contact-inner { min-height: auto; align-items: flex-start; padding-top: 5rem; }
  .about-inner { min-height: 100svh; padding-bottom: 15rem; }
  .about .section-copy { text-shadow: 0 1px 1px var(--dark), 0 0 10px var(--dark); }
  .has-webgl .transition { min-height: 96svh; }
  .now-inner { padding-bottom: 5rem; }
  .has-webgl .now-inner { padding-top: 19rem; }
  .work-inner { display: block; min-height: auto; padding-block: 5rem; }
  .work-heading { position: static; margin-bottom: 1.8rem; }
  .has-webgl .work-heading { padding-bottom: 12rem; }
  .contact-inner { min-height: 85svh; padding-bottom: 7rem; }
  .has-webgl .contact-inner { padding-bottom: 20rem; }
  .detail-panel {
    inset: auto 0 0; margin: auto 0 0; width: 100%; height: auto; max-height: 90dvh;
    border-radius: 1.25rem 1.25rem 0 0;
  }
  .detail-panel[open] { animation-name: slide-up; }
  @keyframes slide-up { from { transform: translateY(100%); } }
  .detail-inner { padding-top: 4.8rem; }
}

@media (max-width: 380px) {
  .header-inner { width: calc(100% - 1.75rem); }
  .site-nav { gap: .55rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}

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

.scene-atmosphere::after {
  content: ""; position: absolute;
  left: var(--glow-x); top: var(--glow-y);
  width: clamp(4.5rem, 9vw, 9rem); aspect-ratio: 1;
  translate: -50% -50%; scale: var(--beacon-size, 1);
  opacity: var(--beacon, 1); border-radius: 50%;
  background: radial-gradient(circle, #fff 0 4%, #fff6e3 5.5%, #ffe8bad9 9%, #f5c28273 16%, #e4ad6825 35%, transparent 67%);
}
.detail-link[hidden], .detail-stack[hidden], .detail-highlights[hidden] { display: none; }
