:root {
  --ink: #10120f;
  --moss: #30372d;
  --lichen: #a7b58a;
  --lichen-bright: #c9d5a9;
  --parchment: #f4f0e7;
  --fog: #b7b5aa;
  --display: "DM Sans", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --curve: cubic-bezier(0.16, 1, 0.3, 1);
  --tree-state-1: 1;
  --tree-state-2: 0;
  --tree-state-3: 0;
  --tree-state-4: 0;
  --tree-state-5: 0;
  --tree-state-6: 0;
  --tree-state-7: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { min-width: 320px; margin: 0; overflow-x: hidden; background: var(--ink); color: var(--parchment); font-family: var(--display); font-size: 16px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.skip-link { position: fixed; z-index: 30; top: 1rem; left: 50%; padding: 0.7rem 0.9rem; transform: translate(-50%, -180%); background: var(--parchment); color: var(--ink); font: 0.7rem var(--mono); transition: transform 180ms var(--curve); }
.skip-link:focus { transform: translate(-50%, 0); }

.site-header { position: fixed; z-index: 10; top: 0; right: 0; left: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 1.25rem clamp(1.25rem, 4vw, 4.6rem); background: linear-gradient(180deg, rgba(16, 18, 15, 0.88), rgba(16, 18, 15, 0.42)); border-bottom: 1px solid rgba(244, 240, 231, 0.08); backdrop-filter: blur(12px); }
.wordmark, .site-nav, .motion-toggle, .section-label, .project__type, .project__state, .credit span, .site-footer { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.09em; line-height: 1.35; text-transform: uppercase; }
.wordmark { color: var(--parchment); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.12em; }
.site-nav { display: flex; gap: clamp(1.15rem, 2.5vw, 2.5rem); color: rgba(244, 240, 231, 0.76); }
.site-nav a, .motion-toggle, .contact__return { transition: color 220ms var(--curve), transform 220ms var(--curve); }
.site-nav a:hover, .site-nav a:focus-visible, .contact__return:hover, .contact__return:focus-visible { color: var(--lichen-bright); }
.motion-toggle { justify-self: end; display: inline-flex; align-items: center; gap: 0.45rem; border: 0; padding: 0; background: transparent; color: rgba(244, 240, 231, 0.58); cursor: pointer; }
.motion-toggle:hover { color: var(--lichen-bright); }
.motion-toggle__mark { width: 0.48rem; height: 0.48rem; border: 1px solid currentColor; border-radius: 50%; }
body[data-motion="paused"] .motion-toggle__mark { border-radius: 0; }

.tree-field { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; background: #10120f; }
.tree-field__state { position: absolute; inset: 0; background: center / cover no-repeat; will-change: opacity; }
.tree-field__state--1 { background-image: url("public/assets/origami-tree-seed-v1.png"); opacity: var(--tree-state-1); }
.tree-field__state--2 { background-image: url("public/assets/origami-tree-stage-2-v1.png"); opacity: var(--tree-state-2); }
.tree-field__state--3 { background-image: url("public/assets/origami-tree-stage-3-nest-v2.png"); opacity: var(--tree-state-3); }
.tree-field__state--4 { background-image: url("public/assets/origami-tree-stage-4-eggs-v2.png"); opacity: var(--tree-state-4); }
.tree-field__state--5 { background-image: url("public/assets/origami-tree-stage-5-hatching-v5.png"); opacity: var(--tree-state-5); }
.tree-field__state--6 { background-image: url("public/assets/origami-tree-stage-6-hatchlings-v2.png"); opacity: var(--tree-state-6); }
.tree-field__state--7 { background-image: url("public/assets/origami-tree-stage-7-birds-v2.png"); opacity: var(--tree-state-7); }
.tree-field__veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16, 18, 15, 0.96) 0%, rgba(16, 18, 15, 0.88) 34%, rgba(16, 18, 15, 0.47) 56%, rgba(16, 18, 15, 0.13) 78%, rgba(16, 18, 15, 0.06) 100%); }

main, .site-footer { position: relative; z-index: 1; }
.hero { display: flex; align-items: end; min-height: 100dvh; padding: 8.8rem clamp(1.25rem, 8vw, 9.5rem) 4.5rem; }
.hero__content { max-width: 46rem; padding-bottom: clamp(1.5rem, 5vh, 4rem); }
.hero__kicker, .section-label { margin: 0 0 1.25rem; color: var(--lichen); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; letter-spacing: -0.055em; }
h1 { max-width: 8.8ch; margin: 0 0 2rem; font-size: clamp(4.4rem, 9.2vw, 10.5rem); line-height: 0.9; }
.hero__intro { max-width: 27rem; margin: 0; color: rgba(244, 240, 231, 0.86); font-size: clamp(1.05rem, 1.55vw, 1.3rem); font-weight: 300; line-height: 1.6; }
.hero__detail { max-width: 39rem; margin: 1rem 0 0; color: rgba(244, 240, 231, 0.7); font-size: clamp(0.95rem, 1.2vw, 1.08rem); font-weight: 300; line-height: 1.62; }
.hero__bio-link { display: inline-flex; gap: 0.6rem; align-items: center; margin-top: 1.7rem; color: var(--lichen-bright); font: 0.68rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; transition: color 220ms var(--curve), transform 220ms var(--curve); }
.hero__bio-link span { font-size: 1rem; transition: transform 220ms var(--curve); }
.hero__bio-link:hover, .hero__bio-link:focus-visible { color: var(--parchment); transform: translateX(0.3rem); }
.hero__bio-link:hover span, .hero__bio-link:focus-visible span { transform: translate(0.15rem, -0.15rem); }

