/* ===== tokens ===== */
:root {
  --accent: #f5f5f7;            /* set from data/site.js (accent), see js/app.js. White = the site stays black and white */
  --on-accent: #050505;
  --a-10: color-mix(in srgb, var(--accent) 10%, transparent);
  --a-20: color-mix(in srgb, var(--accent) 20%, transparent);
  --a-40: color-mix(in srgb, var(--accent) 40%, transparent);
  --a-60: color-mix(in srgb, var(--accent) 60%, transparent);

  --bg: #000;
  --s1: #0a0a0a;
  --s2: #111;
  --s3: #171717;
  --text: #f5f5f7;
  --muted: rgba(255, 255, 255, .62);
  --dim: rgba(255, 255, 255, .4);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --card: linear-gradient(#0c0c0c, #060606 70%);

  --r: 10px;                    /* controls */
  --rc: 24px;                   /* cards */
  --speed: 1;
  --e: cubic-bezier(.16, 1, .3, 1);
  --wide: 1180px;
  --gut: clamp(20px, 4vw, 40px);

  /* System fonts only (no external requests). Geist / Inter are used when they are installed. */
  --font: Geist, Inter, "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", "Cascadia Mono", "Cascadia Code", ui-monospace, Consolas, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}
:root.no-anim *, :root.no-anim *::before, :root.no-anim *::after {
  transition-duration: 0ms !important; animation-duration: 0ms !important; animation-iteration-count: 1 !important;
}

/* ===== base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 84px; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
main { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: rgba(255, 255, 255, .45); }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ===== nav: wide at the top, a compact pill once you scroll ===== */
.nav { position: fixed; inset: 0 0 auto; z-index: 30; padding: 10px var(--gut) 0; pointer-events: none; }
.nav-bar {
  pointer-events: auto; max-width: 1160px; height: 56px; margin: 0 auto; padding: 0 10px 0 18px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  border-radius: 16px; border: 1px solid transparent;
  transition: max-width .7s var(--e), background .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.nav.raised .nav-bar {
  max-width: 760px; background: rgba(12, 12, 12, .72); border-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .8);
}
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; overflow: hidden; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-mark:has(img) { background: none; }
.links { display: flex; gap: 2px; }
.links a { padding: 7px 12px; border-radius: 9px; font-size: 14px; color: var(--muted); transition: color .2s ease, background .2s ease; }
.links a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-end { justify-self: end; }

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px;
  border: 0; border-radius: 11px; font: 600 15px/1 var(--font); letter-spacing: -.01em; white-space: nowrap; cursor: pointer;
  transition: transform .25s var(--e), box-shadow .3s ease, background .25s ease, filter .25s ease;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 32px -12px var(--a-40), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-accent:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 14px 44px -12px var(--a-60), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-quiet { background: rgba(20, 20, 20, .8); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.btn-quiet:hover { background: rgba(36, 36, 36, .9); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); transform: translateY(-1px); }
.btn-sm { height: 36px; padding: 0 14px; border-radius: 9px; font-size: 14px; }
.btn .ic { transition: transform .3s var(--e); }
.btn:hover .ic { transform: translateX(3px); }

/* ===== hero ===== */
.hero { position: relative; padding: clamp(120px, 15vh, 168px) var(--gut) 0; text-align: center; overflow: clip; isolation: isolate; }
.hero-copy { position: relative; z-index: 2; max-width: 940px; margin: 0 auto; }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 9px; height: 32px; padding: 0 12px 0 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 13.5px; color: var(--muted);
  transition: color .25s ease, box-shadow .25s ease, background .25s ease;
}
.eyebrow-pill:hover { color: var(--text); background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26); }
.eyebrow-pill .ic { width: 14px; height: 14px; transition: transform .3s var(--e); }
.eyebrow-pill:hover .ic { transform: translateX(2px); }
.eyebrow-pill.off .pulse { background: var(--dim); box-shadow: none; animation: none; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--a-60); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
h1 { margin-top: 26px; font-size: clamp(44px, 6.1vw, 86px); font-weight: 600; line-height: .97; letter-spacing: -.052em; }
h1 span { display: block; }
h1 .dim { color: rgba(255, 255, 255, .46); padding-bottom: .08em; }
.lead { max-width: 600px; margin: 24px auto 0; font-size: 17.5px; line-height: 1.6; letter-spacing: -.011em; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 32px; }
.stats { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 30px; font-size: 13.5px; }
.stats div { padding: 0 18px; }
.stats div + div { border-left: 1px solid var(--line-2); }
.stats b { margin-right: 7px; font-family: var(--mono); font-weight: 600; font-size: 13px; color: var(--text); }
.stats span { color: var(--dim); }

