/* Midnight aurora palette */
:root {
  /* Black + gold, from the UI UX Pro Max "Luxury/Premium Brand" palette, dark variant, with the logo gold as accent */
  --bg: #0C0A09;
  --bg-2: #110F0D;
  --surface: #1C1917;
  --surface-2: #292524;
  --line: rgba(231, 229, 228, .09);
  --line-2: rgba(231, 229, 228, .16);
  --ink: #FAFAF9;
  --ink-2: #D6D3D1;
  --muted: #A8A29E;
  --gold: #D9B26F;
  --gold-2: #F1DCA8;
  --gold-3: #B5874A;
  --emerald: #4ADE80;
  --grad: linear-gradient(115deg, #F1DCA8 0%, #D9B26F 45%, #B5874A 100%);
  --radius: 20px;
  --sans: "DM Sans", system-ui, sans-serif;
  --display: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 clamp(15.5px, 1.05vw, 17.5px)/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(217, 178, 111, .45); }
.container { width: min(1180px, 100% - 2 * clamp(18px, 5vw, 80px)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .85em; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

/* Static aurora background: painted once, never animated, so it costs nothing per frame. */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 45vw at 85% -10%, rgba(217, 178, 111, .22), transparent 60%),
    radial-gradient(45vw 40vw at -10% 20%, rgba(217, 178, 111, .16), transparent 60%),
    radial-gradient(50vw 40vw at 60% 110%, rgba(181, 135, 74, .10), transparent 60%),
    var(--bg); }
.aurora::after { content: ""; position: absolute; inset: 0; opacity: .5;
  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: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%); }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }

/* Whole-page WebGL particle world (fixed, behind all content) */
#world { position: fixed; inset: 0; z-index: 0; width: 100vw; height: 100vh; height: 100lvh; pointer-events: none; opacity: 0; transition: opacity 1.5s var(--ease); }
#world.ready { opacity: 1; }
main, .footer, .topbar, .mobile-nav { position: relative; z-index: 1; }
.topbar { position: sticky; z-index: 50; }
.mobile-nav { z-index: 49; }

