:root {
  --ink: #0b0b0b;
  --paper: #f2f0e9;
  --acid: #dfff00;
  --muted: #a4a49d;
  --line: rgba(242, 240, 233, 0.2);
  --soft: #c1c0ba;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
}

:root[data-theme="light"] {
  --ink: #edebe3;
  --paper: #151513;
  --acid: #3157ff;
  --muted: #66665f;
  --line: rgba(21, 21, 19, 0.2);
  --soft: #4b4b46;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color .45s ease, color .45s ease;
}

::selection { background: var(--acid); color: var(--ink); }

a { color: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--acid);
  color: var(--ink);
  padding: .75rem 1rem;
  transition: top .2s;
}

.skip-link:focus { top: 1rem; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  width: 34rem;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(223, 255, 0, .075), transparent 67%);
  left: 70%;
  top: 30%;
}

.site-header {
  height: 6rem;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.monogram {
  font: 500 1.25rem var(--mono);
  text-decoration: none;
}

.monogram span { color: var(--acid); }

nav { display: flex; gap: clamp(.9rem, 2.3vw, 2.5rem); }
nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
nav a:hover, nav a:focus-visible { color: var(--paper); }

.header-tools { justify-self: end; display: flex; align-items: center; gap: 1.5rem; }
.local-time { display: flex; align-items: center; gap: .65rem; }
.pulse { width: .5rem; height: .5rem; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 0 rgba(223,255,0,.5); animation: pulse 2.4s infinite; }

.theme-toggle { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--paper); background: transparent; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.theme-toggle:hover { background: var(--paper); color: var(--ink); transform: rotate(8deg); }
.theme-icon { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }

.hero {
  min-height: calc(100svh - 6rem);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem clamp(1.25rem, 4vw, 4rem) 3rem;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.eyebrow, .section-label {
  font: 400 .78rem/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: .11em;
  color: var(--muted);
}

.hero h1 {
  margin: 1.2rem 0 2.5rem;
  font-size: clamp(4.5rem, 13.5vw, 13rem);
  line-height: .76;
  letter-spacing: -.075em;
  font-weight: 500;
  text-transform: uppercase;
}

.hero h1 span { display: block; }
.hero h1 .outline { color: transparent; -webkit-text-stroke: 1.5px var(--paper); margin-left: 12%; }

.hero-bottom { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding-left: 42%; }
.intro { margin: 0; max-width: 34rem; font-size: clamp(1.15rem, 1.75vw, 1.55rem); line-height: 1.55; }
.intro em { font-style: normal; color: var(--acid); }

.scroll-cue {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 1rem;
  font: .75rem var(--mono);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.scroll-cue svg { width: 2.8rem; height: 2.8rem; padding: .7rem; border: 1px solid var(--line); border-radius: 50%; fill: none; stroke: currentColor; stroke-width: 1.2; transition: background .25s, color .25s; }
.scroll-cue:hover svg { background: var(--acid); color: var(--ink); }

.orbit { position: absolute; z-index: 0; width: clamp(11rem, 19vw, 19rem); aspect-ratio: 1; right: 9%; top: 12%; display: grid; place-items: center; padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; }
.orbit-ring { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 50%; animation: spin 16s linear infinite; }
.orbit-ring::after { content: ""; position: absolute; left: 50%; top: -.35rem; width: .7rem; height: .7rem; background: var(--acid); border-radius: 50%; }
.orbit-dot { position: absolute; inset: 16%; border: 1px dashed rgba(242,240,233,.15); border-radius: 50%; }
.orbit span { font: 400 .67rem/1.45 var(--mono); text-align: center; letter-spacing: .12em; color: var(--muted); }

.section { padding: 9rem clamp(1.25rem, 4vw, 4rem); border-bottom: 1px solid var(--line); }
.section-label { display: flex; gap: 2rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--line); }
.section-label span:first-child { color: var(--acid); }

.about-copy { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(3rem, 8vw, 9rem); padding-top: 5rem; align-items: end; }
.about h2, .closing h2 { margin: 0; font-size: clamp(2.8rem, 6vw, 6.2rem); line-height: 1.05; letter-spacing: -.055em; font-weight: 500; }
.about h2 span, .closing h2 span { color: var(--acid); }
.about-copy p { margin: 0 0 .5rem; color: var(--soft); font-size: 1.05rem; line-height: 1.75; }

.studio-card { position: relative; margin-top: 4rem; min-height: 38rem; display: grid; grid-template-columns: minmax(18rem, .9fr) 1.1fr; overflow: hidden; border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 3%, transparent); }
.studio-mark { position: relative; min-height: 34rem; display: grid; place-items: center; overflow: hidden; border-right: 1px solid var(--line); background: var(--acid); color: var(--ink); }
.studio-mark::before, .studio-mark::after { content: ""; position: absolute; width: 145%; height: 1px; background: currentColor; opacity: .3; }
.studio-mark::before { transform: rotate(38deg); }
.studio-mark::after { transform: rotate(-38deg); }
.studio-mark span { position: relative; z-index: 1; font-size: clamp(8rem, 17vw, 17rem); line-height: .7; letter-spacing: -.12em; font-weight: 600; transform: translateX(-.08em); }
.studio-mark small { position: absolute; right: 2rem; bottom: 2rem; font: 500 1.1rem var(--mono); }
.studio-copy { align-self: end; padding: clamp(2rem, 5vw, 5rem); }
.studio-kicker { margin: 0 0 2rem; color: var(--acid); font: .72rem var(--mono); text-transform: uppercase; letter-spacing: .09em; }
.studio-copy h2 { margin: 0 0 2rem; font-size: clamp(2.5rem, 5vw, 5rem); line-height: 1.02; letter-spacing: -.055em; font-weight: 500; }
.studio-copy > p:not(.studio-kicker) { max-width: 39rem; margin: 0; color: var(--soft); font-size: 1.03rem; line-height: 1.75; }
.studio-link { width: min(100%, 22rem); margin-top: 3rem; padding: 1rem 0; border-bottom: 1px solid var(--paper); display: flex; justify-content: space-between; font: .75rem var(--mono); text-decoration: none; text-transform: uppercase; letter-spacing: .09em; }
.studio-link span { transition: transform .2s; }
.studio-link:hover span { transform: translate(.25rem, -.25rem); }

.now h2 { margin: 4rem 0 3rem; font-size: clamp(2.4rem, 5vw, 5rem); letter-spacing: -.045em; font-weight: 500; }
.now-list { border-top: 1px solid var(--line); }
.now-item { position: relative; display: grid; grid-template-columns: 5rem minmax(9rem, .6fr) 1fr 3rem; gap: 2rem; align-items: center; padding: 2.8rem 0; border-bottom: 1px solid var(--line); transition: padding .3s ease, color .3s ease; }
.now-item::before { content: ""; position: absolute; inset: 0; background: var(--acid); transform: scaleY(0); transform-origin: bottom; transition: transform .3s ease; z-index: -1; }
.now-item:hover { color: var(--ink); padding-inline: 1.5rem; }
.now-item:hover::before { transform: scaleY(1); }
.item-number { font: .75rem var(--mono); color: var(--muted); }
.now-item:hover .item-number { color: rgba(11,11,11,.55); }
.now-item h3 { margin: 0; font-size: clamp(1.5rem, 2.5vw, 2.4rem); font-weight: 500; }
.now-item p { margin: 0; max-width: 35rem; color: var(--muted); line-height: 1.65; }
.now-item:hover p { color: rgba(11,11,11,.7); }
.item-mark { justify-self: end; font-size: 1.5rem; }

.shelf-heading { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(3rem, 8vw, 9rem); align-items: end; padding: 4rem 0 5rem; }
.shelf-heading h2 { margin: 0; font-size: clamp(2.7rem, 5.5vw, 5.7rem); line-height: 1.03; letter-spacing: -.055em; font-weight: 500; }
.shelf-heading h2 span { color: var(--acid); }
.shelf-heading > p { margin: 0 0 .5rem; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.library-shelf { margin-top: 0; }
.library-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); font-family: var(--mono); text-transform: uppercase; letter-spacing: .09em; }
.library-heading p { margin: 0; color: var(--paper); font-size: .75rem; }
.library-heading span { color: var(--muted); font-size: .68rem; }
.library-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.library-book { position: relative; min-height: 12rem; display: grid; grid-template-columns: 2.2rem 1fr; gap: 1rem; align-items: end; padding: 1.5rem; overflow: hidden; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); isolation: isolate; }
.library-book::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--acid); transform: translateY(101%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.library-book:hover::before { transform: none; }
.library-book > span { align-self: start; color: var(--acid); font: .68rem var(--mono); transition: color .3s; }
.library-book:hover > span { color: rgba(11,11,11,.55); }
.library-book h3 { margin: 0; font-size: clamp(1rem, 1.45vw, 1.3rem); line-height: 1.3; font-weight: 500; transition: color .3s; }
.library-book p { margin: .65rem 0 0; color: var(--muted); font: .7rem/1.45 var(--mono); transition: color .3s; }
.library-book:hover h3 { color: #0b0b0b; }
.library-book:hover p { color: rgba(11,11,11,.65); }
.tool-shelf { margin-top: 7rem; }
.tool-shelf-title { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); color: var(--muted); font: .75rem var(--mono); text-transform: uppercase; letter-spacing: .09em; }
.tool-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.tool { min-height: 17rem; padding: 1.5rem; border-right: 1px solid var(--line); }
.tool:last-child { border-right: 0; }
.tool > span { color: var(--acid); font: .7rem var(--mono); }
.tool h3 { margin: 4.5rem 0 1rem; font-size: 1.25rem; font-weight: 500; }
.tool p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }

.notes-heading { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(3rem, 8vw, 9rem); align-items: end; padding: 4rem 0; }
.notes-heading h2 { margin: 0; font-size: clamp(2.7rem, 5.5vw, 5.7rem); line-height: 1.03; letter-spacing: -.055em; font-weight: 500; }
.notes-heading p { margin: 0 0 .5rem; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.note-card { width: min(100%, 58rem); margin-left: auto; padding: clamp(2rem, 4vw, 4rem); border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 4%, transparent); }
.note-meta { display: flex; justify-content: space-between; color: var(--muted); font: .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.note-card h3 { margin: 5rem 0 1.5rem; font-size: clamp(2rem, 4vw, 4rem); letter-spacing: -.04em; font-weight: 500; }
.note-body { max-width: 46rem; color: var(--soft); font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.72; }
.note-body p { margin: 0 0 1.65rem; }
.note-body p:last-child { margin-bottom: 0; }
.note-signature { width: fit-content; margin: 3rem 0 0; padding-top: .8rem; border-top: 1px solid var(--paper); color: var(--muted); font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .18em; }

.easter-egg { position: fixed; right: 2rem; bottom: 2rem; z-index: 50; width: min(calc(100vw - 2rem), 25rem); padding: 2rem; color: var(--ink); background: var(--acid); box-shadow: 0 1.5rem 5rem rgba(0,0,0,.3); transform: translateY(calc(100% + 3rem)) rotate(2deg); opacity: 0; visibility: hidden; transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .35s, visibility .35s; }
.easter-egg.open { transform: translateY(0) rotate(-1deg); opacity: 1; visibility: visible; }
.easter-egg button { position: absolute; top: .6rem; right: .85rem; border: 0; background: transparent; color: inherit; font: 1.5rem var(--sans); cursor: pointer; }
.easter-egg p { margin: .8rem 0 1.6rem; font-size: 1.45rem; line-height: 1.35; font-weight: 600; }
.easter-egg span { font: .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; }

.closing { min-height: 80svh; display: flex; flex-direction: column; justify-content: center; padding: 8rem clamp(1.25rem, 4vw, 4rem); }
.closing > p { margin: 0 0 2rem; font: .78rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.back-top { align-self: end; margin-top: 5rem; width: min(100%, 21rem); padding: 1rem 0; border-bottom: 1px solid var(--paper); display: flex; justify-content: space-between; font: .78rem var(--mono); text-transform: uppercase; letter-spacing: .09em; text-decoration: none; }
.back-top span { transition: transform .2s; }
.back-top:hover span { transform: translateY(-.3rem); }

footer { display: flex; justify-content: space-between; padding: 1.5rem clamp(1.25rem, 4vw, 4rem); border-top: 1px solid var(--line); color: var(--muted); font: .68rem var(--mono); text-transform: uppercase; letter-spacing: .07em; }
footer p { margin: 0; }

.reveal { opacity: 0; transform: translateY(1.25rem); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.visible { opacity: 1; transform: none; }
.gsap-active .reveal { transition: none; }
.gsap-active .library-book { transform-style: preserve-3d; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 .5rem rgba(223,255,0,0); } 100% { box-shadow: 0 0 0 0 rgba(223,255,0,0); } }

@media (max-width: 780px) {
  .site-header { height: 4.5rem; grid-template-columns: 1fr 1fr; }
  nav { display: none; }
  .hero { min-height: calc(100svh - 4.5rem); padding-top: 6rem; justify-content: flex-start; }
  .hero h1 { margin-top: 2rem; font-size: clamp(3.5rem, 20vw, 7rem); line-height: .84; }
  .hero h1 .outline { margin-left: 0; }
  .hero-bottom { padding-left: 0; flex-direction: column; align-items: flex-start; margin-top: auto; }
  .orbit { width: 9rem; right: 6%; top: 39%; }
  .section { padding-top: 6rem; padding-bottom: 6rem; }
  .about-copy { grid-template-columns: 1fr; padding-top: 3rem; }
  .about h2 br { display: none; }
  .about-copy p { max-width: 34rem; }
  .studio-card { grid-template-columns: 1fr; min-height: 0; }
  .studio-mark { min-height: 20rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .studio-mark span { font-size: clamp(9rem, 43vw, 14rem); }
  .studio-copy { padding-block: 3rem; }
  .now h2 { margin-top: 3rem; }
  .now-item { grid-template-columns: 2.5rem 1fr 2rem; gap: 1rem; align-items: start; padding: 2rem 0; }
  .now-item p { grid-column: 2 / -1; }
  .now-item:hover { padding-inline: .75rem; }
  .shelf-heading { grid-template-columns: 1fr; gap: 2rem; padding-bottom: 3rem; }
  .library-shelf { margin-top: 0; }
  .library-grid { grid-template-columns: 1fr 1fr; }
  .library-book { min-height: 11rem; }
  .tool-shelf { margin-top: 5rem; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .tool { min-height: 14rem; border-bottom: 1px solid var(--line); }
  .tool:nth-child(2n) { border-right: 0; }
  .tool:last-child { border-right: 1px solid var(--line); }
  .tool h3 { margin-top: 3rem; }
  .notes-heading { grid-template-columns: 1fr; gap: 2rem; }
  .note-card h3 { margin-top: 3.5rem; }
  .closing { min-height: 70svh; }
  .local-time { display: none; }
  .easter-egg { right: 1rem; bottom: 1rem; }
}

@media (max-width: 430px) {
  .library-heading { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .library-grid { grid-template-columns: 1fr; }
  .library-book { min-height: 9rem; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool { min-height: auto; padding-block: 2rem; border-right: 0; }
  .tool:last-child { border-right: 0; }
  .tool h3 { margin-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}