.section, .contact { position: relative; padding: clamp(8rem, 17vw, 16rem) clamp(1.25rem, 8vw, 9.5rem); }
.section-heading { max-width: 42rem; }
.section-heading > p:last-child { max-width: 29rem; color: rgba(244, 240, 231, 0.78); font-size: clamp(1.05rem, 1.45vw, 1.25rem); font-weight: 300; line-height: 1.6; }
h2 { max-width: 9ch; margin: 0 0 2.35rem; font-size: clamp(3.8rem, 7.4vw, 8.5rem); line-height: 0.94; }

.work { display: grid; grid-template-columns: minmax(16rem, 0.95fr) minmax(20rem, 1.05fr); gap: clamp(3rem, 9vw, 10rem); align-items: start; min-height: 85vh; }
.work .section-heading { position: sticky; top: 8rem; }
.project-index { display: grid; gap: clamp(4.5rem, 9vw, 8rem); max-width: 33rem; padding-top: clamp(7rem, 10vw, 10rem); }
.project { max-width: 33rem; }
.project--offset { margin-left: clamp(0rem, 8vw, 8rem); }
.project__art-link { display: block; width: min(100%, 24rem); margin: 0 0 1.8rem; overflow: hidden; background: var(--moss); box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.2); }
.project__preview { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--moss); }
.project__preview--thinking { background: #1d261c; }
.project__preview::after { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(24, 30, 21, 0.22), rgba(183, 201, 149, 0.08)); content: ""; mix-blend-mode: multiply; pointer-events: none; transition: opacity 320ms var(--curve); }
.project__iframe { position: absolute; top: 0; left: 0; width: 238%; height: 238%; border: 0; pointer-events: none; transform: scale(0.42); transform-origin: top left; filter: saturate(0.58) sepia(0.1) contrast(1.05); transition: filter 320ms var(--curve), transform 600ms var(--curve); }
.project__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.58) sepia(0.1) contrast(1.05); transition: filter 320ms var(--curve), transform 600ms var(--curve); }
.project__image--thinking { object-position: 50% 41%; filter: saturate(0.65) sepia(0.12) contrast(1.06); transform: scale(1.03); }
.project__image--coach-ann { object-position: 52% 49%; filter: saturate(0.62) sepia(0.13) contrast(1.06); transform: scale(1.03); }
.project__iframe--studio { top: -2.5rem; height: 260%; }
.project__art-link:hover .project__iframe, .project__art-link:focus-visible .project__iframe, .project__art-link:hover .project__image, .project__art-link:focus-visible .project__image { filter: saturate(0.82) sepia(0.04) contrast(1.02); transform: scale(0.435); }
.project__art-link:hover .project__image--thinking, .project__art-link:focus-visible .project__image--thinking { filter: saturate(0.8) sepia(0.06) contrast(1.03); transform: scale(1.08); }
.project__art-link:hover .project__image--coach-ann, .project__art-link:focus-visible .project__image--coach-ann { filter: saturate(0.79) sepia(0.06) contrast(1.03); transform: scale(1.08); }
.project__art-link:hover .project__preview::after, .project__art-link:focus-visible .project__preview::after { opacity: 0.35; }
.project__type { margin: 0 0 1.15rem; color: var(--lichen-bright); }
.project h3 { margin: 0 0 1.15rem; font-size: clamp(2.7rem, 4.8vw, 5.5rem); line-height: 0.96; }
.project__summary { margin-bottom: 1.6rem; color: rgba(244, 240, 231, 0.78); font-weight: 300; line-height: 1.6; }
.project__state { color: rgba(244, 240, 231, 0.62); }
.project__link { width: fit-content; color: var(--lichen-bright); font: 0.7rem var(--mono); letter-spacing: 0.09em; line-height: 1.35; text-transform: uppercase; transition: color 220ms var(--curve), transform 220ms var(--curve); }
.project__link:hover, .project__link:focus-visible { color: var(--parchment); transform: translateX(0.35rem); }

