:root {
  --bg: #232222;
  --hero-bg: #3a3939;
  --panel: #2b2a2a;
  --ink: #f1efeb;
  --ink-2: #d4d0ca;
  --ink-3: #aaa59f;
  --ink-4: #96918b;
  --line: #383737;
  --navy: #1d2034;
  --navy-2: #444c78;
  --navy-3: #aeb6db;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(20px, 4.4vw, 72px);
  --display: "Syne", "Helvetica Neue", Arial, sans-serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--navy-3); }
h1, h2, h3, p, ul, ol, dl, dd, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--navy-2); color: var(--ink); }
:focus-visible { outline: 2px solid var(--navy-3); outline-offset: 4px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 120; padding: 10px 14px; background: var(--ink); color: #000; font-size: 14px; transform: translateY(-160%); transition: transform .3s var(--ease); }
.skip:focus { transform: none; color: #000; }

.meta { font-size: .875rem; line-height: 1.5; color: var(--ink-3); }
.link { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; font-size: .95rem; font-weight: 400; color: var(--ink); transition: color .3s ease; }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1px; background: var(--navy-2); transform-origin: left; transition: transform .5s var(--ease), background-color .3s ease; }
.link:hover { color: var(--navy-3); }
.link:hover::after { background: var(--navy-3); }
.link .arrow { display: inline-block; transition: transform .45s var(--ease); }
.link:hover .arrow { transform: translate(2px, -2px); }
.link:hover .arrow--down { transform: translateY(3px); }

.grain { position: fixed; top: -60%; left: -60%; width: 220%; height: 220%; z-index: 90; pointer-events: none; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); animation: grain 1.1s steps(3) infinite; }
@keyframes grain { 0% { transform: translate3d(0,0,0); } 33% { transform: translate3d(-3%,2%,0); } 66% { transform: translate3d(2%,-3%,0); } 100% { transform: translate3d(0,0,0); } }
@media (hover: none) { .grain { animation: none; } }

