@font-face {
  font-family: Bricolage;
  src: url(assets/display.ttf) format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: Instrument;
  src: url(assets/italic.ttf) format("truetype");
  font-style: italic;
  font-display: swap;
}
:root {
  --ink: #081721;
  --paper: #eff8f3;
  --muted: #9db6bf;
  --mint: #b9eade;
  --warm: #efbb99;
  --line: #adcbd129;
  --mono: "Courier New", monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 16px/1.6 Bricolage, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--warm); outline-offset: 5px;
}
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
em { font-family: Instrument, Georgia, serif; font-weight: 400; }
.wrap { width: min(90%, 1440px); margin-inline: auto; }
.skip { position: fixed; left: 1rem; top: 1rem; z-index: 50; padding: 12px; background: var(--paper); color: var(--ink); transform: translateY(-200%); }
.skip:focus { transform: none; }
.reading-progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 40; pointer-events: none; background: linear-gradient(90deg, var(--mint), var(--warm)); transform: scaleX(0); transform-origin: left; box-shadow: 0 0 15px #b9eade80; }

header { position: absolute; inset: 0 5% auto; height: 92px; display: flex; align-items: center; justify-content: space-between; z-index: 10; }
.identity { display: inline-flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 700; letter-spacing: -.04em; }
.identity img { width: 30px; height: 30px; }
nav { display: flex; align-items: center; gap: 31px; font-size: 13px; font-weight: 600; }
nav > a:not(.git) { position: relative; padding-block: 10px; }
nav > a:not(.git)::after { content: ""; height: 1px; background: var(--mint); position: absolute; bottom: 5px; left: 0; right: 0; transform: scaleX(0); transform-origin: left; transition: transform .3s; }
nav > a:hover::after { transform: scaleX(1); }
.git { padding: 9px 19px; border: 1px solid #e3fffa40; border-radius: 30px; background: #d4f5f00b; backdrop-filter: blur(12px); }
.git span { margin-left: 8px; }

.hero { position: relative; height: min(100svh, 1100px); min-height: 780px; overflow: hidden; background: #1a2535; isolation: isolate; }
.landscape, .hero-shade { position: absolute; inset: 0; pointer-events: none; }
.landscape { transform: scale(calc(1 + var(--journey, 0) * .06)) translateY(calc(var(--journey, 0) * 30px)); transform-origin: 70% 55%; }
.landscape img, .landscape canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
#mountain-fallback { object-position: 69% center; }
.hero-shade { background: linear-gradient(90deg, #06141bba, transparent 82%), linear-gradient(0deg, var(--ink), transparent 28%, transparent 80%, #08172160); }
.intro { position: relative; padding-top: clamp(165px, 21vh, 270px); transform: translateY(calc(var(--journey, 0) * -65px)); }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 11px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.signal { display: inline-block; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 13px #b9eade70; }
.intro .eyebrow { color: #d2e6e6; }
h1 { font-size: clamp(110px, 11.5vw, 192px); line-height: .81; font-weight: 700; letter-spacing: -.04em; margin: 28px 0 33px; }
.surname { display: inline-block; color: #d5efec; margin-top: 10px; }
.period { color: var(--warm); }
.lead { font-size: clamp(16px, 1.4vw, 21px); color: #d1e0e4; letter-spacing: -.025em; }
.hero-actions { display: flex; align-items: center; gap: 30px; margin-top: 29px; }
.pill { display: inline-flex; align-items: center; gap: 33px; min-height: 52px; padding: 13px 23px; border-radius: 30px 30px 24px 30px; color: #122f34; background: #daf3ebed; font-size: 13px; font-weight: 650; }
.pill b { font: 23px/1 Arial; transition: transform .5s cubic-bezier(.2,1.6,.3,1); }
.pill:hover b { transform: translate(3px,2px) rotate(-45deg); }
.hero-source { font-size: 13px; color: #d1e8e8; border-bottom: 1px solid #d1e8e853; }
.scroll-cue { position: absolute; bottom: 37px; left: calc(50% - 22px); display: grid; place-items: center; width: 44px; height: 56px; border: 1px solid #d1e8e850; border-radius: 50px; color: #c2e4df; backdrop-filter: blur(8px); }
.scroll-cue span { font: 25px/1 Arial; animation: cue 3s ease-in-out infinite; }
.hero-coordinate { position: absolute; bottom: 53px; left: 5%; font: 9px/1 var(--mono); color: #8baab3; letter-spacing: .14em; }

.aurora { position: absolute; inset: -8% -12% 29%; opacity: .36; background: radial-gradient(ellipse at 53% 10%,#71dccc3d,transparent 36%), conic-gradient(from 188deg at 67% -20%,transparent 9deg,#84d5dd32 17deg,transparent 22deg,#bb97db36 27deg,transparent 37deg); filter: blur(23px); mix-blend-mode: screen; transform-origin: 65% 0; animation: aurora 22s ease-in-out infinite alternate; }
.mountain-mist { position: absolute; inset: 57% -20% 2%; background: radial-gradient(ellipse at 35% 70%,#c3dfed22,transparent 55%),radial-gradient(ellipse at 79% 45%,#b3dce81c,transparent 40%); filter: blur(20px); animation: mist 27s ease-in-out infinite alternate; }
.meteor { position: absolute; left: 77%; top: 10%; width: 110px; height: 1px; background: linear-gradient(90deg,transparent,#e7e4ffcc); box-shadow: 0 0 7px #d7eeff66; opacity: 0; animation: meteor 19s linear infinite; transform: rotate(-32deg); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 42px; }
h2 { font-size: clamp(54px, 6vw, 94px); line-height: 1; letter-spacing: -.065em; font-weight: 600; }
h2 em { color: var(--mint); letter-spacing: -.035em; }
.section-heading .eyebrow { margin-bottom: 5px; }
.work { padding-top: 92px; }
.project { display: grid; grid-template-columns: 1.16fr 1fr; gap: 7%; align-items: center; padding: 38px 0 75px; border-top: 1px solid var(--line); }
.project-copy { padding: 12px 0; }
.project h3 { font-size: clamp(42px, 4.7vw, 75px); line-height: .99; letter-spacing: -.035em; font-weight: 600; margin: 20px 0; }
.project h3 > span { color: var(--warm); }
.project-copy > p:not(.eyebrow) { font-size: 18px; line-height: 1.5; color: #c0d0d7; max-width: 34ch; }
.project-proof { display: flex; align-items: center; gap: 9px; font: 11px/1.6 var(--mono); color: var(--muted); margin-top: 25px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 15px 28px; margin-top: 27px; }
.textlink { color: var(--mint); border-bottom: 1px solid #b9eade70; position: relative; padding-bottom: 3px; font-size: 14px; font-weight: 600; transition: color .3s, text-shadow .3s; }
.secondary { font-size: 14px; color: var(--paper); font-weight: 600; }
.secondary:hover { color: var(--mint); }
details { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; color: #a8bdc8; }
summary { padding: 5px 0; cursor: pointer; width: fit-content; }
details p { margin: 10px 0; max-width: 48ch; }
details .textlink { font-size: 13px; }

.visual { position: relative; overflow: hidden; border-radius: 8px; transition: transform .55s cubic-bezier(.2,.8,.3,1),box-shadow .5s; box-shadow: 0 0 0 1px #b2d1db1c,0 16px 35px #020b121a; }
.visual::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0; border-radius: inherit; background: radial-gradient(ellipse at var(--glint-x,50%) var(--glint-y,30%),#e4fff52b,transparent 55%); box-shadow: inset 0 0 0 1px #c2f1e545; transition: opacity .45s; }
.visual:hover::after { opacity: 1; }
.visual:hover { box-shadow: 0 0 0 1px #b2d1db4a,0 22px 50px #020b124d; }
.bookcase { display: grid; place-items: center; min-height: 400px; aspect-ratio: 1.24; background: radial-gradient(at 75% 12%,#b1d9db,transparent 65%),linear-gradient(120deg,#133f50,#427d8d 70%,#235265); perspective: 1000px; }
.bookgrid { position: absolute; inset: 0; background: repeating-linear-gradient(90deg,transparent 0 47px,#e0fcff14 48px),repeating-linear-gradient(0deg,transparent 0 47px,#e0fcff14 48px); mask-image: linear-gradient(20deg,#000,transparent); }
.book { width: 39%; aspect-ratio: .73; position: relative; display: flex; flex-direction: column; padding: 5% 3.3% 3%; color: #173b48; background: #e5cfaa; overflow: hidden; transform: rotate(-12deg) rotateY(-17deg) rotateX(9deg); box-shadow: 2px 2px #f7e6d4,4px 4px #b898a8,6px 6px #ebcbbf,9px 9px #173143,20px 27px 23px #102c3866; transition: transform .7s cubic-bezier(.2,.8,.3,1); }
.bookcase:hover .book { transform: rotate(-5deg) rotateY(-5deg) rotateX(2deg) translateY(-8px); }
.book-top,.book-foot { position: relative; z-index: 1; font: 9px/1.5 var(--mono); display: flex; justify-content: space-between; }
.book-top { border-bottom: 1px solid; padding-bottom: 6px; }
.book-title { font-size: clamp(37px,3.5vw,58px); font-weight: 750; line-height: .85; letter-spacing: -.06em; margin: 12% 0; }
.book-title em { font-size: 1.22em; }
.book-lines { flex: 1; background: repeating-radial-gradient(ellipse at 0% 115%,transparent 0 5%,#295161 5.5% 7%,transparent 7.3% 10%); }
.book-foot { border-top: 1px solid; padding-top: 5%; margin-top: 8%; font-size: 8px; }
.visual-link { position: absolute; bottom: 20px; right: 20px; display: inline-flex; align-items: center; gap: 14px; padding: 9px 14px; border-radius: 30px; background: #0a28338a; border: 1px solid #c4e9eb4d; backdrop-filter: blur(10px); font: 11px/1.5 var(--mono); z-index: 2; }
.scene-view { aspect-ratio: 1.24; background: #0b151f; }
.scene-view > img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.scene-original { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.scene-divider { position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--split); width: 1px; background: #e8fafc80; pointer-events: none; }
.scene-divider span { position: absolute; top: 50%; left: 0; transform: translate(-50%,-50%); display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; border: 1px solid #edffff8c; background: #b9eade2b; backdrop-filter: blur(14px); font-size: 22px; }
#scene-slider { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 3; touch-action: pan-y; }
.scene-view:has(#scene-slider:focus-visible) { outline: 3px solid var(--warm); outline-offset: 5px; }
.scene-top,.scene-caption { position: absolute; left: 17px; right: 17px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 9px/1.5 var(--mono); letter-spacing: .07em; pointer-events: none; }
.scene-top { top: 17px; }
.scene-caption { bottom: 17px; }
.scene-top > span,.frame-label { padding: 4px 7px; background: #07121ccc; border-radius: 3px; }
.segment { display: flex; padding: 3px; gap: 4px; border-radius: 24px; background: #0817218f; backdrop-filter: blur(14px); pointer-events: auto; }
.segment button { border: 1px solid #b7d4de60; border-radius: 18px; background: #0f2436aa; min-height: 34px; padding: 5px 12px; font: 11px/1.5 var(--mono); position: relative; overflow: hidden; }
.segment button[aria-pressed=true] { background: var(--mint); color: var(--ink); border-color: var(--mint); }

.motion-study { padding: 20px 0 85px; }
.motion-stage { background: radial-gradient(ellipse at 50% 75%,#1f4b5c,transparent 65%),#0c1e29; padding: 5% 14%; border: 1px solid var(--line); }
.motion-stage video { display: block; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 14px 50px #0005; position: relative; z-index: 2; }
.motion-caption { display: block; font: 9px/1.5 var(--mono); color: var(--muted); margin-top: 18px; text-align: center; letter-spacing: .12em; }
footer { border-top: 1px solid var(--line); padding-top: 35px; }
.footer-link { display: flex; align-items: center; justify-content: space-between; gap: 30px; font-size: clamp(43px,7vw,108px); letter-spacing: -.065em; line-height: 1.2; padding: 25px 0 45px; }
.footer-link em { color: var(--mint); }
.footer-link b { font-weight: 400; transition: transform .5s cubic-bezier(.2,1.6,.3,1); }
.footer-link:hover b { transform: translate(8px,-8px); color: var(--mint); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 25px 0; font: 10px/1.5 var(--mono); color: var(--muted); }

.pill,.git { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #e8fffa75; box-shadow: inset 0 1px 1px #fff6, inset 0 -3px 8px #5e968c1a, 0 6px 22px #04131b35; transition: transform .5s cubic-bezier(.2,1.6,.3,1),border-radius .6s,box-shadow .4s,color .3s,background .3s; }
.pill::before,.git::before { content: ""; position: absolute; inset: -100%; z-index: -1; background: radial-gradient(ellipse at var(--lx,50%) var(--ly,50%),#fff9,transparent 30%),conic-gradient(from 70deg,#a0f8dd00,#9adcc9a3,#d1d6ff94,#effcf0b3,#a0f8dd00); filter: blur(13px); opacity: 0; transition: opacity .4s,transform .7s; }
.pill:hover { background: #dbf5ed; border-radius: 22px 30px 30px 23px; box-shadow: inset 0 1px 2px #ffff,0 0 32px #b6e4e82b,0 7px 22px #06171c4a; }
.pill:hover::before,.git:hover::before { opacity: 1; transform: rotate(14deg); }
.git:hover { color: #effffb; border-color: #cbfff5a3; border-radius: 18px 24px; }
.pill::after,.git::after,.segment button::after { content: ""; position: absolute; left: var(--lx,50%); top: var(--ly,50%); width: 12px; height: 12px; transform: translate(-50%,-50%) scale(0); border: 1px solid currentColor; border-radius: 50%; opacity: 0; pointer-events: none; }
.pill.ripple::after,.git.ripple::after,.segment button.ripple::after { animation: liquid-ripple .65s ease-out; }
.textlink:hover { color: #dcfff4; text-shadow: 0 0 17px #b6e4e86b; }
.textlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg,transparent,#b6e4e8,transparent); transform: scaleX(0); transition: transform .5s; box-shadow: 0 0 10px #b6e4e8; }
.textlink:hover::after { transform: scaleX(1); }
@keyframes cue { 0%,100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }
@keyframes aurora { from { transform: rotate(-4deg) scaleX(.9); opacity: .3; } to { transform: rotate(5deg) scaleX(1.1); opacity: .5; } }
@keyframes mist { from { transform: translateX(-3%); } to { transform: translateX(5%); } }
@keyframes meteor { 0%,76%,82%,100% { opacity: 0; transform: translate(0,0) rotate(-32deg); } 77% { opacity: .65; } 80% { opacity: 0; transform: translate(-230px,145px) rotate(-32deg); } }
@keyframes liquid-ripple { from { opacity: .45; transform: translate(-50%,-50%) scale(0); } to { opacity: 0; transform: translate(-50%,-50%) scale(24); } }

@media (max-width: 1000px) {
  .project { gap: 5%; }
  .bookcase { min-height: 330px; }
  .project h3 { font-size: 49px; }
}
@media (max-width: 700px) {
  header { height: 73px; }
  nav { gap: 17px; font-size: 12px; }
  .identity { font-size: 16px; gap: 8px; }
  .identity img { width: 25px; height: 25px; }
  .git { padding: 7px 13px; }
  .hero { min-height: 740px; }
  .intro { padding-top: 195px; }
  h1 { font-size: 21vw; line-height: .84; margin-bottom: 28px; }
  .hero .eyebrow { font-size: 9px; letter-spacing: .05em; }
  .lead { max-width: 27ch; font-size: 16px; }
  .hero-actions { gap: 20px; margin-top: 26px; }
  .pill { padding: 13px 18px; gap: 23px; min-height: 48px; font-size: 12px; }
  .hero-source { font-size: 11px; }
  .hero-shade { background: linear-gradient(90deg,#06141bb8,transparent 120%),linear-gradient(0deg,var(--ink),transparent 26%,transparent 80%,#08172160); }
  .hero-coordinate { font-size: 8px; bottom: 36px; }
  .scroll-cue { left: auto; right: 5%; bottom: 25px; height: 45px; width: 36px; }
  .meteor { display: none; }
  .section-heading { align-items: start; flex-direction: column; gap: 15px; margin-bottom: 25px; }
  .section-heading .eyebrow { font-size: 10px; }
  h2 { font-size: 58px; }
  .work { padding-top: 49px; }
  .project { grid-template-columns: 1fr; gap: 24px; padding: 24px 0 42px; }
  .visual { border-radius: 6px; }
  .bookcase { min-height: 0; aspect-ratio: 1.25; }
  .book-title { font-size: 9vw; }
  .book-top,.book-foot { font-size: 7px; }
  .project-copy { padding: 0; }
  .project-copy > .eyebrow { font-size: 10px; }
  .project h3 { font-size: 49px; margin: 14px 0 17px; }
  .project-copy > p:not(.eyebrow) { font-size: 17px; max-width: 34ch; }
  .project-proof { font-size: 10px; margin-top: 19px; }
  .actions { margin-top: 21px; }
  details { margin-top: 21px; }
  .scene-caption { left: 10px; right: 10px; bottom: 12px; }
  .scene-top { left: 12px; right: 12px; top: 12px; }
  .frame-label { font-size: 8px; }
  .segment button { min-height: 34px; font-size: 10px; padding: 5px 10px; }
  .motion-study { padding-top: 0; padding-bottom: 45px; }
  .motion-stage { padding: 22px 12px; }
  .footer-link { font-size: 12vw; padding: 10px 0 30px; gap: 10px; }
  .footer-bottom { font-size: 9px; flex-wrap: wrap; gap: 15px; padding: 20px 0; }
}
@media (max-width: 370px) {
  header .identity span { font-size: 14px; }
  nav { gap: 12px; }
  .git { padding: 7px 10px; }
  .hero-actions { gap: 14px; }
  .pill { gap: 18px; }
  .project h3 { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation: none !important; transition: none !important; }
  .landscape,.intro,.visual,.pill,.git,.pill:hover b { transform: none !important; }
  .meteor { display: none; }
  .bookcase:hover .book { transform: rotate(-12deg) rotateY(-17deg) rotateX(9deg); }
}