/* stage: light rays and a horizon; the menu rises over it, tilted back in 3D until you scroll */
.hero-stage { --arc-top: clamp(70px, 9vw, 130px); position: relative; margin: clamp(48px, 6vw, 76px) calc(var(--gut) * -1) 0; padding: 0 var(--gut) clamp(60px, 8vw, 120px); }
.rays {
  position: absolute; z-index: -2; left: 50%; top: var(--arc-top); width: 2800px; height: 2800px; pointer-events: none;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0) 0deg 3.5deg, rgba(255, 255, 255, .09) 5.5deg, rgba(255, 255, 255, 0) 7.5deg 12deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 5%, rgba(0, 0, 0, .5) 28%, transparent 62%);
  mask-image: radial-gradient(closest-side, #000 5%, rgba(0, 0, 0, .5) 28%, transparent 62%);
  animation: rays-spin calc(140s / var(--speed)) linear infinite;
}
@keyframes rays-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.arc {
  position: absolute; z-index: -1; left: 50%; top: var(--arc-top); width: max(1700px, 150vw); aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(50% 50% at 50% 50%, #000 93%, #070707 100%); pointer-events: none;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .4), 0 -46px 150px -30px rgba(255, 255, 255, .3), 0 -10px 60px -18px var(--a-40), inset 0 60px 120px -80px rgba(255, 255, 255, .5);
}
.arc::before { content: ""; position: absolute; left: 50%; top: -70px; width: 46%; height: 140px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .34), transparent); filter: blur(26px); }
.arc-rim { position: absolute; inset: -1px; border-radius: 50%; padding: 1.5px;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, .35) 4%, transparent 11%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: rim calc(4.5s / var(--speed)) ease-in-out infinite; }
@keyframes rim { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }

