:root {
  --paper: #f2efe7;
  --paper-deep: #e8e3d8;
  --ink: #18221c;
  --muted: #657068;
  --line: rgba(24, 34, 28, 0.18);
  --accent: #ff5c35;
  --green: #243d31;
  --card: #e9e5db;
  --mono: "DM Mono", monospace;
  --sans: "Manrope", sans-serif;
  --serif: "Newsreader", serif;
  --max-width: 1280px;
}

html[data-theme="dark"] {
  --paper: #151a17;
  --paper-deep: #202622;
  --ink: #f2efe7;
  --muted: #a8b0aa;
  --line: rgba(242, 239, 231, 0.18);
  --accent: #ff7654;
  --green: #c5d6ca;
  --card: #202622;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--paper);
}
.skip-link:focus { top: 12px; }

.site-header {
  position: absolute; inset: 0 0 auto; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: var(--max-width); margin: 0 auto; padding: 28px 32px;
  border-bottom: 1px solid var(--line);
}
.wordmark { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; }
.wordmark > span:first-child {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--ink); border-radius: 50%; font-family: var(--serif); font-size: 15px;
}
.desktop-nav { display: flex; gap: 30px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.desktop-nav a, .site-footer a { transition: color 0.2s ease; }
.desktop-nav a:hover, .site-footer a:hover { color: var(--accent); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 18px; }
.theme-toggle {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer;
}
.theme-icon { width: 12px; height: 12px; border: 1px solid currentColor; border-radius: 50%; box-shadow: inset 5px -2px 0 var(--ink); }
html[data-theme="dark"] .theme-icon { box-shadow: none; background: var(--ink); }
.header-contact { font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--ink); }

