:root {
  color-scheme: light;
  --paper: #f5f3ee;
  --surface: #fbfaf7;
  --ink: #20211f;
  --muted: #6e706b;
  --line: #d9d7d0;
  --accent: #a64c35;
  --accent-dark: #803822;
  --serif: 'Newsreader', Georgia, serif;
  --mono: 'DM Mono', monospace;
  --sans: 'DM Sans', sans-serif;
  --ease-out: cubic-bezier(.22, .75, .24, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.topbar, .footer { min-height: 4.5rem; padding: 0 clamp(1.25rem, 6.1vw, 6.5rem); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; color: var(--ink); font: 600 1.05rem var(--sans); letter-spacing: -.06em; text-decoration: none; }
.wordmark-dot { width: .58rem; height: .58rem; border-radius: 50%; background: var(--accent); }
.top-index, .back-top { color: var(--muted); font: .625rem var(--mono); letter-spacing: .09em; text-decoration: none; text-transform: uppercase; }
.back-top:hover { color: var(--accent-dark); }

.hero { position: relative; display: flex; min-height: 35rem; flex-direction: column; justify-content: center; padding: 5.5rem clamp(1.5rem, 13vw, 13rem) 4rem; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero::after { position: absolute; right: 7%; bottom: 15%; width: min(23vw, 18rem); height: 1px; background: var(--line); content: ''; }
.hero-title { max-width: 58rem; margin: 0 0 2.25rem; font: 500 clamp(3.5rem, 8.2vw, 7.5rem)/.98 var(--sans); letter-spacing: -.085em; }
.hero-serif { color: var(--accent-dark); font: italic 400 1em/.9 var(--serif); letter-spacing: -.055em; }
.hero-bottom { display: flex; max-width: 48rem; align-items: end; justify-content: space-between; gap: 2rem; }
.hero-bottom p { max-width: 26rem; margin: 0; color: #545650; font-size: .9rem; line-height: 1.7; }

.work-section { padding: 6.25rem clamp(1.5rem, 9.7vw, 10rem) 2rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.section-heading h2 { margin: 0; font: 500 clamp(2.35rem, 4.5vw, 4rem)/1 var(--sans); letter-spacing: -.07em; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: clamp(.9rem, 1.5vw, 1.45rem); }
.project-card { display: flex; min-width: 0; flex-direction: column; color: inherit; text-decoration: none; }
.project-art { position: relative; display: grid; min-height: 17rem; aspect-ratio: 1.08; place-items: center; overflow: hidden; isolation: isolate; transition: transform 450ms var(--ease-out), box-shadow 450ms var(--ease-out); }
.project-card:hover .project-art { transform: translateY(-.25rem); box-shadow: 0 1rem 2.5rem rgb(31 32 29 / 10%); }
.art-play { background: #d9d5ca; color: var(--ink); }
.art-click { background: #c9d2ca; color: var(--ink); }
.art-subnet { background: #deded7; color: var(--ink); }
.art-index, .art-domain { position: absolute; z-index: 3; top: 1rem; color: #484a45; font: .55rem var(--mono); letter-spacing: .1em; }
.art-index { left: 1rem; }
.art-domain { right: 1rem; }
.art-play::before, .art-click::before, .art-subnet::before { position: absolute; z-index: -1; width: 74%; aspect-ratio: 1; border: 1px solid rgb(39 41 37 / 13%); border-radius: 50%; content: ''; transition: transform 650ms var(--ease-out); }
.art-play::after, .art-click::after, .art-subnet::after { position: absolute; z-index: -1; width: 58%; aspect-ratio: 1; border: 1px solid rgb(39 41 37 / 10%); border-radius: 50%; content: ''; transition: transform 800ms var(--ease-out); }
.project-card:hover .project-art::before { transform: scale(1.06); }
.project-card:hover .project-art::after { transform: scale(.94); }
.device-stage { display: flex; width: 100%; flex-direction: column; align-items: center; justify-content: center; padding-top: 1.5rem; }
.controller { position: relative; width: min(66%, 17rem); height: clamp(5.8rem, 8.4vw, 7.5rem); border: 1px solid #3c3c39; border-radius: 2.25rem 2.25rem 2.8rem 2.8rem; background: linear-gradient(155deg, #383a38, #222421 75%); box-shadow: 0 .8rem 1.3rem rgb(30 32 29 / 22%), inset 0 .12rem .12rem rgb(255 255 255 / 16%); transform: rotate(-8deg); transition: transform 500ms var(--ease-out); }
.project-card:hover .controller-primary { transform: rotate(-4deg) translateY(-.35rem); }
.project-card:hover .controller-secondary { transform: rotate(-4deg) translateY(-.35rem); }
.controller-secondary { transform: rotate(7deg); }
.dpad { position: absolute; left: 16%; top: 34%; width: 2.45rem; height: 2.45rem; }
.dpad::before, .dpad::after { position: absolute; top: 50%; left: 50%; border-radius: .15rem; background: #b9b9b0; content: ''; transform: translate(-50%, -50%); }
.dpad::before { width: 100%; height: 34%; }
.dpad::after { width: 34%; height: 100%; }
.controller-stick { position: absolute; top: 62%; width: 1rem; aspect-ratio: 1; border: .2rem solid #535650; border-radius: 50%; background: #191a18; box-shadow: inset 0 0 0 1px #99998f; }
.stick-left { left: 36%; }
.stick-right { right: 31%; top: 28%; }
.face-buttons { position: absolute; top: 28%; right: 14%; display: grid; grid-template-columns: repeat(2, .48rem); gap: .3rem; transform: rotate(35deg); }
.face-buttons i { width: .48rem; aspect-ratio: 1; border: 1px solid #d1b099; border-radius: 50%; background: var(--accent); }
.face-buttons i:nth-child(2), .face-buttons i:nth-child(3) { background: #adaf9e; border-color: #c9cabf; }
.face-buttons i:nth-child(4) { background: #89947e; border-color: #a5ae9d; }
.controller-center { position: absolute; top: 54%; left: 50%; width: 1.4rem; height: .35rem; border-radius: 2rem; background: #565952; transform: translateX(-50%); }
.stage-rule { width: 44%; height: 1px; margin-top: 1.65rem; background: rgb(37 39 35 / 32%); }
.stage-note { margin-top: .65rem; color: #4c4e49; font: .52rem var(--mono); letter-spacing: .14em; }

.workspace-preview { display: flex; width: 75%; min-height: 12rem; overflow: hidden; border: 1px solid #d3d3cb; background: #f5f4ef; box-shadow: 0 .75rem 1.5rem rgb(39 40 36 / 10%); transform: rotate(-2deg); transition: transform 500ms var(--ease-out); }
.project-card:hover .workspace-preview { transform: rotate(0) translateY(-.25rem); }
.workspace-rail { display: flex; width: 2rem; flex: 0 0 2rem; flex-direction: column; align-items: center; gap: .95rem; padding-top: 1.2rem; border-right: 1px solid #e1e0da; background: #ecece6; }
.workspace-rail i { width: .42rem; height: .42rem; border: 1px solid #8c9185; border-radius: .12rem; }
.workspace-rail i:first-child { border-color: #8a674d; background: #8a674d; }
.workspace-main { min-width: 0; flex: 1; padding: 1rem 1rem .85rem; }
.workspace-head { display: flex; align-items: center; justify-content: space-between; color: #666a62; font: .42rem var(--mono); letter-spacing: .1em; }
.workspace-head i { width: .42rem; height: .42rem; border-radius: 50%; background: #839078; }
.workspace-title { display: flex; align-items: baseline; justify-content: space-between; margin: .85rem 0 .5rem; font: 500 1.15rem var(--sans); letter-spacing: -.05em; }
.workspace-title span { color: #777a72; font: .46rem var(--mono); letter-spacing: 0; }
.task-row { display: flex; min-height: 1.6rem; align-items: center; gap: .4rem; border-top: 1px solid #e6e5df; color: #3f423d; font-size: .46rem; }
.task-row > i { width: .44rem; height: .44rem; flex: 0 0 .44rem; border: 1px solid #8d9584; border-radius: 50%; }
.task-row b { margin-left: auto; color: #7a7c75; font: .4rem var(--mono); }
.task-done { color: #85877f; }
.task-done > i { border-color: #87947e; background: #87947e; box-shadow: inset 0 0 0 2px #f5f4ef; }
.workspace-progress { height: .2rem; margin-top: .35rem; background: #e4e3dc; }
.workspace-progress i { display: block; width: 68%; height: 100%; background: #89947e; }

.card-info { display: flex; min-height: 7.5rem; flex: 1; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem .15rem .8rem; border-bottom: 1px solid var(--line); transition: border-color 200ms ease; }
.project-card:hover .card-info { border-color: var(--accent); }
.project-category { display: block; margin-bottom: .4rem; color: var(--muted); font: .53rem var(--mono); letter-spacing: .08em; }
.project-category > span { color: var(--accent); padding: 0 .12rem; }
.card-info h3 { margin: .6rem 0 .35rem; font: 500 1.5rem/1 var(--sans); letter-spacing: -.06em; }
.card-info p { margin: 0 0 .2rem; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.card-arrow { display: grid; width: 1.9rem; flex: 0 0 1.9rem; aspect-ratio: 1; place-items: center; margin-top: .2rem; border: 1px solid #c7c5be; border-radius: 50%; color: var(--ink); font-size: .8rem; transition: background 180ms ease, color 180ms ease, transform 220ms var(--ease-out); }
.project-card:hover .card-arrow { transform: rotate(45deg); border-color: var(--ink); background: var(--ink); color: var(--surface); }
.project-card:focus-visible, .topbar a:focus-visible, .footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.work-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 3.5rem; border-top: 1px solid var(--line); padding: 1rem 0; color: var(--muted); font: .53rem var(--mono); letter-spacing: .1em; }
.footer { min-height: 5rem; border-top: 1px solid var(--line); border-bottom: 0; }
.footer > span { font-size: .52rem; }
.back-top { color: var(--ink); transition: color 180ms ease; }
.js .reveal { opacity: 0; transform: translateY(.8rem); transition: opacity 650ms ease, transform 700ms var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
.project-card:nth-child(2) { transition-delay: 80ms; }
.project-card:nth-child(3) { transition-delay: 160ms; }

@media (max-width: 900px) {
  .hero { min-height: 31rem; padding-inline: 8vw; }
  .work-section { padding-inline: 6vw; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1.1rem; }
  .project-art { min-height: 15rem; aspect-ratio: 1.15; }
  .controller { width: min(68%, 17rem); height: 6.5rem; }
  .workspace-preview { width: 74%; }
}
@media (max-width: 600px) {
  .topbar, .footer { min-height: 3.9rem; padding-inline: 1.2rem; }
  .top-index { display: none; }
  .hero { min-height: 29rem; padding: 5rem 1.5rem 3rem; }
  .hero::after { right: 1.5rem; bottom: 1.5rem; width: 4rem; }
  .hero-title { margin: 1.5rem 0 2rem; font-size: clamp(3.25rem, 15vw, 5.1rem); }
  .hero-bottom { align-items: start; flex-direction: column; gap: 1.5rem; }
  .hero-bottom p { max-width: 19rem; font-size: .82rem; }
  .work-section { padding: 4.25rem 1.2rem 1.5rem; }
  .section-heading { align-items: start; flex-direction: column; gap: .8rem; }
  .section-heading h2 { font-size: 2.65rem; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .project-art { min-height: 17rem; aspect-ratio: 1.13; }
  .controller { width: min(66%, 18rem); height: 7rem; }
  .workspace-preview { width: 76%; min-height: 12.5rem; }
  .card-info { min-height: 7rem; }
  .work-foot { margin-top: 2.7rem; font-size: .48rem; }
  .back-top { font-size: .52rem; }
}
@media (max-width: 360px) {
  .topbar, .footer { padding-inline: .9rem; }
  .hero { padding-inline: 1.1rem; }
  .work-section { padding-inline: .9rem; }
  .project-art { min-height: 15rem; }
  .controller { width: 70%; height: 6rem; }
}
@media (hover: none) {
  .project-card:hover .project-art, .project-card:hover .controller-primary, .project-card:hover .controller-secondary, .project-card:hover .workspace-preview { transform: none; }
  .project-card:hover .project-art { box-shadow: none; }
  .project-card:hover .project-art::before, .project-card:hover .project-art::after { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
