:root {
  --paper: #f4f1e9;
  --paper-deep: #eae6dc;
  --ink: #171717;
  --muted: #77746c;
  --hairline: rgba(23, 23, 23, 0.16);
  --blue: #1769ff;
  --blue-soft: #e3eaff;
  --white: #fffdf8;
  --max-width: 1180px;
  --display: clamp(3.4rem, 8.6vw, 8rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  transition: background-color 240ms ease, color 240ms ease;
}

body.dark {
  --paper: #171717;
  --paper-deep: #222222;
  --ink: #f4f1e9;
  --muted: #a5a29a;
  --hairline: rgba(244, 241, 233, 0.2);
  --blue: #75a0ff;
  --blue-soft: #202c48;
  --white: #211f1c;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-shell { width: min(var(--max-width), calc(100% - 64px)); margin: 0 auto; }

.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
}

.wordmark, .topnav, .theme-toggle, .eyebrow, .section-index, .meta-label, .project-tag, .footer {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.02em; text-transform: none; }
.wordmark-mark { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--ink); border-radius: 50%; font-family: Georgia, serif; font-size: 0.9rem; font-style: italic; }
.topnav { display: flex; gap: 32px; margin-left: auto; margin-right: 34px; }
.topnav a, .back-to-top { color: var(--muted); transition: color 180ms ease; }
.quiet-link { color: var(--muted); opacity: 0.48; transition: color 180ms ease, opacity 180ms ease; }
.quiet-link:hover, .quiet-link:focus-visible { color: var(--blue); opacity: 1; }
.topnav a:hover, .topnav a:focus-visible, .back-to-top:hover, .back-to-top:focus-visible { color: var(--ink); }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0 8px 12px; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.theme-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); transition: transform 180ms ease; }
.theme-toggle:hover .theme-dot { transform: scale(1.25); }

.hero { min-height: 650px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); align-items: center; gap: 7vw; padding: 92px 0 110px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 28px; color: var(--muted); }
.eyebrow-pulse, .status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--blue); }
.eyebrow-pulse { box-shadow: 0 0 0 5px var(--blue-soft); }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 810px; margin-bottom: 32px; font-size: var(--display); font-weight: 500; line-height: 0.98; letter-spacing: -0.075em; }
h1 em, h2 em { font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -0.06em; }
.hero-intro { max-width: 490px; margin-bottom: 36px; color: var(--muted); font-size: 1.08rem; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; gap: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 999px; font-size: 0.82rem; transition: transform 180ms ease, background-color 180ms ease, color 180ms ease; }
.button-primary { color: #fff; background: var(--ink); }
.button-primary:hover, .button-primary:focus-visible { background: var(--blue); transform: translateY(-2px); }
.button span, .text-link span, .contact-link span { margin-left: 9px; font-size: 1.1em; }
.text-link { color: var(--muted); font-size: 0.86rem; transition: color 180ms ease; }
.text-link:hover, .text-link:focus-visible { color: var(--blue); }

.orbit-scene { position: relative; width: min(100%, 470px); aspect-ratio: 1 / 1; justify-self: end; overflow: hidden; background: var(--paper-deep); }
.orbit-scene::before { content: ""; position: absolute; inset: 17%; border: 1px solid var(--hairline); border-radius: 50%; }
.orbit { position: absolute; top: 50%; left: 50%; border: 1px solid var(--hairline); border-radius: 50%; transform: translate(-50%, -50%) rotate(-22deg); }
.orbit-one { width: 66%; height: 31%; }
.orbit-two { width: 86%; height: 42%; transform: translate(-50%, -50%) rotate(42deg); }
.orbit-three { width: 45%; height: 88%; transform: translate(-50%, -50%) rotate(22deg); }
.orbit-core { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: Georgia, serif; font-size: 1.35rem; font-style: italic; transform: translate(-50%, -50%); }
.orbit-node { position: absolute; width: 13px; height: 13px; border-radius: 50%; }
.orbit-node-blue { top: 25%; left: 24%; background: var(--blue); box-shadow: 0 0 0 8px var(--blue-soft); }
.orbit-node-ink { right: 19%; bottom: 25%; background: var(--ink); }
.orbit-caption { position: absolute; z-index: 1; color: var(--muted); font-size: 0.62rem; letter-spacing: 0.14em; line-height: 1.6; }
.orbit-caption-top { top: 25px; left: 25px; }
.orbit-caption-bottom { right: 25px; bottom: 25px; text-align: right; }

.section-rule { border-top: 1px solid var(--hairline); }
.now-section, .work-section { display: grid; grid-template-columns: minmax(190px, 0.6fr) 1.4fr; gap: 8vw; padding: 76px 0 92px; }
.motion-section { display: grid; grid-template-columns: minmax(190px, 0.6fr) 1.4fr; gap: 8vw; padding: 76px 0 92px; }
.motion-frame { min-width: 0; overflow: hidden; border: 1px solid var(--hairline); background: var(--paper-deep); }
.motion-frame iframe { display: block; width: 100%; height: clamp(320px, 38vw, 530px); border: 0; }
.section-index { margin-bottom: 18px; color: var(--blue); }
h2 { margin-bottom: 0; font-size: clamp(2.1rem, 4vw, 4.4rem); font-weight: 500; line-height: 1.02; letter-spacing: -0.06em; }
.now-lead { max-width: 550px; margin: 0 0 50px; font-size: clamp(1.4rem, 2.6vw, 2.15rem); line-height: 1.22; letter-spacing: -0.045em; }
.now-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.meta-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.61rem; }
.meta-value { display: block; font-size: 0.85rem; }
.status-value { display: flex; align-items: center; gap: 8px; }

