/* ═══════════════════════════════════════════════════════════
   ABOUT — both sides of the same person, side by side
   ═══════════════════════════════════════════════════════════ */
@font-face { font-family: 'Anton'; src: url('../fonts/anton-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; src: url('../fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url('../fonts/inter-tight-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --bg: #0b0a0a; --bg2: #141212; --ink: #f3ede6; --mut: rgba(243, 237, 230, .58); --line: rgba(243, 237, 230, .12);
  --warm: #ff6a2a; --warm2: #ffb37a; --teal: #3cf2c1; --teal2: #a6ffe6;
  --display: 'Anton', 'Impact', sans-serif; --serif: 'Instrument Serif', serif; --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(18px, 3.4vw, 52px); --ease: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: var(--warm); color: #120a06; }
.grain { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.eyebrow { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--mut); }

/* nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 16px var(--pad); transition: background .4s, border-color .4s; border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(11, 10, 10, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.nav__home { display: flex; gap: 8px; align-items: baseline; font-family: var(--display); font-size: 24px; letter-spacing: .02em; }
.nav__home .a { color: var(--warm); } .nav__home .b { font-family: var(--mono); font-size: 16px; color: var(--teal); }
.nav__links { display: flex; gap: 8px; }
.nav__links a { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 15px 0 5px; border-radius: 99px; font-size: 13.5px; font-weight: 600; transition: transform .4s var(--ease); }
.nav__links a:hover { transform: translateY(-2px); }
.nav__links i { font-style: normal; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 12px; }
.to-art { background: var(--warm); color: #1a0b03; } .to-art i { background: #1a0b03; color: var(--warm); font-family: var(--display); font-size: 14px; }
.to-code { border: 1.5px solid var(--teal); color: var(--teal); font-family: var(--mono); font-weight: 500 !important; } .to-code i { background: var(--teal); color: #04110d; font-family: var(--mono); font-weight: 500; }

/* hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 110px var(--pad) 40px; overflow: hidden; }
.hero__split { position: absolute; inset: 0; z-index: 0; }
.hs-a, .hs-b { position: absolute; inset: 0; }
.hs-a { background: radial-gradient(60% 70% at 18% 40%, #4a1606, #1a0a05 60%, var(--bg) 90%); clip-path: polygon(0 0, 58% 0, 42% 100%, 0 100%); }
.hs-b { background: radial-gradient(60% 70% at 85% 60%, #0c2b2b, #06121a 60%, var(--bg) 90%); clip-path: polygon(58% 0, 100% 0, 100% 100%, 42% 100%); }
.hs-b::after { content: ''; position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(60,242,193,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(60,242,193,.07) 1px, transparent 1px); background-size: 44px 44px; }
#heroSparks { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: clamp(28px, 5vw, 80px); }
.photo { position: relative; width: clamp(220px, 27vw, 420px); aspect-ratio: 1; }
.photo__ring { position: absolute; inset: -11%; width: 122%; height: 122%; animation: spin 26s linear infinite; overflow: visible; }
.photo__ring text { font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .12em; fill: var(--ink); opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }
.photo__pic { position: absolute; inset: 0; border-radius: 50%; padding: 6px; background: conic-gradient(from 210deg, var(--warm), #fff 25%, var(--teal) 50%, #fff 75%, var(--warm));
  box-shadow: 0 0 0 10px rgba(11,10,10,.6), 0 0 90px rgba(255, 106, 42, .35), 0 0 120px rgba(60, 242, 193, .22); transition: transform .8s var(--ease); }
.photo:hover .photo__pic { transform: scale(1.03) rotate(-2deg); }
.photo__pic img, .photo__pic b { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.photo__pic b { background: radial-gradient(circle at 30% 25%, #2a2622, #0b0b0d 70%); font-family: var(--display); font-weight: 400; font-size: clamp(70px, 9vw, 150px); color: #fff; }
.hero__name { margin: 0; font-family: var(--display); font-weight: 400; line-height: .84; font-size: clamp(76px, 13vw, 230px); letter-spacing: -.005em; }
.hero__name span { display: block; overflow: hidden; }
.hero__name .a { color: var(--ink); }
.hero__name .b { color: transparent; -webkit-text-stroke: 2px var(--teal); }
.hero__name .ch { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease) forwards; }
@keyframes rise { to { transform: none; } }
.hero__title { margin: 22px 0 0; font-size: clamp(19px, 1.9vw, 30px); line-height: 1.25; max-width: 30ch; letter-spacing: -.01em; }
.hero__title em { font-family: var(--serif); font-weight: 400; color: var(--warm2); }
.hero__title .t { color: var(--teal2); }
.hero__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: 99px; font-weight: 600; font-size: 14.5px; border: 1.5px solid var(--line); transition: transform .4s var(--ease), background .25s, border-color .25s, color .25s; }
.btn:hover { transform: translateY(-2px); border-color: var(--ink); }
.btn--warm { background: var(--warm); color: #1a0b03; border-color: var(--warm); }
.btn--warm:hover { background: var(--warm2); border-color: var(--warm2); }
.btn i { font-style: normal; }
.facts { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: clamp(40px, 7vh, 80px) 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 18px 20px 0 0; }
.facts dt { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--mut); }
.facts dd { margin: 6px 0 0; font-size: 16.5px; font-weight: 500; }

/* summary */
.summary { padding: clamp(90px, 12vw, 170px) var(--pad); max-width: 1500px; }
.summary__text p { margin: 0 0 .9em; font-size: clamp(22px, 2.6vw, 42px); line-height: 1.25; letter-spacing: -.02em; }
.summary__text p:first-child::first-letter { font-family: var(--display); color: var(--warm); float: left; font-size: 3.3em; line-height: .78; margin: .06em .1em 0 0; }
.summary__text .hl-a { color: var(--warm2); } .summary__text .hl-b { color: var(--teal2); }
.summary__text p + p { font-size: clamp(18px, 1.7vw, 26px); color: var(--mut); max-width: 62ch; }

/* CV: title on the left, the PDF on the right — the frame is exactly one page */
.cvsec { display: grid; grid-template-columns: minmax(260px, .85fr) 1.15fr; gap: clamp(28px, 5vw, 90px); align-items: start; padding: 0 var(--pad) clamp(90px, 12vw, 170px); }
.cvsec__side { position: sticky; top: 100px; }
.cvsec__side h2 { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: .84; font-size: clamp(64px, 8.4vw, 150px); }
.cvsec__side h2 span { color: transparent; -webkit-text-stroke: 2px var(--warm); }
.cvsec__lede { margin: 24px 0 0; max-width: 34ch; color: var(--mut); font-size: 17px; }
.cvsec__count { display: flex; align-items: baseline; gap: 10px; margin: 34px 0 14px; font-family: var(--mono); }
.cvsec__count b { font-weight: 500; font-size: clamp(54px, 5vw, 84px); letter-spacing: -.06em; line-height: 1; color: var(--teal2); }
.cvsec__count span { color: var(--mut); font-size: 18px; } .cvsec__count i { font-style: normal; }
.cvsec__thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.cvsec__thumbs button { width: 48px; aspect-ratio: 210 / 297; border-radius: 5px; overflow: hidden; background: #fff; opacity: .45; border: 2px solid transparent; transition: .25s; padding: 0; }
.cvsec__thumbs button canvas { width: 100%; height: 100%; display: block; }
.cvsec__thumbs button.is-on { opacity: 1; border-color: var(--warm); transform: translateY(-3px); }
.cvsec__thumbs button:hover { opacity: .85; }
.cvsec__nav { display: flex; gap: 8px; margin-top: 18px; }
.cvsec__nav button { width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 18px; transition: .25s; }
.cvsec__nav button:hover { border-color: var(--teal); color: var(--teal); }
.cvsec__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.cvsec__view { position: relative; display: flex; justify-content: flex-end; align-items: center; gap: clamp(14px, 1.6vw, 26px); }
.cvsec__view .cvv { margin-left: 0; flex: none; }
/* scroll hint next to the page */
.cvhint { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 10px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--ink); transition: border-color .3s, transform .4s var(--ease), opacity .4s; }
.cvhint:hover { border-color: var(--warm); transform: translateY(2px); }
.cvhint__mouse { width: 22px; height: 34px; border-radius: 12px; border: 1.5px solid currentColor; position: relative; opacity: .8; }
.cvhint__mouse i { position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--warm); animation: wheel 1.6s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(11px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
.cvhint__txt { writing-mode: vertical-rl; font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--mut); }
.cvhint b { font-weight: 400; font-size: 18px; color: var(--warm); animation: nudge 1.6s var(--ease) infinite; transition: transform .4s var(--ease); }
@keyframes nudge { 50% { transform: translateY(5px); } }
.cvhint.is-end b { animation: none; transform: rotate(180deg); }
.cvhint.is-end .cvhint__mouse i { animation: none; opacity: .3; }
.cvv { position: relative; width: min(100%, calc(88vh * var(--arn, .7071))); aspect-ratio: var(--ar, 210 / 297); margin-left: auto; border-radius: 8px; background: #fff; overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; box-shadow: 0 50px 120px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08); outline: none; }
.cvv::-webkit-scrollbar { display: none; }
.cvv:focus-visible { box-shadow: 0 0 0 3px var(--teal), 0 50px 120px rgba(0,0,0,.55); }
.cvv__page { width: 100%; aspect-ratio: var(--ar, 210 / 297); scroll-snap-align: start; scroll-snap-stop: always; background: #fff; position: relative; }
.cvv__page + .cvv__page { border-top: 1px solid #e6e6e6; }
.cvv__page canvas { display: block; width: 100%; height: 100%; }
.cvv__load { color: #888; font-family: var(--mono); font-size: 13px; text-align: center; margin: 40% 0 0; }
.cvv__fallback { width: 100%; height: 100%; border: 0; display: block; }

/* two sides */
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 var(--pad); }
.side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: clamp(280px, 34vw, 460px); padding: clamp(24px, 3vw, 44px); border-radius: 28px; transition: transform .6s var(--ease); }
.side:hover { transform: translateY(-6px); }
.side--art { background: radial-gradient(80% 90% at 20% 20%, #ff8a3d, #c43a0b 55%, #3a1004); color: #1a0b03; }
.side--code { background: radial-gradient(80% 90% at 80% 20%, #12443f, #071a1f 60%, #040a0d); color: var(--teal2); border: 1px solid rgba(60,242,193,.3); }
.side--code::before { content: ''; position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(60,242,193,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(60,242,193,.08) 1px, transparent 1px); background-size: 40px 40px; }
.side > * { position: relative; }
.side__k { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em; opacity: .8; }
.side__t { font-family: var(--display); font-size: clamp(56px, 7.5vw, 130px); line-height: .85; }
.side--code .side__t { font-family: var(--mono); font-weight: 500; letter-spacing: -.07em; font-size: clamp(44px, 6vw, 104px); color: #e9fff8; }
.side__n { font-size: 15px; opacity: .85; }
.side__go { margin-top: 10px; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.side__go i { font-style: normal; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: currentColor; transition: transform .4s var(--ease); }
.side--art .side__go i { color: #1a0b03; } .side--art .side__go i::before { content: '→'; color: var(--warm); }
.side--code .side__go i::before { content: '→'; color: #04110d; } .side__go i { font-size: 0; } .side__go i::before { font-size: 16px; }
.side:hover .side__go i { transform: translateX(6px); }

/* blocks */
.block { padding: clamp(90px, 12vw, 170px) var(--pad) 0; }
.head { display: flex; align-items: baseline; gap: 22px; margin-bottom: clamp(26px, 4vw, 50px); border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(54px, 8vw, 140px); line-height: .85; text-transform: uppercase; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 48px); }
.col h3 { margin: 0 0 22px; display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.col h3 span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 12px; letter-spacing: 0; }
.col--code h3 span { background: var(--teal); color: #04110d; font-family: var(--mono); }
.col--art h3 span { background: var(--warm); color: #1a0b03; font-family: var(--display); font-size: 13px; }
.col--code { --acc: var(--teal); --acc2: var(--teal2); } .col--art { --acc: var(--warm); --acc2: var(--warm2); }

/* timeline */
.tl { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 1px solid var(--line); }
.tl li { position: relative; padding: 0 0 30px; }
.tl li::before { content: ''; position: absolute; left: -28px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--acc); }
.tl .when { font-family: var(--mono); font-size: 12px; color: var(--mut); }
.tl h4 { margin: 4px 0 0; font-size: clamp(19px, 1.6vw, 23px); letter-spacing: -.015em; }
.tl .org { color: var(--acc2); font-size: 14.5px; font-weight: 500; }
.tl p { margin: 8px 0 0; color: var(--mut); font-size: 15px; }

/* projects */
.plist { display: flex; flex-direction: column; gap: 10px; }
.proj { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 18px 20px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--line); transition: border-color .3s, transform .4s var(--ease); position: relative; overflow: hidden; }
.proj:hover { border-color: var(--acc); transform: translateX(4px); }
.proj.has-img { grid-template-columns: 92px 1fr auto; }
.proj img { grid-row: span 3; width: 92px; height: 92px; border-radius: 12px; object-fit: cover; }
.proj h4 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.proj .when { font-family: var(--mono); font-size: 11.5px; color: var(--mut); white-space: nowrap; align-self: start; padding-top: 3px; }
.proj .role { grid-column: 1 / -1; color: var(--acc2); font-size: 13.5px; font-weight: 500; }
.proj.has-img .role, .proj.has-img p { grid-column: 2 / -1; }
.proj p { grid-column: 1 / -1; margin: 2px 0 0; color: var(--mut); font-size: 14.5px; }
.more { display: inline-block; margin-top: 16px; font-weight: 600; color: var(--acc); }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* skills */
.skg { margin-bottom: 22px; }
.skg h4 { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--acc); }
.skg ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skg li { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); font-size: 14px; transition: .25s; }
.skg li:hover { border-color: var(--acc); color: var(--acc2); }

/* education */
.edu { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.edu div { padding: 26px; border-radius: 22px; background: var(--bg2); border: 1px solid var(--line); }
.edu .when { font-family: var(--mono); font-size: 12px; color: var(--mut); }
.edu h4 { margin: 10px 0 4px; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 2.6vw, 40px); line-height: .95; text-transform: uppercase; }
.edu .org { color: var(--warm2); }
.edu div:first-child { background: linear-gradient(140deg, #1d1410, #0f1f1d); border-color: rgba(255,255,255,.18); }

/* contact */
.contact { padding: clamp(110px, 14vw, 200px) var(--pad) 30px; margin-top: clamp(90px, 12vw, 170px); border-top: 1px solid var(--line); }
.contact__big { display: block; font-family: var(--display); line-height: .84; font-size: clamp(70px, 13vw, 240px); }
.contact__big span { display: block; } .contact__big .o { color: transparent; -webkit-text-stroke: 2px var(--warm); transition: color .5s; }
.contact__big:hover .o { color: var(--warm); }
.contact__row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: clamp(80px, 10vw, 140px); padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }
.foot__links { display: flex; gap: 18px; } .foot a:hover { color: var(--ink); }

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 12px; background: var(--warm); color: #1a0b03; font-weight: 600; font-size: 14px; transition: .35s var(--ease); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.hero .reveal { animation: fadeUp 1s var(--ease) .5s forwards; } @keyframes fadeUp { to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; justify-items: start; }
  .photo { width: min(62vw, 300px); margin: 10px 0 10px 8%; }
  .sides, .cols { grid-template-columns: 1fr; }
  .cols { gap: 56px; }
  .nav__links a { padding: 0 5px; } .nav__links a { font-size: 0; gap: 0; } .nav__links i { font-size: 12px; }
  .cvsec { grid-template-columns: 1fr; } .cvsec__side { position: static; } .cvsec__thumbs, .cvsec__count { display: none; }
  .cvsec__view { justify-content: center; } .cvhint { position: absolute; right: 10px; bottom: 10px; z-index: 2; padding: 10px 8px; gap: 6px; background: rgba(11,10,10,.82); color: #fff; border-color: rgba(255,255,255,.2); } .cvhint__txt { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; } }