.fan { --tilt: 26deg; position: relative; width: min(1000px, 100%); margin: 0 auto; perspective: 1800px; perspective-origin: 50% 0; }
.mock {
  position: relative; aspect-ratio: var(--ar, 1.3); border-radius: clamp(8px, 1.1vw, 15px); overflow: hidden; background: #080808;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 -24px 120px -40px var(--a-40), 0 50px 120px -40px #000;
  transform-origin: 50% 0; will-change: transform;
}
.mock .shot { position: absolute; inset: 0; filter: grayscale(var(--gray, 0)); }
.mock::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .10), transparent 28%, transparent 70%, rgba(255, 255, 255, .04)); }
.mock-c { z-index: 2; transform: rotateX(var(--tilt)) translateZ(0); }
.mock-l, .mock-r { position: absolute; z-index: 1; top: 3%; width: 62%; filter: brightness(.5) grayscale(1); }
.mock-l { left: -17%; transform: rotateX(var(--tilt)) rotateY(22deg) translateZ(-180px); }
.mock-r { right: -17%; transform: rotateX(var(--tilt)) rotateY(-22deg) translateZ(-180px); }
.shot { display: block; background-color: #080808; background-repeat: no-repeat; }
.hero-stage::after { content: ""; position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 30%; pointer-events: none; background: linear-gradient(transparent, #000 88%); }

/* ===== tech strip ===== */
.marquee { position: relative; z-index: 4; margin-top: -30px; padding: 8px 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.track { display: flex; width: max-content; animation: marquee calc(52s / var(--speed)) linear infinite; }
.track span { display: inline-flex; align-items: center; gap: 44px; padding-right: 44px; font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: rgba(255, 255, 255, .5); white-space: nowrap; }
.track span::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== sections ===== */
.section { max-width: calc(var(--wide) + var(--gut) * 2); margin: 0 auto; padding: clamp(110px, 13vw, 170px) var(--gut) 0; }
.section.bleed { max-width: none; padding-left: 0; padding-right: 0; }
.wrap { max-width: calc(var(--wide) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }
.head { max-width: 780px; margin: 0 auto clamp(40px, 5vw, 64px); padding: 0 var(--gut); text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; letter-spacing: -.005em; color: var(--muted); }
.eyebrow .ic { width: 15px; height: 15px; color: var(--accent); }
h2 { margin-top: 14px; font-size: clamp(32px, 3.6vw, 50px); font-weight: 600; line-height: 1.06; letter-spacing: -.042em; }
.sub { max-width: 630px; margin: 16px auto 0; font-size: 17.5px; line-height: 1.6; letter-spacing: -.011em; color: var(--muted); }

/* ===== cards ===== */
.tile, .panel, .proj, .steps li {
  position: relative; border-radius: var(--rc); border: 1px solid var(--line); background: var(--card);
}
/* pointer spotlight on the border and a soft glow inside (js/fx-motion.js sets --mx / --my) */
.spot::before {
  content: ""; position: absolute; inset: -1px; z-index: 0; padding: 1px; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(380px circle at var(--mx, -999px) var(--my, -999px), var(--a-60), rgba(255, 255, 255, .16) 38%, transparent 70%);
  -webkit-mask: linear-gradient(rgba(0, 0, 0, .12) 0 0) content-box, linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: source-over, xor;
  mask: linear-gradient(rgba(0, 0, 0, .12) 0 0) content-box, linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: add, exclude;
  transition: opacity .4s ease;
}
@media (hover: hover) and (pointer: fine) { .spot:hover::before { opacity: 1; } }
.spot > * { position: relative; z-index: 1; }

.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.tile { grid-column: span 2; display: flex; flex-direction: column; min-height: 432px; overflow: hidden; }
.tile.w4 { grid-column: span 4; }
.tile.w3 { grid-column: span 3; }
.tile-art { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; padding: 28px 28px 6px; }
.tile-copy { flex: none; padding: 18px 28px 26px; }
.tile-copy h3 { font-size: 17px; font-weight: 600; line-height: 24px; letter-spacing: -.022em; }
.tile-copy p { max-width: 62ch; margin-top: 6px; font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, .56); }

/* ===== work: 3D gallery + project cards ===== */
.gal { position: relative; height: clamp(440px, 64vh, 680px); overflow: hidden; perspective: 1000px;
  -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent); }
.gal[hidden] { display: none; }
.gal-space { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.gal-card {
  position: absolute; left: 0; top: 0; display: block; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #070707; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); filter: grayscale(1) brightness(.62); will-change: transform, opacity;
  transition: filter .45s ease, box-shadow .45s ease;
}
.gal-card .shot { width: 100%; height: 100%; }
.gal-card:hover, .gal-card:focus-visible { filter: none; box-shadow: 0 0 0 1px var(--a-60), 0 0 70px -10px var(--a-60); }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 36px 0 24px; }
.filters:empty { display: none; }
.chip { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); cursor: pointer; font-size: 13px; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.projects { display: grid; gap: 16px; margin-top: 32px; }
.proj { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); overflow: hidden; }
.proj[hidden] { display: none; }
.proj-media { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-right: 1px solid var(--line); background: radial-gradient(90% 70% at 50% 0%, var(--a-10), transparent 70%); }
.proj-shot { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: var(--ar, 1.3); background: #080808; cursor: zoom-in;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 80px -40px #000, 0 0 90px -40px var(--a-60); transition: transform .5s var(--e), box-shadow .4s ease; }
.proj-shot:hover { transform: translateY(-3px) scale(1.008); }
.proj-shot .shot { position: absolute; inset: 0; transition: opacity .45s ease; }
.proj-views { display: flex; flex-wrap: wrap; gap: 8px; }
.proj-views button { position: relative; width: 70px; aspect-ratio: 1.3; padding: 0; border: 0; border-radius: 7px; overflow: hidden; background: #080808; cursor: pointer; opacity: .5; box-shadow: 0 0 0 1px var(--line-2); transition: opacity .25s ease, box-shadow .25s ease; }
.proj-views button:hover { opacity: .9; }
.proj-views button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 1.5px var(--accent); }
.proj-views .shot { width: 100%; height: 100%; }
.proj-body { display: flex; flex-direction: column; padding: 32px 32px 30px; }
.proj-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.proj-title { font-size: 26px; font-weight: 600; letter-spacing: -.035em; }
.proj-date { font: 12.5px var(--mono); color: var(--dim); }
.proj-sum { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.proj-hl { margin: 18px 0 0; padding: 0; list-style: none; }
.proj-hl li { position: relative; padding: 9px 0 9px 24px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .56); }
.proj-hl li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 5px; border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent); rotate: -45deg; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; color: var(--muted); }
.tag-src { color: var(--accent); box-shadow: inset 0 0 0 1px var(--a-40); background: var(--a-10); }
.proj .tags { margin-top: 18px; }
.proj-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 24px; }
.dots { display: inline-flex; margin-left: auto; }
.dots i { width: 15px; height: 15px; margin-left: -4px; border-radius: 50%; border: 2px solid #090909; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); }
.work-empty { text-align: center; color: var(--muted); }

/* ===== skill ===== */
.skill-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.panel { padding: 30px; }
.skill-info > p { font-size: 16px; line-height: 1.7; color: var(--muted); }
.skill-phases { margin: 22px 0 0; padding: 0; list-style: none; }
.skill-phases li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.skill-phases .num { grid-row: 1 / span 2; padding-top: 3px; font: 12px var(--mono); color: var(--accent); }
.skill-phases b { font-size: 15px; font-weight: 600; letter-spacing: -.015em; }
.skill-phases span:not(.num) { grid-column: 2; font-size: 14px; color: rgba(255, 255, 255, .56); }
.skill-get { position: sticky; top: 92px; display: grid; gap: 12px; background: radial-gradient(120% 80% at 50% 0%, var(--a-10), transparent 60%), var(--card); }
.skill-file { display: inline-flex; align-items: center; gap: 8px; font: 13px var(--mono); color: var(--muted); }
.skill-file .ic { color: var(--accent); }
#skill-download { display: grid; gap: 8px; }
#skill-download .btn { width: 100%; }
#skill-download .btn:hover .ic, .download .btn:hover .ic { transform: translateY(2px); }
.sub-h { margin-top: 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.skill-steps { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.skill-steps li + li { margin-top: 6px; }
.skill-req, .skill-license { padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--dim); }
.skill-license { padding-top: 0; border-top: 0; color: var(--muted); }
.download-note { font: 12px var(--mono); color: var(--dim); }

/* ===== process ===== */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.steps li { padding: 26px 26px 28px; overflow: hidden; }
.steps .num { display: inline-grid; place-items: center; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--a-10); box-shadow: inset 0 0 0 1px var(--a-40); font: 600 12.5px var(--mono); color: var(--accent); }
.steps h3 { margin: 44px 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.steps p { font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, .56); }
.steps li::after { content: ""; position: absolute; top: 39px; left: 84px; right: -18px; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.steps li:last-child::after { right: 26px; }

/* ===== about ===== */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.about-text h2 { margin-bottom: 24px; }
.about-text p:not(.eyebrow) { max-width: 54ch; margin-bottom: 16px; font-size: 17px; line-height: 1.7; color: var(--muted); }
.about-card { width: min(380px, 100%); justify-self: center; }

/* discord-style profile card */
.dc { position: relative; border-radius: 22px; background: #0b0b0b; border: 1px solid var(--line-2); overflow: hidden; box-shadow: 0 30px 90px -30px #000, 0 0 110px -50px var(--a-60); }
.dc-banner { aspect-ratio: 5 / 2; background: radial-gradient(80% 120% at 30% 0%, #222, #050505); overflow: hidden; }
.dc-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.dc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -48px; padding: 0 16px; }
.dc-avatar { position: relative; flex: none; width: 96px; height: 96px; padding: 6px; border-radius: 50%; background: #0b0b0b; }
.dc-avatar img, .dc-avatar .fallback { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.dc-avatar .fallback { display: grid; place-items: center; background: var(--s3); font-size: 32px; font-weight: 700; }
.dc-status { position: absolute; right: 5px; bottom: 5px; width: 26px; height: 26px; border-radius: 50%; border: 6px solid #0b0b0b; background: #23a55a; }
.dc-status.idle { background: #f0b232; }
.dc-status.dnd { background: #f23f43; }
.dc-status.offline { background: #80848e; }
.dc-badges { display: flex; gap: 2px; margin-bottom: 6px; padding: 4px; border-radius: 8px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.dc-badges span { display: grid; place-items: center; width: 24px; height: 24px; color: var(--muted); }
.dc-badges .ic { width: 15px; height: 15px; }
.dc-body { padding: 12px 16px 16px; }
.dc-name { display: block; font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.dc-user { font-size: 14px; color: var(--muted); }
.dc-activity { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.dc-activity::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.dc-inner { margin-top: 14px; padding: 2px 12px 12px; border-radius: 12px; background: #060606; border: 1px solid var(--line); }
.dc-sec { padding-top: 12px; }
.dc-sec + .dc-sec { margin-top: 12px; border-top: 1px solid var(--line); }
.dc-sec h4 { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.dc-sec p { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.dc-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.dc-role { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 6px; background: var(--s3); border: 1px solid var(--line-2); font-size: 12px; }
.dc-role i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.dc .btn { width: 100%; margin-top: 14px; }
.dc-glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .45s ease;
  background: radial-gradient(460px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .15), rgba(255, 255, 255, .04) 38%, transparent 66%); }
.dc-glare.on { opacity: 1; }

/* ===== closing ===== */
.close { position: relative; margin-top: clamp(110px, 13vw, 170px); padding: clamp(60px, 8vw, 110px) var(--gut) 0; text-align: center; overflow: clip; }
.close-copy { position: relative; z-index: 1; }
.close h2 { margin: 0; font-size: clamp(40px, 6vw, 82px); line-height: .98; letter-spacing: -.052em; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 34px; }
.hint { font-size: 14px; color: var(--dim); }
.hint code { font-family: var(--mono); color: var(--muted); }
.wave { display: block; width: calc(100% + var(--gut) * 2); height: clamp(240px, 30vw, 380px); margin: clamp(10px, 3vw, 40px) calc(var(--gut) * -1) 0; }

/* ===== footer ===== */
.footer { max-width: calc(var(--wide) + var(--gut) * 2); margin: 0 auto; padding: 44px var(--gut) 34px; font-size: 13.5px; color: var(--dim); }
.foot-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.foot-brand .brand { color: var(--text); }
.foot-brand p { margin-top: 10px; max-width: 34ch; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.foot-links a { color: var(--muted); transition: color .2s ease; }
.foot-links a:hover, .legal a:hover, .back-top:hover { color: var(--text); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 20px; }
.legal { display: flex; gap: 18px; }
.foot-right { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.motion-toggle, .back-top { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); font-size: 12.5px; cursor: pointer; transition: color .2s ease, box-shadow .2s ease; }
.motion-toggle:hover, .back-top:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); color: var(--text); }
.motion-toggle::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.motion-toggle[aria-pressed="true"]::before { background: var(--accent); box-shadow: 0 0 8px var(--a-60); }
.motion-state { color: var(--text); }
.back-top .ic { width: 14px; height: 14px; }
.fps { font: 12px var(--mono); }

/* ===== modal (project window) ===== */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .25s ease; }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.modal-win { width: min(1060px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; border-radius: 22px; background: #080808; border: 1px solid var(--line-2); overflow: hidden; animation: pop .45s var(--e); box-shadow: 0 40px 120px -30px #000; }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(14px); } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 22px; border-bottom: 1px solid var(--line); font-weight: 600; letter-spacing: -.02em; }
.icon-btn { margin-left: auto; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; transition: background .2s ease, color .2s ease; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.modal-body { overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-body > * { flex: none; }
.group { padding: 14px 14px 10px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); }
.group-head { margin-bottom: 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.viewer { position: relative; border-radius: 14px; background: #040404; border: 1px solid var(--line); overflow: hidden; }
.viewer img { width: 100%; height: 100%; object-fit: contain; }
.compare { position: relative; aspect-ratio: var(--ratio, 16 / 10); max-height: 64vh; margin: 0 auto; --pos: 50%; }
.compare img { position: absolute; inset: 0; }
.compare .over { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare .bar { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; }
.compare .bar::after { content: ""; position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(0, 0, 0, .5); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; }
.compare:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.compare .lbl { position: absolute; top: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .75); border: 1px solid var(--line-2); font-size: 11px; color: var(--muted); pointer-events: none; }
.compare .lbl.l { left: 12px; } .compare .lbl.r { right: 12px; }
.single { aspect-ratio: var(--ratio, 16 / 10); max-height: 64vh; margin: 0 auto; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs button { width: 92px; height: 58px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #050505; cursor: pointer; opacity: .55; box-shadow: 0 0 0 1px var(--line-2); transition: opacity .2s ease, box-shadow .2s ease; }
.thumbs button:hover { opacity: 1; }
.thumbs button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 1.5px var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.download { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--s1); }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.meta .group { padding-bottom: 12px; }
.meta ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.meta li + li { margin-top: 4px; }
.meta p { margin-bottom: 8px; font-size: 13.5px; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13.5px; color: var(--muted); }
.kv b { font-weight: 500; color: var(--text); }
.palette { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pal { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 5px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--s1); cursor: pointer; font-size: 11.5px; }
.pal:hover { border-color: rgba(255, 255, 255, .3); }
.pal i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; padding: 9px 16px; transform: translate(-50%, 12px); border-radius: 999px; background: rgba(22, 22, 22, .92); box-shadow: inset 0 0 0 1px var(--line-2), 0 12px 30px -10px #000; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .4s var(--e); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== scroll reveal (js/fx-motion.js adds html.fx-motion and the classes) ===== */
html.fx-motion:not(.no-anim) .reveal { transition: opacity .9s var(--e) var(--d, 0ms), translate .9s var(--e) var(--d, 0ms), filter .9s var(--e) var(--d, 0ms); }
html.fx-motion:not(.no-anim) .reveal:not(.in) { opacity: 0; translate: 0 26px; filter: blur(8px); }
@media (pointer: coarse) { html.fx-motion:not(.no-anim) .reveal:not(.in) { filter: none; } }
/* hero entrance: the menus fly in from behind the horizon */
html.fx-motion:not(.no-anim) .mock { animation: mock-in 1.5s var(--e) both; animation-delay: var(--md, .25s); }
@keyframes mock-in { from { opacity: 0; translate: 0 140px; scale: .82; } }
html.fx-motion:not(.no-anim) .mock-l { --md: .5s; animation-name: mock-in-l; }
html.fx-motion:not(.no-anim) .mock-r { --md: .62s; animation-name: mock-in-r; }
@keyframes mock-in-l { from { opacity: 0; translate: 46% 60px; scale: .6; } }
@keyframes mock-in-r { from { opacity: 0; translate: -46% 60px; scale: .6; } }

/* ===== responsive ===== */
@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile, .tile.w3 { grid-column: span 1; }
  .tile.w4 { grid-column: span 2; }
  .proj { grid-template-columns: minmax(0, 1fr); }
  .proj-media { border-right: 0; border-bottom: 1px solid var(--line); }
  .skill-grid { grid-template-columns: minmax(0, 1fr); }
  .skill-get { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li::after { display: none; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 760px) {
  .links { display: none; }
  .nav-bar { grid-template-columns: 1fr auto; }
  .nav.raised .nav-bar { max-width: 420px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile, .tile.w3, .tile.w4 { grid-column: span 1; min-height: 0; }
  .tile-art { padding: 20px 18px 4px; }
  .tile-copy { padding: 16px 20px 22px; }
  .mock-l, .mock-r { display: none; }
  .panel, .proj-media, .proj-body { padding: 22px; }
  .stats div { padding: 4px 14px; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
  .cta .btn, .contact-actions .btn { flex: 1 1 100%; }
  .stats div + div { border-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