.music { display: grid; grid-template-columns: minmax(16rem, 0.95fr) minmax(20rem, 1.05fr); gap: clamp(3rem, 9vw, 10rem); align-items: start; min-height: 85vh; }
.music__heading { position: sticky; top: 8rem; }
.credit-list { display: grid; gap: clamp(4rem, 9vw, 8rem); padding-top: clamp(7rem, 10vw, 10rem); }
.credit { display: grid; gap: 0.9rem; max-width: 31rem; }
.credit--offset { margin-left: clamp(0rem, 8vw, 8rem); }
.credit__art-link { display: block; width: min(100%, 17rem); margin-bottom: 1.35rem; overflow: hidden; background: var(--moss); }
.credit__art { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(0.72) contrast(1.05); transition: filter 320ms var(--curve), transform 600ms var(--curve); }
.credit__art-link:hover .credit__art, .credit__art-link:focus-visible .credit__art { filter: saturate(0.95) contrast(1.02); transform: scale(1.035); }
.credit p { margin: 0; font-size: clamp(2.3rem, 4vw, 4.7rem); font-weight: 300; letter-spacing: -0.045em; line-height: 1; }
.credit span { color: rgba(244, 240, 231, 0.72); }
.credit__listen { width: fit-content; margin-top: 0.25rem; color: var(--lichen-bright); font: 0.62rem var(--mono); letter-spacing: 0.09em; text-transform: uppercase; transition: color 220ms var(--curve); }
.credit__listen:hover, .credit__listen:focus-visible { color: var(--parchment); }

.about { display: grid; grid-template-columns: minmax(14rem, 0.8fr) minmax(20rem, 1.2fr); gap: clamp(3rem, 12vw, 14rem); align-items: start; min-height: 88vh; }
.about__name { margin: 0; color: rgba(244, 240, 231, 0.25); font-size: clamp(4.8rem, 11vw, 12.5rem); font-weight: 300; letter-spacing: -0.08em; line-height: 0.77; }
.about__copy { max-width: 44rem; }
.about__copy h2 { max-width: 9.8ch; font-size: clamp(3.3rem, 6.2vw, 7rem); }
.about__copy > p:not(.section-label) { max-width: 35rem; color: rgba(244, 240, 231, 0.8); font-size: clamp(1.05rem, 1.45vw, 1.28rem); font-weight: 300; line-height: 1.65; }
.about__copy > p:last-child { margin-top: 2rem; color: rgba(244, 240, 231, 0.68); font-size: 1rem; }

.contact { min-height: 84vh; padding-top: clamp(10rem, 20vw, 18rem); }
.contact h2 { max-width: 8.8ch; color: var(--lichen-bright); font-size: clamp(4.6rem, 10vw, 11rem); }
.contact__links { display: grid; gap: 0.75rem; margin-bottom: 2rem; }
.contact__links a { width: fit-content; color: var(--fog); font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 300; transition: color 220ms var(--curve), transform 220ms var(--curve); }
.contact__links a:hover, .contact__links a:focus-visible { color: var(--lichen-bright); transform: translateX(0.35rem); }
.contact__return { color: var(--lichen); font: 0.62rem var(--mono); letter-spacing: 0.09em; text-transform: uppercase; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.8rem clamp(1.25rem, 4vw, 4.6rem); color: rgba(244, 240, 231, 0.42); }

.reveal { opacity: 0; filter: blur(4px); transform: translateY(14px); transition: opacity 650ms var(--curve), filter 650ms var(--curve), transform 650ms var(--curve); }
.reveal.is-visible { opacity: 1; filter: blur(0); transform: translateY(0); }
.hero .reveal:nth-child(2) { transition-delay: 80ms; }
.hero .reveal:nth-child(3) { transition-delay: 150ms; }
.hero .reveal:nth-child(4) { transition-delay: 210ms; }

:focus-visible { outline: 2px solid var(--lichen-bright); outline-offset: 5px; }
@media (max-width: 760px) {
  .site-header { grid-template-areas: "mark motion" "nav nav"; grid-template-columns: 1fr auto; row-gap: 0.8rem; padding: 1rem 1.25rem 0.85rem; }
  .wordmark { grid-area: mark; }
  .site-nav { grid-area: nav; display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.61rem; }
  .motion-toggle { grid-area: motion; }
  .motion-toggle__label { display: none; }
  .motion-toggle { width: 2.75rem; height: 2.75rem; justify-content: center; }
  .tree-field__state { background-position: 62% center; }
  .tree-field__veil { background: linear-gradient(90deg, rgba(16, 18, 15, 0.94), rgba(16, 18, 15, 0.48) 78%, rgba(16, 18, 15, 0.2)); }
  .hero { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 8.8rem 1.25rem 2.2rem; }
  h1 { font-size: clamp(4.1rem, 18vw, 6.5rem); }
  .section, .contact { padding: 7.5rem 1.25rem; }
  .work, .project-index, .music, .about { display: block; }
  .project { margin-bottom: 5.5rem; }
  .project--offset, .credit--offset { margin-left: 0; }
  .work .section-heading, .music__heading { position: static; }
  .project-index, .credit-list { gap: 4.5rem; padding-top: 4rem; }
  .credit { max-width: 23rem; }
  .about__name { margin-bottom: 4rem; }
  .contact { min-height: 72vh; }
  .site-footer { display: block; }
  .site-footer span { display: block; }
  .site-footer span + span { margin-top: 0.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; filter: none; transform: none; }
  :root { --tree-state-1: 0; --tree-state-2: 0; --tree-state-3: 0; --tree-state-4: 0; --tree-state-5: 0; --tree-state-6: 0; --tree-state-7: 1; }
}