.cursor { position: fixed; left: 0; top: 0; z-index: 110; width: 12px; height: 12px; margin: -6px 0 0 -6px; display: none; align-items: center; justify-content: center; border: 1px solid rgba(241,239,235,.8); border-radius: 999px; pointer-events: none; opacity: 0; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .35s ease, border-color .35s ease, opacity .3s ease; }
.cursor span { font: 400 11px/1 var(--sans); letter-spacing: .02em; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity .2s ease; }
.has-cursor .cursor { display: flex; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor summary { cursor: none; }
.cursor.is-on { opacity: 1; }
.cursor.is-hover { width: 40px; height: 40px; margin: -20px 0 0 -20px; background: rgba(241,239,235,.06); border-color: rgba(241,239,235,.45); }
.cursor.is-label { height: 28px; margin-top: -14px; background: var(--navy); border-color: var(--navy-2); }
.cursor.is-label span { opacity: 1; }

/* header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 80; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(14px, 2vw, 24px) var(--pad); transition: background-color .4s ease, padding .4s var(--ease); }
.site-header.is-scrolled { background: rgba(35,34,34,.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding-top: 12px; padding-bottom: 12px; }
.brand { padding: 6px 0; font: 700 1rem/1 var(--display); letter-spacing: -.01em; color: var(--ink); }
.nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }
.nav-links { display: flex; gap: clamp(18px, 2.4vw, 34px); }
.nav-links a { position: relative; display: block; padding: 6px 0; font-size: .95rem; font-weight: 400; color: var(--ink-2); transition: color .3s ease; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--navy-3); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.nav-links a:hover, .nav-links a.is-current { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.is-current::after { transform: scaleX(1); }
.nav-ext { display: flex; gap: 18px; }
.menu-btn { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px; background: transparent; border: 0; color: var(--ink); font: 400 .95rem/1 var(--sans); }
.menu-btn .bar { display: block; width: 20px; height: 1px; background: currentColor; transition: transform .4s var(--ease), width .4s var(--ease); }
.menu-btn[aria-expanded="true"] .bar { width: 12px; transform: rotate(45deg); }
.menu { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; justify-content: center; gap: 40px; padding: 90px var(--pad) 40px; background: rgba(29,28,28,.98); clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .6s cubic-bezier(.76,0,.24,1), visibility 0s linear .6s; }
.menu.is-open { clip-path: inset(0); visibility: visible; transition: clip-path .6s cubic-bezier(.76,0,.24,1), visibility 0s; }
.menu ol { display: flex; flex-direction: column; gap: 6px; }
.menu ol a { display: block; padding: 4px 0; font: 700 clamp(2.4rem, 11vw, 4.2rem)/1.05 var(--display); letter-spacing: -.03em; opacity: 0; transform: translateY(16px); transition: opacity .4s ease, transform .5s var(--ease), color .3s ease; }
.menu.is-open ol a { opacity: 1; transform: none; transition-delay: calc(.12s + var(--i, 0) * .045s); }
.menu-ext { display: flex; flex-wrap: wrap; gap: 8px 28px; }
@media (max-width: 899px) { .nav { display: none; } .menu-btn { display: inline-flex; } }
@media (min-width: 900px) { .menu { display: none; } }

section { position: relative; }
.section-title { font: 700 clamp(2.4rem, 6vw, 5.4rem)/.94 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.js .reveal.is-in, .js-failed .reveal { opacity: 1; transform: none; }

/* hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; background: var(--hero-bg); display: flex; flex-direction: column; padding: clamp(84px, 20vh, 220px) 0 clamp(28px, 6vh, 64px); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; z-index: 1; pointer-events: none; background: linear-gradient(to top, var(--bg), rgba(35,34,34,0)); }
.hero-photo { position: absolute; right: 0; bottom: 0; z-index: 0; width: min(74vw, 118vh); width: min(74vw, 118svh); height: 100%; will-change: transform; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 26%), linear-gradient(to top, transparent 0%, #000 24%); -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent 0%, #000 26%), linear-gradient(to top, transparent 0%, #000 24%); mask-composite: intersect; animation: photoIn 1s cubic-bezier(.4,0,.2,1) both; }
@keyframes photoIn { from { opacity: 0; } to { opacity: 1; } }
.hero-title { position: relative; order: 2; margin-top: auto; padding: 24px var(--pad) 0; z-index: 2; display: flex; flex-direction: column; gap: clamp(10px, 2vh, 20px); }
.hero-role { font: 400 clamp(1rem, 1.15vw, 1.15rem)/1.4 var(--sans); color: var(--ink-2); animation: fadeIn .6s ease .55s both; }
.hero-name { display: flex; flex-direction: column; font: 800 clamp(3.2rem, min(11.5vw, 22vh), 12rem)/.84 var(--display); letter-spacing: -.045em; text-transform: uppercase; color: var(--ink); }
.hero-name .line { display: flex; overflow: hidden; padding: 0 .03em .02em; will-change: transform; }
.char { display: inline-block; animation: rise .85s var(--ease) both; animation-delay: calc(120ms + var(--i) * 32ms); }
@keyframes rise { from { transform: translateY(112%); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.hero-copy { position: relative; order: 1; margin-left: var(--pad); z-index: 2; max-width: min(30vw, 400px); display: flex; flex-direction: column; gap: 18px; animation: fadeIn .7s ease .7s both; }
.hero-line { font: 400 clamp(1.35rem, 2vw, 1.9rem)/1.28 var(--sans); letter-spacing: -.01em; color: var(--ink); text-wrap: pretty; }
.hero-copy .meta { color: var(--ink-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 6px 26px; }
@media (max-height: 640px) and (min-width: 700px) and (min-aspect-ratio: 4/5) {
  .hero-name { font-size: clamp(3rem, min(11.5vw, 18vh), 12rem); }
  .hero-copy { gap: 12px; }
}
@media (max-width: 699px), (max-aspect-ratio: 4/5) {
  .hero { display: flex; flex-direction: column; min-height: 0; padding-top: 0; padding-bottom: clamp(48px, 10vw, 80px); background: linear-gradient(var(--hero-bg) 0%, var(--hero-bg) 50%, var(--bg) 100%); }
  .hero::after { display: none; }
  .hero-photo { position: relative; width: 100%; height: min(66svh, 112vw); }
  .hero-photo img { object-position: 50% 16%; -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 30%); mask-image: linear-gradient(to top, transparent 0%, #000 30%); }
  .hero-title { order: 0; margin-top: calc(-1 * min(17vw, 7.5rem)); padding: 0 var(--pad); }
  .hero-name { font-size: min(17vw, 9rem); }
  .hero-copy { order: 1; margin-left: 0; max-width: 34rem; padding: clamp(26px, 6vw, 40px) var(--pad) 0; }
}

/* about */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 110px); padding: clamp(100px, 18vh, 200px) var(--pad) clamp(80px, 14vh, 160px); }
.about-body { display: flex; flex-direction: column; gap: 18px; max-width: 38rem; }
.about-body p { font-size: clamp(1.1rem, 1.35vw, 1.3rem); line-height: 1.55; font-weight: 300; color: var(--ink-2); text-wrap: pretty; }
.about-body p:first-child { color: var(--ink); }
.about-body .about-lead { font: 400 clamp(1.5rem, 2.4vw, 2.2rem)/1.25 var(--sans); letter-spacing: -.01em; text-wrap: balance; }
.now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.now .dot { display: inline-block; width: 6px; height: 6px; margin-right: 2px; border-radius: 50%; background: var(--navy-3); transform: translateY(-2px); animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.now strong { font-weight: 400; color: var(--ink); }
.skills { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, .8fr); gap: 32px clamp(24px, 3vw, 48px); margin-top: clamp(40px, 8vh, 90px); padding-top: clamp(28px, 4vh, 40px); border-top: 1px solid var(--line); }
.skills h3 { margin-bottom: 12px; font: 700 1.2rem/1.1 var(--display); letter-spacing: -.015em; }
.skills li { padding: 3px 0; color: var(--ink-2); }
.skills .lang span { color: var(--ink-4); }
@media (max-width: 899px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) { .skills { grid-template-columns: minmax(0, 1fr); gap: 26px; } }