.hero {
  position: relative; min-height: 800px; height: 100svh; max-height: 980px; overflow: hidden;
  max-width: var(--max-width); margin: 0 auto; padding: 150px 32px 56px;
  display: flex; flex-direction: column; justify-content: center; border-bottom: 1px solid var(--line);
}
.hero-kicker, .eyebrow {
  margin: 0 0 30px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
}
.hero-kicker { display: flex; align-items: center; gap: 10px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.hero h1 {
  position: relative; z-index: 2; max-width: 1050px; margin: 0;
  font-family: var(--sans); font-size: clamp(58px, 8.7vw, 132px); font-weight: 500;
  letter-spacing: -0.07em; line-height: 0.9;
}
.hero h1 em { font-family: var(--serif); font-weight: 400; color: var(--accent); }
.hero-bottom { position: relative; z-index: 2; display: flex; align-items: end; gap: 80px; margin-top: 56px; }
.hero-bottom p { max-width: 470px; margin: 0; color: var(--muted); font-size: 17px; }
.text-link, .project-link { font-size: 12px; font-weight: 600; border-bottom: 1px solid currentColor; padding-bottom: 3px; }
.text-link span, .project-link span { margin-left: 8px; color: var(--accent); }
.hero-index { position: absolute; right: 32px; bottom: 56px; font-family: var(--mono); font-size: 10px; }
.hero-index span { color: var(--muted); margin: 0 6px; }
.hero-orbit { position: absolute; width: 480px; height: 480px; right: -40px; top: 48%; transform: translateY(-50%); opacity: 0.42; }
.orbit { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 50%; }
.orbit-one { transform: rotate(62deg) scaleY(0.36); }
.orbit-two { transform: rotate(-32deg) scaleY(0.58); }
.orbit-one::before, .orbit-two::before { content: ""; position: absolute; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; top: 50%; left: -5px; }
.orbit-core { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 24px; }

.section-shell { max-width: var(--max-width); margin: 0 auto; padding: 140px 32px; border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 32px; align-items: start; margin-bottom: 80px; }
.section-heading h2, .about h2 {
  margin: 0; font-family: var(--serif); font-size: clamp(46px, 6vw, 82px); font-weight: 400; letter-spacing: -0.045em; line-height: 0.98;
}
.section-heading > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.eyebrow { color: var(--muted); }

.project { min-height: 580px; display: grid; grid-template-columns: 70px 0.85fr 1.15fr; border-top: 1px solid var(--line); }
.project:last-child { border-bottom: 1px solid var(--line); }
.project-number { padding-top: 42px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.project-copy { align-self: center; max-width: 470px; padding: 80px 60px 80px 0; }
.project-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 30px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.project-meta span:not(:last-child)::after { content: "·"; margin-left: 16px; }
.project h3 { margin: 0 0 24px; font-family: var(--serif); font-size: clamp(48px, 5vw, 72px); font-weight: 400; line-height: 0.95; letter-spacing: -0.04em; }
.project-copy > p { max-width: 430px; margin: 0 0 30px; color: var(--muted); font-size: 14px; }
.project-art { position: relative; min-height: 500px; overflow: hidden; background: var(--green); color: #f2efe7; display: grid; place-items: center; }
.stopwatch-art { background: #253b31; }
.stopwatch-art::before { content: ""; position: absolute; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.app-window { position: relative; width: 68%; aspect-ratio: 1.5; border-radius: 12px; background: #f0eee7; color: #172019; box-shadow: 0 24px 70px rgba(0,0,0,.32); transform: rotate(-4deg); }
.window-bar { height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid #d4d1c9; }
.window-bar i { width: 7px; height: 7px; border: 1px solid #889088; border-radius: 50%; }
.timer-face { height: calc(100% - 34px); display: flex; flex-direction: column; justify-content: center; align-items: center; }
.timer-label { font-family: var(--mono); font-size: 7px; letter-spacing: .18em; color: #81877f; }
.timer-face strong { margin: 5px 0 22px; font-family: var(--mono); font-size: clamp(25px, 4vw, 52px); font-weight: 400; letter-spacing: -0.08em; }
.timer-face strong span { font-size: .45em; color: var(--accent); }
.timer-controls { display: flex; gap: 10px; }
.timer-controls i { display: block; width: 28px; height: 28px; border-radius: 50%; background: #253b31; }
.timer-controls i:last-child { background: transparent; border: 1px solid #a8ada8; }
.task-art { background: #d65b3a; }
.task-art::before, .task-art::after { content: ""; position: absolute; width: 240px; height: 240px; border: 1px solid rgba(255,255,255,.2); transform: rotate(45deg); }
.task-art::after { width: 360px; height: 360px; }
.phone { position: relative; width: 220px; height: 430px; padding: 58px 20px 20px; border: 6px solid #1b241e; border-radius: 32px; background: #f2efe7; color: #18221c; box-shadow: 20px 26px 50px rgba(71,22,9,.35); transform: rotate(6deg); }
.phone-speaker { position: absolute; top: 14px; left: 50%; width: 62px; height: 15px; transform: translateX(-50%); border-radius: 10px; background: #1b241e; }
.phone > p { margin: 0 0 28px; font-family: var(--serif); font-size: 36px; }
.task { display: flex; align-items: center; gap: 10px; margin: 0 -5px; padding: 12px 5px; border-bottom: 1px solid #d7d3ca; font-size: 10px; }
.task i { width: 13px; height: 13px; border: 1px solid #788078; border-radius: 50%; }
.task.done span { text-decoration: line-through; color: #969b96; }
.task.done i { background: #d65b3a; border-color: #d65b3a; }
.add-task { position: absolute; right: 20px; bottom: 20px; width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; background: #d65b3a; color: white; font-size: 22px; }
.data-art { background: #1f2a24; font-family: var(--mono); }
.data-art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 32px 32px; }
.data-source, .data-process, .data-output { position: absolute; z-index: 1; border: 1px solid rgba(255,255,255,.35); background: #29372f; }
.data-source { left: 12%; width: 74px; padding: 16px 0; text-align: center; font-size: 10px; }
.source-a { top: 30%; }.source-b { bottom: 30%; }
.data-process { left: 50%; transform: translateX(-50%); width: 120px; height: 120px; display: grid; place-content: center; border-radius: 50%; color: var(--accent); font-size: 24px; text-align: center; }
.data-process small { color: #fff; font-size: 7px; letter-spacing: .16em; }
.data-pipe { position: absolute; left: 20%; right: 20%; height: 1px; background: rgba(255,255,255,.35); }
.data-output { right: 10%; width: 110px; padding: 22px 16px 14px; }
.data-output i { display: block; height: 4px; margin-bottom: 8px; background: rgba(255,255,255,.3); }
.data-output i:nth-child(2) { width: 70%; }.data-output i:nth-child(3) { width: 85%; }
.data-output span { display: block; margin-top: 18px; color: #9fc5a9; font-size: 8px; }

.experiments { padding-top: 110px; }
.experiments .section-heading { grid-template-columns: 1fr 3fr; margin-bottom: 50px; }
.experiment-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.experiment-card { min-height: 440px; padding: 36px; background: var(--card); display: flex; flex-direction: column; justify-content: space-between; transition: transform .3s ease, background .3s ease; }
.experiment-card:hover { transform: translateY(-6px); }
.experiment-card > div:last-child p { margin: 0 0 8px; color: var(--muted); font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.experiment-card h3 { margin: 0; font-family: var(--serif); font-size: 46px; font-weight: 400; }
.experiment-card span { display: block; margin-top: 14px; font-size: 11px; }
.circle-pack { position: relative; align-self: center; width: 240px; height: 240px; border: 1px solid var(--ink); border-radius: 50%; }
.circle-pack i { position: absolute; display: block; border: 1px solid var(--ink); border-radius: 50%; }
.circle-pack i:nth-child(1) { width: 112px; height: 112px; left: 15px; top: 25px; background: var(--accent); }
.circle-pack i:nth-child(2) { width: 80px; height: 80px; right: 20px; top: 45px; }
.circle-pack i:nth-child(3) { width: 65px; height: 65px; left: 90px; bottom: 10px; }
.circle-pack i:nth-child(4) { width: 35px; height: 35px; left: 28px; bottom: 45px; }
.circle-pack i:nth-child(5) { width: 38px; height: 38px; right: 30px; bottom: 43px; background: var(--green); }
.circle-pack i:nth-child(6) { width: 22px; height: 22px; left: 128px; top: 98px; }
.circle-pack i:nth-child(7) { width: 16px; height: 16px; right: 13px; top: 119px; }
.party-card { background: var(--green); color: #f2efe7; }
.party-card p { color: #b9c2bc !important; }
.party-grid { align-self: center; width: 270px; height: 220px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; transform: perspective(500px) rotateX(8deg) rotateY(-12deg); }
.party-grid i { background: var(--accent); opacity: .9; }
.party-grid i:nth-child(2), .party-grid i:nth-child(6), .party-grid i:nth-child(7) { background: #f2c14e; }
.party-grid i:nth-child(3), .party-grid i:nth-child(5) { background: #759f8a; }
.party-grid i:nth-child(4) { opacity: .35; }

.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.portrait-wrap { position: relative; align-self: start; }
.portrait-wrap::before { content: ""; position: absolute; inset: 16px -16px -16px 16px; border: 1px solid var(--line); z-index: -1; }
.portrait-wrap img { width: 100%; max-height: 650px; object-fit: cover; object-position: center 35%; filter: grayscale(100%); }
.portrait-wrap p { position: absolute; left: 20px; bottom: 18px; margin: 0; padding: 10px 13px; background: var(--paper); font-family: var(--mono); font-size: 9px; line-height: 1.5; text-transform: uppercase; }
.about-copy { padding-top: 20px; }
.about-lede { margin: 45px 0 36px; font-size: 21px; line-height: 1.55; }
.about-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; color: var(--muted); font-size: 13px; }
.about-columns p { margin: 0; }
.capability-list { margin: 48px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.capability-list li { display: flex; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.capability-list span { font-family: var(--mono); font-size: 9px; color: var(--accent); }

.experience .section-heading { grid-template-columns: 1fr 3fr; }
.timeline { border-top: 1px solid var(--line); }
.timeline-row { display: grid; grid-template-columns: 1fr 1.3fr 1.7fr; gap: 32px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.timeline-date { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.timeline-row h3 { margin: 0 0 2px; font-family: var(--serif); font-size: 25px; font-weight: 400; }
.timeline-row p { margin: 0; color: var(--muted); font-size: 12px; }
.timeline-row > div p { color: var(--ink); }

.contact { min-height: 620px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--accent); color: #fff7ef; }
.contact .eyebrow { color: #fff7ef; }
.contact h2 { margin: 0; font-family: var(--serif); font-size: clamp(64px, 10vw, 130px); font-weight: 400; letter-spacing: -0.06em; line-height: .95; }
.contact > p:not(.eyebrow) { max-width: 490px; margin: 30px auto; }
.contact a { padding-bottom: 4px; border-bottom: 1px solid currentColor; font-size: 13px; }
.contact a span { margin-left: 8px; }

.site-footer { max-width: var(--max-width); margin: 0 auto; padding: 30px 32px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.site-footer p { margin: 0; }
.site-footer div { display: flex; gap: 24px; }
.site-footer > a { justify-self: end; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .desktop-nav { display: none; }
  .hero { min-height: 700px; }
  .hero-orbit { width: 330px; height: 330px; right: -100px; }
  .section-heading { grid-template-columns: 1fr 2fr; }
  .section-heading > p:last-child { display: none; }
  .project { grid-template-columns: 50px 1fr; }
  .project-copy { padding-right: 0; }
  .project-art { grid-column: 1 / -1; min-height: 480px; }
  .about { gap: 55px; }
}

@media (max-width: 680px) {
  .site-header { padding: 20px; }
  .wordmark-name, .header-contact { display: none; }
  .hero { height: auto; min-height: 100svh; padding: 130px 20px 36px; }
  .hero h1 { font-size: clamp(48px, 14vw, 64px); letter-spacing: -0.065em; }
  .hero-bottom { align-items: start; flex-direction: column; gap: 28px; margin-top: 42px; }
  .hero-index { right: 20px; bottom: 30px; }
  .hero-orbit { top: 38%; opacity: .25; }
  .section-shell { padding: 90px 20px; }
  .section-heading, .experiments .section-heading, .experience .section-heading { display: block; margin-bottom: 50px; }
  .section-heading .eyebrow { margin-bottom: 18px; }
  .project { display: block; min-height: 0; padding-top: 24px; }
  .project-number { padding: 0; }
  .project-copy { padding: 36px 0 50px; }
  .project h3 { font-size: 52px; }
  .project-art { min-height: 400px; }
  .app-window { width: 82%; }
  .experiment-grid { grid-template-columns: 1fr; }
  .experiment-card { min-height: 400px; padding: 26px; }
  .about { display: block; }
  .portrait-wrap { margin-bottom: 70px; }
  .about-columns { grid-template-columns: 1fr; }
  .timeline-row { grid-template-columns: 1fr; gap: 12px; }
  .timeline-row > p { max-width: 480px; }
  .contact { min-height: 520px; }
  .site-footer { grid-template-columns: 1fr auto; padding: 26px 20px; }
  .site-footer div { display: none; }
}

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