/* Buttons */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em; height: 2.95em; padding: 0 1.35em; border-radius: 999px; font-weight: 500; font-size: .95em; white-space: nowrap; transition: background .25s, box-shadow .25s, color .25s; will-change: transform; }
.btn-dark { color: #1C1917; background: var(--grad); box-shadow: 0 8px 28px -12px rgba(217, 178, 111, .7), inset 0 1px 0 rgba(255,255,255,.45); }
.btn-dark:hover { box-shadow: 0 12px 36px -12px rgba(217, 178, 111, .9), inset 0 1px 0 rgba(255,255,255,.55); }
.btn-ghost { color: var(--ink); background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-light { background: var(--ink); color: var(--bg); }
.btn-outline { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-outline:hover { background: rgba(255,255,255,.06); }
.btn-wa { background: #25d366; color: #062312; }
.btn-wa:hover { background: #3ee07a; }

/* Top bar */
.topbar { position: sticky; top: 12px; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1.5em; margin-top: 12px; padding: .55em .6em .55em 1.1em; border-radius: 999px; background: rgba(28, 25, 23, .72); box-shadow: inset 0 0 0 1px var(--line), 0 10px 40px -20px rgba(0,0,0,.8); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font-size: .93em; }
.brand { display: inline-flex; align-items: center; gap: .6em; font-weight: 600; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; display: block; }
.topnav { display: flex; gap: 1.8em; color: var(--ink-2); }
.topnav a { transition: color .2s; }
.topnav a:hover { color: var(--ink); }
.menu-toggle { display: none; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line-2); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-toggle span { width: 16px; height: 1.5px; background: var(--ink); }
.mobile-nav { display: none; }

/* Hero */
.hero { position: relative; }
.hero > *:not(.hero-video) { position: relative; z-index: 1; }
.hero-video { position: absolute; z-index: 0; top: -120px; bottom: -40px; left: 50%; width: 100vw; transform: translateX(-50%); overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 70%, transparent 100%); }
.hero-video video { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,10,9,.92) 0%, rgba(12,10,9,.55) 45%, rgba(12,10,9,.25) 100%); }
.hero { padding: clamp(1.25rem, 3vh, 2.5rem) 0 clamp(2rem, 5vh, 3.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .6em; padding: .45em .9em; border-radius: 999px; background: rgba(74, 222, 128, .08); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .25); font: 500 .74em var(--mono); letter-spacing: .02em; color: var(--emerald); text-transform: uppercase; }
.eyebrow.light { background: none; box-shadow: none; padding: 0; color: #E6C98F; }
.dot { width: .55em; height: .55em; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.hero-name { margin: 1.1em 0 0; font: 500 clamp(.95rem, 1.2vw, 1.1rem)/1.35 var(--sans); letter-spacing: 0; color: var(--gold); }
.hero-statement { margin: .3em 0 .5em; max-width: 15ch; font: 600 clamp(2.3rem, min(5vw, 8.6vh), 5rem)/1.02 var(--display); letter-spacing: -.035em; }
.hero-statement em, .grad-text { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.word { display: inline-block; }
.hero-statement em .word { background: var(--grad); background-size: var(--gw, 100%) 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { max-width: 54ch; color: var(--ink-2); font-size: clamp(.98rem, min(1.15vw, 2.1vh), 1.12rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7em; margin-top: 2em; }

/* 3D scene: contact card with an orbit of tool badges */
.scene { position: relative; perspective: 1100px; display: grid; place-items: center; min-height: 460px; }
.orbit { position: absolute; inset: 50% auto auto 50%; width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(68deg) rotateZ(0deg); animation: orbit 26s linear infinite; pointer-events: none; }
@keyframes orbit { to { transform: rotateX(68deg) rotateZ(360deg); } }
.orbit::before { content: ""; position: absolute; left: -265px; top: -265px; width: 530px; height: 530px; border-radius: 50%; border: 1px dashed rgba(241, 220, 168, .28); }
.badge { position: absolute; left: 0; top: 0; transform: rotateZ(var(--a)) translateX(265px) rotateZ(calc(var(--a) * -1)); transform-style: preserve-3d; }
.badge span { display: block; transform: rotateX(-68deg) translate(-50%, -50%); backface-visibility: hidden; padding: .42em .8em; border-radius: 999px; background: rgba(28, 25, 23, .92); box-shadow: inset 0 0 0 1px var(--line-2), 0 8px 24px -10px rgba(0,0,0,.8); font: 500 .72rem var(--mono); color: var(--ink); white-space: nowrap; animation: counter 26s linear infinite; }
@keyframes counter { from { transform: rotateZ(0deg) rotateX(-68deg) translate(-50%, -50%); } to { transform: rotateZ(-360deg) rotateX(-68deg) translate(-50%, -50%); } }
.badge span i { display: inline-block; width: .5em; height: .5em; margin-right: .45em; border-radius: 50%; background: var(--c, var(--gold)); vertical-align: .05em; }
.glow { position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,.35), transparent 65%); pointer-events: none; }

.hero-card { position: relative; z-index: 2; width: 100%; max-width: 360px; padding: 1.5em; border-radius: calc(var(--radius) + 4px); background: linear-gradient(160deg, rgba(41, 37, 36, .95), rgba(20, 18, 16, .96)); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(217, 178, 111, .08); transform-style: preserve-3d; will-change: transform; }
.hero-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(241, 220, 168, .7), transparent 40%, transparent 60%, rgba(181, 135, 74, .6)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.hc-top { display: flex; align-items: center; gap: .9em; transform: translateZ(30px); }
.hc-mark { width: 54px; height: 54px; border-radius: 14px; filter: drop-shadow(0 8px 18px rgba(217, 178, 111, .35)); }
.hc-name { font: 600 1.2rem/1.2 var(--display); letter-spacing: -.02em; }
.hc-role { color: var(--muted); font-size: .9em; }
.hc-facts { list-style: none; margin: 1.2em 0; padding: 0; transform: translateZ(18px); }
.hc-facts li { display: flex; justify-content: space-between; gap: 1em; padding: .62em 0; border-top: 1px solid var(--line); font-size: .9em; }
.hc-facts span { color: var(--muted); }
.hc-facts b { font-weight: 500; display: inline-flex; align-items: center; gap: .45em; }
.hc-dot { width: .5em; height: .5em; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 3px rgba(74, 222, 128, .18); }
.hc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; transform: translateZ(26px); }
.hc-socials { display: flex; justify-content: space-between; margin-top: 1.1em; padding-top: 1.1em; border-top: 1px solid var(--line); transform: translateZ(14px); }
.hc-social, .social { display: grid; place-items: center; width: 2.5em; height: 2.5em; border-radius: 50%; color: var(--ink-2); background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); transition: color .25s, background .25s, transform .25s; }
.hc-social:hover, .social:hover { color: #fff; background: rgba(217, 178, 111, .25); transform: translateY(-2px); }
.hc-social svg, .social svg { width: 1.05em; height: 1.05em; }

/* WebGL hero stage */
.hero-3d { position: relative; width: 100%; height: clamp(340px, min(42vw, 64vh), 560px); }
.hero-3d canvas { position: absolute; inset: -8% -12% -8% -8%; width: 120%; height: 116%; display: block; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-3d.ready canvas { opacity: 1; }
.hero-3d-fallback { position: absolute; left: 50%; top: 50%; width: 55%; height: auto; transform: translate(-50%, -50%); filter: drop-shadow(0 30px 60px rgba(217, 178, 111, .3)); transition: opacity .8s; }
.hero-3d.ready .hero-3d-fallback { opacity: 0; }
.hero-3d-hint { position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); font: 500 .68rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; opacity: 0; transition: opacity 1s .8s; }
.hero-3d.ready .hero-3d-hint { opacity: .8; }
.hero-socials { display: flex; gap: .5em; margin-top: 1.4em; }
.hero-socials .hc-social { width: 2.6em; height: 2.6em; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: clamp(2.5rem, 5vw, 4rem) 0 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: var(--line); box-shadow: inset 0 0 0 1px var(--line); }
.stats div { padding: 1.4em 1.6em; background: rgba(28, 25, 23, .85); }
.stats dt { font: 600 2.3rem/1 var(--display); letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stats dd { margin: .5em 0 0; color: var(--muted); font-size: .85em; }

/* Tool marquee */
.marquee { position: relative; overflow: hidden; padding: 1.4em 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: .7em; width: max-content; animation: slide 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee-track span { padding: .55em 1.05em; border-radius: 999px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font: 500 .8rem var(--mono); white-space: nowrap; }

/* Two-row 3D marquee */
.marquee-3d { perspective: 900px; margin-top: 1rem; }
.marquee-3d .marquee { transform: rotateX(18deg); transform-origin: 50% 0; padding: .7em 0; }
.marquee-3d .marquee-rev { transform: rotateX(18deg) translateZ(-40px); opacity: .7; }
.marquee-rev .marquee-track { animation-direction: reverse; animation-duration: 46s; }
.marquee-track span:hover { color: var(--gold); box-shadow: inset 0 0 0 1px rgba(217, 178, 111, .45); }

/* Scroll cinema: pinned full-screen section; scroll scrubs the 3D logo film. */
.cinema { position: relative; height: 320vh; margin: 2rem 0 0; }
.cinema-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; align-items: center; }
.cinema-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg); transform: translateX(13%) scale(.92); }
.cinema-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, var(--bg) 0%, rgba(12,10,9,0) 18%, rgba(12,10,9,0) 78%, var(--bg) 100%),
  linear-gradient(90deg, rgba(12,10,9,.85) 0%, rgba(12,10,9,.35) 45%, rgba(12,10,9,0) 70%); }
.cinema-lines { position: relative; z-index: 1; display: grid; }
.cinema-kicker { font: 500 .78rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.4rem; }
.cinema-line { grid-area: 2 / 1; max-width: 12ch; font-size: clamp(2.6rem, 7vw, 6.4rem); line-height: .98; letter-spacing: -.045em; opacity: 0; transform: translateY(40px); will-change: transform, opacity; }
.cinema-line em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cinema-progress { position: absolute; left: 50%; bottom: 6vh; width: min(240px, 50vw); height: 2px; transform: translateX(-50%); background: var(--line-2); border-radius: 2px; overflow: hidden; }
.cinema-progress i { position: absolute; inset: 0; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
.no-motion .cinema { height: auto; }
.no-motion .cinema-sticky { position: relative; height: 80vh; }
.no-motion .cinema-line[data-step="0"] { opacity: 1; transform: none; }

/* 3D letter flip for section headings */
.char { display: inline-block; transform-origin: 50% 100%; backface-visibility: hidden; }
.section-head h2 { perspective: 600px; }

/* Gold cursor ring (fine pointers only) */
.cursor { position: fixed; left: 0; top: 0; z-index: 80; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 1px solid rgba(217, 178, 111, .7); pointer-events: none; opacity: 0; transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease), background .25s, opacity .3s; will-change: transform; }
.cursor.on { opacity: 1; }
.cursor.hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(217, 178, 111, .12); border-color: rgba(241, 220, 168, .9); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* Sections */
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2em; margin-bottom: 2.2em; }
h2 { font: 600 clamp(1.9rem, 3.6vw, 3rem)/1.05 var(--display); letter-spacing: -.035em; }
.section-head p { max-width: 44ch; color: var(--ink-2); }