.work-heading { position: relative; }
.section-note { max-width: 210px; margin: 28px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.65; }
.project-list { border-top: 1px solid var(--hairline); }
.project-item { position: relative; display: grid; grid-template-columns: 48px 1fr auto; gap: 24px; align-items: center; min-height: 145px; padding: 20px 0; border-bottom: 1px solid var(--hairline); transition: padding 180ms ease, color 180ms ease; }
.project-item:hover, .project-item:focus-visible { padding-right: 12px; color: var(--blue); }
.project-item:hover .project-body p, .project-item:focus-visible .project-body p { color: var(--muted); }
.project-number { align-self: start; padding-top: 4px; color: var(--muted); font-family: Georgia, serif; font-size: 1.5rem; font-style: italic; }
.project-body h3 { margin-bottom: 5px; font-size: 1.45rem; font-weight: 500; letter-spacing: -0.045em; }
.project-body p { max-width: 420px; margin-bottom: 0; color: var(--muted); font-size: 0.9rem; }
.project-arrow { font-size: 1.7rem; font-weight: 300; }
.project-tag { position: absolute; right: 44px; top: 20px; color: var(--muted); font-size: 0.58rem; }

.contact-section { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; padding: 130px 0 150px; }
.contact-section h2 { max-width: 700px; }
.contact-link { padding-bottom: 10px; border-bottom: 1px solid var(--ink); font-size: 0.95rem; transition: color 180ms ease, border-color 180ms ease; }
.contact-link:hover, .contact-link:focus-visible { color: var(--blue); border-color: var(--blue); }
.footer { display: flex; justify-content: space-between; align-items: center; min-height: 80px; border-top: 1px solid var(--hairline); color: var(--muted); font-size: 0.61rem; }
.footer-note { color: var(--ink); }

.scroll-progress {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  pointer-events: none;
  background: transparent;
}
.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--blue);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
}

body.has-js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1);
}
body.has-js [data-reveal="right"] { transform: translate3d(38px, 0, 0); }
body.has-js [data-reveal].is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
body.has-js [data-reveal-delay="100"] { transition-delay: 100ms; }
body.has-js [data-reveal-delay="120"] { transition-delay: 120ms; }
body.has-js [data-reveal-delay="140"] { transition-delay: 140ms; }
body.has-js [data-reveal-delay="200"] { transition-delay: 200ms; }

.orbit-scene {
  will-change: transform;
  transform: translate3d(0, var(--orbit-y, 0px), 0) rotate(var(--orbit-rotate, 0deg)) scale(var(--orbit-scale, 1));
}
.orbit-scene .orbit-core { transition: background-color 240ms ease, color 240ms ease; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }

@media (max-width: 820px) {
  .site-shell { width: min(var(--max-width), calc(100% - 40px)); }
  .topbar { height: 78px; }
  .topnav { gap: 18px; margin-right: 16px; }
  .theme-label { display: none; }
  .theme-toggle { padding-left: 8px; }
  .hero { grid-template-columns: 1fr; gap: 48px; padding: 72px 0 86px; }
  .orbit-scene { width: min(100%, 520px); justify-self: stretch; }
  .now-section, .work-section, .motion-section { grid-template-columns: 1fr; gap: 40px; padding: 60px 0 72px; }
  .section-note { max-width: 320px; margin-top: 16px; }
  .contact-section { display: block; padding: 100px 0 112px; }
  .contact-link { display: inline-block; margin-top: 48px; }
}

@media (max-width: 520px) {
  .site-shell { width: min(var(--max-width), calc(100% - 32px)); }
  .topnav a:nth-child(2) { display: none; }
  .hero { padding-top: 58px; }
  .hero-intro { font-size: 1rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .orbit-scene { aspect-ratio: 0.92; }
  .now-meta { grid-template-columns: 1fr; gap: 20px; }
  .project-item { grid-template-columns: 32px 1fr auto; gap: 12px; min-height: 128px; }
  .project-body h3 { font-size: 1.22rem; }
  .project-body p { font-size: 0.82rem; }
  .project-tag { top: auto; right: 0; bottom: 20px; }
  .footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 6px; padding: 24px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  body.has-js [data-reveal], body.has-js [data-reveal="right"] { opacity: 1; transform: none; }
  .orbit-scene { transform: none; }
  .scroll-progress span { transform: none; }
}