/* work */
.work { padding: clamp(60px, 10vh, 120px) var(--pad) clamp(60px, 10vh, 120px); }
.work-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 40px; margin-bottom: clamp(36px, 7vh, 80px); }
.project { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(28px, 5vw, 90px); padding: clamp(40px, 8vh, 90px) 0; border-top: 1px solid var(--line); }
.project--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.project--flip .visual { order: 2; }
.project-text { display: flex; flex-direction: column; gap: 16px; max-width: 34rem; }
.project-title { font: 700 clamp(1.7rem, 3.2vw, 2.9rem)/1 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.question { padding-left: 16px; border-left: 2px solid var(--navy-2); font-size: clamp(1.02rem, 1.15vw, 1.15rem); line-height: 1.5; font-weight: 400; color: var(--ink); text-wrap: pretty; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 22px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.facts dt { font-size: .875rem; color: var(--ink-4); padding-top: .12em; }
.facts dd { color: var(--ink-2); text-wrap: pretty; }
.visual { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: radial-gradient(90% 80% at var(--mx, 30%) var(--my, 25%), #333232 0%, var(--panel) 60%); }
.visual-inner { position: absolute; inset: 0; }
.js .fx-wipe .visual { clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--ease); }
.js .fx-slide .visual { clip-path: inset(0 100% 0 0); transition: clip-path .9s var(--ease); }
.js .fx-zoom .visual { clip-path: inset(12% 18%); transition: clip-path .9s var(--ease); }
.js .fx-zoom .visual-inner { transform: scale(1.08); transition: transform 1.1s var(--ease); }
.js .project.is-in .visual, .js-failed .project .visual { clip-path: inset(0); }
.js .fx-zoom.is-in .visual-inner { transform: none; }
.v-grade { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; }
.v-grade .num { display: flex; align-items: flex-end; font: 800 clamp(6rem, 16vw, 14rem)/.8 var(--display); letter-spacing: -.06em; color: var(--ink); }
.v-grade .num small { margin: 0 0 .1em .12em; font: 400 clamp(1rem, 1.4vw, 1.3rem)/1 var(--sans); letter-spacing: 0; color: var(--ink-3); }
.v-timeline { display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(24px, 5vw, 64px); }
.v-timeline ol { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 30px; }
.v-timeline ol::before { content: ""; position: absolute; left: 6px; right: 0; top: 6px; height: 1px; background: linear-gradient(90deg, var(--ink-4), var(--navy-3)); }
.v-timeline li { position: relative; display: flex; flex-direction: column; gap: 6px; }
.v-timeline li::before { content: ""; position: absolute; left: 0; top: -30px; width: 13px; height: 13px; border-radius: 50%; background: var(--panel); border: 1px solid var(--ink-3); }
.v-timeline li:last-child::before { background: var(--navy-3); border-color: var(--navy-3); }
.v-timeline strong { font: 700 clamp(1.1rem, 2vw, 1.8rem)/1.05 var(--display); letter-spacing: -.02em; color: var(--ink); }
.v-stack { display: flex; flex-direction: column; justify-content: center; gap: .1em; padding: 0 clamp(20px, 4vw, 56px); }
.v-stack span { font: 700 clamp(1.7rem, 4vw, 3.6rem)/1.02 var(--display); letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 1px #5c5a57; transition: color .4s ease, -webkit-text-stroke-color .4s ease, transform .6s var(--ease); }
.v-stack span:first-child, .v-stack span:hover { color: var(--ink); -webkit-text-stroke-color: var(--ink); }
.v-stack:hover span:first-child:not(:hover) { color: transparent; -webkit-text-stroke-color: #5c5a57; }
.v-stack span:hover { transform: translateX(8px); }
@media (hover: none) { .v-stack span { color: var(--ink-3); -webkit-text-stroke: 0; } .v-stack span:first-child { color: var(--ink); } }
.v-diagram .node { position: absolute; padding: 4px 0; font-size: clamp(.8rem, .95vw, .95rem); color: var(--ink-2); }
.v-diagram .n1 { left: 7%; top: 12%; } .v-diagram .n2 { right: 7%; top: 12%; } .v-diagram .n3 { left: 7%; bottom: 12%; } .v-diagram .n4 { right: 7%; bottom: 12%; }
.v-diagram .lines { position: absolute; inset: 22% 16%; background: linear-gradient(to top right, transparent calc(50% - .5px), #4a4948 50%, transparent calc(50% + .5px)), linear-gradient(to bottom right, transparent calc(50% - .5px), #4a4948 50%, transparent calc(50% + .5px)); }
.v-diagram .core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--panel); font: 700 clamp(1rem, 1.6vw, 1.4rem)/1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.v-diagram .core::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--navy-3); box-shadow: 0 0 0 6px rgba(174,182,219,.12); }
@media (max-width: 899px) {
  .project, .project--flip { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .project--flip .visual { order: 0; }
}

/* experience */
.experience { padding: clamp(80px, 14vh, 160px) var(--pad) clamp(60px, 10vh, 120px); }
.xp-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 110px); margin-top: clamp(36px, 7vh, 80px); }
.xp-grid h3 { margin-bottom: 8px; font: 700 1.2rem/1.1 var(--display); letter-spacing: -.015em; }
.rows li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rows .when { font-size: .875rem; color: var(--ink-4); padding-top: .15em; }
.rows .what { display: flex; flex-direction: column; gap: 2px; }
.rows .role { font-weight: 400; color: var(--ink); transition: color .3s ease; }
.rows li:hover .role { color: var(--navy-3); }
.rows .org { color: var(--ink-3); }
@media (max-width: 899px) { .xp-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 479px) { .rows li { grid-template-columns: minmax(0, 1fr); } }

/* contact */
.contact { position: relative; overflow: hidden; min-height: 92vh; min-height: 92svh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: clamp(26px, 5vh, 48px); padding: clamp(90px, 14vh, 140px) var(--pad); text-align: center; }
.contact-glow { position: absolute; left: 0; top: 0; width: min(70vw, 900px); aspect-ratio: 1; margin: calc(min(70vw, 900px) / -2) 0 0 calc(min(70vw, 900px) / -2); pointer-events: none; opacity: 0; transition: opacity .8s ease; background: radial-gradient(circle, rgba(120,132,190,.10) 0%, rgba(35,34,34,0) 60%); will-change: transform; }
.contact.is-lit .contact-glow { opacity: 1; }
.spot-wrap { position: relative; }
.talk { font: 800 clamp(3.6rem, 16vw, 14rem)/.86 var(--display); letter-spacing: -.05em; color: #5f5c59; }
.talk--lit { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(168deg, #ffffff 0%, #d8dbe4 30%, #8e94ad 55%, #f1efeb 78%, #b3b7c6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-mask-image: radial-gradient(220px circle at var(--sx, 50%) var(--sy, 50%), #000 0%, rgba(0,0,0,.35) 55%, transparent 78%); mask-image: radial-gradient(220px circle at var(--sx, 50%) var(--sy, 50%), #000 0%, rgba(0,0,0,.35) 55%, transparent 78%); transform: translate3d(var(--tx, 0), var(--ty, 0), 0); }
@media (hover: none) { .talk--lit { -webkit-mask-image: none; mask-image: none; opacity: .75; } }
.contact-sub { font-size: clamp(1.05rem, 1.3vw, 1.25rem); color: var(--ink-2); }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 30px; }
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 26px; border: 1px solid var(--navy-2); border-radius: 999px; font: 400 1rem/1 var(--sans); color: var(--ink); background: var(--navy); transition: background-color .4s ease, border-color .4s ease, color .4s ease; will-change: transform; }
.btn:hover, .btn:focus-visible { background: var(--ink); border-color: var(--ink); color: var(--navy); }
.btn .arrow { transition: transform .45s var(--ease); }
.btn:hover .arrow { transform: translate(2px, -2px); }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 20px var(--pad) clamp(22px, 3vw, 34px); border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .grain { display: none; }
  .js .reveal, .js .fx-zoom .visual-inner { opacity: 1; transform: none; }
  .js .project .visual { clip-path: none; }
}