/* Cards with spotlight */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; perspective: 1200px; }
.card, .product, .repo, .skills { position: relative; overflow: hidden; border-radius: var(--radius); background: linear-gradient(180deg, rgba(28, 25, 23, .78), rgba(17, 15, 13, .82)); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); box-shadow: inset 0 0 0 1px var(--line); }
.card::after, .product::after, .repo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(217, 178, 111, .16), transparent 60%); }
.card:hover::after, .product:hover::after, .repo:hover::after { opacity: 1; }
.card { display: flex; flex-direction: column; gap: .8em; min-height: 300px; padding: 1.6em; text-align: left; transform-style: preserve-3d; will-change: transform; transition: box-shadow .35s; }
.card:hover { box-shadow: inset 0 0 0 1px rgba(241, 220, 168, .35), 0 30px 60px -30px rgba(217, 178, 111, .45); }
.card-wide { grid-column: span 2; }
.card-dark { background: radial-gradient(120% 140% at 100% 0%, rgba(217, 178, 111, .35), transparent 55%), linear-gradient(180deg, #24201c, #141210); }
.card-top { display: flex; gap: .5em; }
.chip { font: 500 .72em var(--mono); padding: .4em .8em; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip-live { background: rgba(74, 222, 128, .1); color: var(--emerald); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, .3); }
.card h3 { font: 600 clamp(1.3rem, 1.9vw, 1.75rem)/1.15 var(--display); letter-spacing: -.02em; margin-top: .4em; }
.card p, .card.card-dark p { color: var(--ink-2); font-size: .95em; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: .45em; margin-top: auto; padding-top: 1em; font: 500 .72em var(--mono); color: var(--ink-2); }
.flow span { padding: .45em .75em; border-radius: 8px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); }
.flow i { width: 14px; height: 1px; background: linear-gradient(90deg, var(--gold), var(--gold)); }
.card-link { font-size: .85em; font-weight: 500; color: var(--gold); margin-top: .6em; }

.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1em; }
.product { padding: 1.8em; }
.num { font: 500 .78em var(--mono); color: var(--gold); }
.product h3 { font: 600 1.45rem/1.15 var(--display); letter-spacing: -.02em; margin: .6em 0 .5em; }
.product p { color: var(--ink-2); font-size: .95em; }
.tags { display: flex; flex-wrap: wrap; gap: .4em; margin: 1.1em 0 0; padding: 0; list-style: none; }
.tags li { font: 500 .72em var(--mono); padding: .4em .75em; border-radius: 999px; background: rgba(255,255,255,.04); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }

.repos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; }
.repo { display: flex; flex-direction: column; gap: .6em; padding: 1.5em; transition: box-shadow .35s; }
.repo:hover { box-shadow: inset 0 0 0 1px rgba(241, 220, 168, .35); }
.repo-top { display: flex; justify-content: space-between; gap: 1em; font: 500 .72em var(--mono); color: var(--muted); }
.repo h3 { font: 600 1.25rem/1.2 var(--display); letter-spacing: -.02em; word-break: break-word; }
.repo p { color: var(--ink-2); font-size: .93em; }
.repo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .9em; margin-top: auto; padding-top: .8em; font: 500 .75em var(--mono); color: var(--ink-2); }
.lang-dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .4em; vertical-align: -.05em; }
.repo-links { display: flex; gap: 1em; margin-left: auto; font-family: var(--sans); font-size: 1.1em; font-weight: 500; color: var(--gold); }
.repos-status { color: var(--muted); }
.repos-status a { color: var(--gold); }
.repos-more { margin-top: 1.4em; }

.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4vw; }
.about > div > p { margin: 1em 0 1.5em; color: var(--ink-2); max-width: 56ch; }
.method { margin: 0; padding: 0; list-style: none; counter-reset: m; }
.method li { position: relative; padding: 1em 0 1em 2.6em; border-top: 1px solid var(--line); color: var(--ink-2); counter-increment: m; }
.method li::before { content: counter(m, decimal-leading-zero); position: absolute; left: 0; top: 1.15em; font: 500 .78em var(--mono); color: var(--gold); }
.method b { color: var(--ink); font-weight: 600; }
.skills { align-self: start; padding: .4em 1.6em; }
.skill-row { display: flex; justify-content: space-between; gap: 1.5em; padding: 1em 0; border-bottom: 1px solid var(--line); font-size: .92em; }
.skill-row:last-child { border: 0; }
.skill-row span { color: var(--muted); }
.skill-row b { font-weight: 500; text-align: right; }

.contact-card { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 5rem); border-radius: calc(var(--radius) + 6px); text-align: center;
  background: radial-gradient(80% 120% at 50% 0%, rgba(217, 178, 111, .16), transparent 60%), rgba(18, 15, 13, .38);
  box-shadow: inset 0 0 0 1px var(--line-2); }
.contact-card h2 { margin: .5em auto .2em; max-width: 16ch; font-size: clamp(2.2rem, 5vw, 4rem); }
.contact-card .hero-actions { justify-content: center; }
.contact-meta { margin-top: 1.6em; color: var(--muted); font-size: .9em; }
.socials { display: flex; justify-content: center; gap: .6em; margin-top: 1.2em; }
.footer { display: flex; justify-content: space-between; gap: 1.5em; padding: 2em 0 2.5em; color: var(--muted); font-size: .85em; }
.footer-links { display: flex; gap: 1.4em; }
.footer-links a:hover { color: var(--ink); }

/* Standalone case study pages */
.case-page { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 5vw, 4rem); }
.case-back { margin-bottom: 1.6em; font-size: .92em; color: var(--ink-2); }
.case-back a:hover { color: var(--gold); }
.case-page h1 { margin: .55em 0 .45em; max-width: 20ch; font: 600 clamp(2.2rem, 5vw, 4.2rem)/1.04 var(--display); letter-spacing: -.035em; }
.case-page .case-summary { font-size: clamp(1rem, 1.25vw, 1.15rem); }
.case-details h2, .case-gallery h2 { font: 500 .78em var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .6em; }
.case-more { margin-top: clamp(3rem, 6vw, 5rem); }
.case-more h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); margin-bottom: .8em; }
.case-more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; }
.case-more-item { display: flex; flex-direction: column; gap: .4em; min-height: 44px; padding: 1.2em 1.3em; border-radius: var(--radius); background: rgba(28, 25, 23, .78); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .25s; }
.case-more-item:hover { box-shadow: inset 0 0 0 1px rgba(217, 178, 111, .5); }
.case-more-item b { font: 600 1.05rem/1.25 var(--display); letter-spacing: -.01em; }
.case-more-item span { color: var(--muted); font: 500 .72rem var(--mono); }
.case-cta { margin-top: clamp(3rem, 6vw, 5rem); }

/* Case study dialog */
.case-dialog { width: min(1100px, calc(100vw - 24px)); max-width: none; max-height: 92vh; margin: auto; padding: 0; border: 0; border-radius: var(--radius); background: var(--bg-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 100px rgba(0,0,0,.6); }
.case-dialog::backdrop { background: rgba(5, 4, 3, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.case-modal { max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; padding: clamp(20px, 4vw, 48px); }
.case-close { position: sticky; top: 0; float: right; z-index: 2; width: 2.6em; height: 2.6em; border-radius: 50%; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 1.1em; }
.case-modal h2 { margin: .4em 0 .5em; max-width: 20ch; }
.case-summary { color: var(--ink-2); max-width: 72ch; }
.case-export { display: inline-block; margin-top: 1em; font-size: .85em; color: var(--gold); }
.case-export[hidden] { display: none; }
.frame { margin: 1.8em 0 0; border-radius: 14px; overflow: hidden; background: #080706; box-shadow: inset 0 0 0 1px var(--line), 0 20px 50px -20px rgba(0,0,0,.8); }
.frame[hidden] { display: none; }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: .7em 1em; background: var(--surface-2); color: var(--muted); font: 500 .72em var(--mono); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #44403c; }
.frame-bar span { margin-left: .6em; }
.frame video, .frame img { display: block; width: 100%; height: auto; }
.frame video { aspect-ratio: 16 / 9; }
.case-details { display: grid; grid-template-columns: 1fr 1fr; gap: 3vw; padding: 2.2em 0 1em; }
.case-details h4, .case-gallery h4 { font: 500 .78em var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .6em; }
.case-details ol, .case-details ul { margin: 0; padding: 0; list-style: none; }
.case-details li { position: relative; padding: .7em 0 .7em 2.2em; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .95em; }
.case-details ol { counter-reset: f; }
.case-details ol li { counter-increment: f; }
.case-details ol li::before { content: counter(f, decimal-leading-zero); position: absolute; left: 0; top: .85em; font: 500 .78em var(--mono); color: var(--gold); }
.case-details ul li::before { content: "✓"; position: absolute; left: .2em; top: .7em; color: var(--emerald); }
.case-gallery { margin-top: 1.5em; }
.case-gallery[hidden] { display: none; }
.case-gallery-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; }
.case-gallery-heading span { font-size: .8em; color: var(--muted); }
.case-gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1em; }
.case-gallery-item { display: block; border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.case-gallery-item img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
.case-gallery-item span { display: block; padding: .7em .9em; font-size: .78em; color: var(--muted); }
html:has(.case-dialog[open]) { overflow: hidden; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 90; padding: .8em 1.2em; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: .85em; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .case-more-grid { grid-template-columns: 1fr 1fr; }
  .hero-3d { height: 420px; order: -1; }
  .hero-3d canvas { inset: -6% -10%; width: 120%; height: 112%; }
  .hero-grid { grid-template-columns: 1fr; }
  .scene { min-height: 400px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card-wide { grid-column: span 2; }
  .about { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .repos { grid-template-columns: 1fr 1fr; }
}
@media (hover: none) and (pointer: coarse), (max-width: 760px) {
  .card, .product, .repo, .skills { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(180deg, rgba(28, 25, 23, .92), rgba(17, 15, 13, .94)); }
  .hero-video { display: none; }
  .cinema-video.is-vertical { transform: none; object-position: 50% 30%; }
}
@media (max-width: 640px) {
  .case-more-grid { grid-template-columns: 1fr; }
  .case-page .case-details { grid-template-columns: 1fr; gap: 1.5em; }
  .hero-3d { height: 340px; margin-top: -1rem; }
  .hero-3d-hint { display: none; }
  .cinema { height: 240vh; }
  .cinema-video { transform: translateY(-12%) scale(1.05); }
  .cinema-shade { background: linear-gradient(180deg, var(--bg) 0%, rgba(12,10,9,.25) 25%, rgba(12,10,9,.55) 70%, var(--bg) 100%); }
  .cinema-lines { align-self: end; padding-bottom: 16vh; }
  .marquee-3d .marquee { transform: rotateX(12deg); }
  .hero-video video { opacity: .4; }
  .hero-video::after { background: linear-gradient(180deg, rgba(12,10,9,.55), rgba(12,10,9,.85)); }
  .topbar { top: 8px; margin-top: 8px; }
  .topnav, .topbar .btn-dark { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav { position: fixed; inset: 70px 14px auto; z-index: 49; display: none; flex-direction: column; padding: .6em; border-radius: 18px; background: rgba(28, 25, 23, .97); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 50px -20px rgba(0,0,0,.8); }
  .mobile-nav a { padding: .8em 1em; border-radius: 12px; font-weight: 500; }
  .mobile-nav a:hover { background: rgba(255,255,255,.05); }
  body.nav-open .mobile-nav { display: flex; }
  .hero-statement { max-width: none; }
  .scene { min-height: 360px; }
  .orbit::before { left: -135px; top: -135px; width: 270px; height: 270px; }
  .badge { transform: rotateZ(var(--a)) translateX(135px) rotateZ(calc(var(--a) * -1)); }
  .badge span { font-size: .62rem; }
  .glow { width: 220px; height: 220px; }
  .hero-card { max-width: 330px; }
  .stats div { padding: 1.1em 1.2em; }
  .stats dt { font-size: 1.9rem; }
  .cards, .products, .repos { grid-template-columns: 1fr; }
  .card-wide { grid-column: auto; }
  .card { min-height: auto; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer { flex-direction: column; }
  .contact-meta .sep { display: none; }
  .contact-meta span { display: block; }
  .case-details, .case-gallery-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor { display: none; }
  html { scroll-behavior: auto; }
  .orbit, .badge span, .marquee-track, .dot { animation: none; }
  .progress { display: none; }
}
