/* ============================================
   AKSEL PAWLUCZUK — PORTFOLIO
   Design system: "MECHA LIQUID GLASS / GUNDAM WHITE"
   Light armor-panel base · graphite technical linework
   · signal-red accent · frosted liquid glass · mono HUD labels
   ============================================ */

/* ============================================
   VARIABLES
   ============================================ */
:root {
  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-sans:    'Inter', sans-serif;
  --font-mono:    'Space Mono', ui-monospace, monospace;

  /* Base — warm Gundam-white "armor" */
  --bg:           #efede8;
  --bg-2:         #f6f5f2;
  --panel:        #ffffff;

  /* Ink — graphite */
  --ink:          #15171c;
  --ink-2:        rgba(21, 23, 28, 0.62);
  --ink-3:        rgba(21, 23, 28, 0.40);
  --ink-4:        rgba(21, 23, 28, 0.20);
  --line:         rgba(21, 23, 28, 0.12);
  --line-2:       rgba(21, 23, 28, 0.07);

  /* Accent — signal red/orange (used like a warning marker) */
  --accent:       #ff3b22;
  --accent-deep:  #e22f12;
  --accent-soft:  rgba(255, 59, 34, 0.10);
  --accent-line:  rgba(255, 59, 34, 0.42);

  /* Functional status — green = nominal (HUD) */
  --ok:           #2ea043;

  /* Solid inverted surface (solid buttons/badges) — flips in dark theme */
  --solid:        #15171c;
  --on-solid:     #ffffff;

  /* Liquid glass (on light) */
  --glass-bg:     linear-gradient(160deg, rgba(255,255,255,0.66), rgba(255,255,255,0.40));
  --glass-bg-strong: linear-gradient(160deg, rgba(255,255,255,0.82), rgba(255,255,255,0.58));
  --glass-blur:   blur(18px) saturate(180%);
  --glass-shadow: 0 0 0 1px rgba(21,23,28,0.06),
                  inset 0 1px 0 rgba(255,255,255,0.95),
                  inset 0 0 0 1px rgba(255,255,255,0.40),
                  0 12px 36px rgba(21,23,28,0.10),
                  0 2px 8px rgba(21,23,28,0.05);
  --glass-shadow-hi: 0 0 0 1px rgba(21,23,28,0.08),
                  inset 0 1px 0 rgba(255,255,255,1),
                  inset 0 0 0 1px rgba(255,255,255,0.5),
                  0 20px 50px rgba(21,23,28,0.14),
                  0 4px 12px rgba(21,23,28,0.06);

  /* Layout */
  --max-w:        1260px;
  --pad-x:        clamp(1.5rem, 5vw, 4.5rem);
  --radius:       20px;
  --radius-sm:    12px;
  --radius-md:    16px;
  --radius-lg:    26px;
  --radius-pill:  999px;

  /* Easing */
  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:      cubic-bezier(0.7, 0, 1, 0.3);

  --nav-h:        72px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html   { scroll-behavior: smooth; font-size: 16px; }
body   {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  cursor: none;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
}
img    { display: block; max-width: 100%; }
ul     { list-style: none; }
a      { color: inherit; text-decoration: none; }
button { cursor: none; background: none; border: none; font: inherit; color: inherit; }
h1,h2,h3 { font-family: var(--font-display); }
::selection { background: var(--accent); color: #fff; }

/* Mono technical label helper */
.mono {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

/* ============================================
   COCKPIT HUD FRAME (fixed viewport frame)
   ============================================ */
#bg-wrap {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background:
    /* fine blueprint grid */
    linear-gradient(rgba(21,23,28,0.022) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(90deg, rgba(21,23,28,0.022) 1px, transparent 1px) 0 0 / 30px 30px,
    /* coarse blueprint grid */
    linear-gradient(rgba(21,23,28,0.04) 1px, transparent 1px) 0 0 / 150px 150px,
    linear-gradient(90deg, rgba(21,23,28,0.04) 1px, transparent 1px) 0 0 / 150px 150px,
    /* base wash */
    radial-gradient(120% 90% at 25% 0%, #f7f6f3 0%, #efede8 55%, #e8e6e0 100%);
}

/* Thin HUD viewport frame + accent corner ticks */
#bg-wrap::after {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(21,23,28,0.07);
  border-radius: 6px;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0;
  will-change: transform;
  transition: opacity 1.2s ease;
}
.orb.visible { opacity: 1; }
.orb-1 {
  width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(255,59,34,0.07) 0%, transparent 70%);
  top: -12%; left: -8%;
}
.orb-2 {
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(255,255,255,0.85) 0%, transparent 70%);
  top: 14%; right: -10%;
}
.orb-3 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(255,150,120,0.05) 0%, transparent 70%);
  bottom: 4%; left: 22%;
}
.orb-4 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.7) 0%, transparent 70%);
  bottom: -12%; right: 6%;
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-20px, 20px) scale(0.98); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ============================================
   TECH CORNERS — mecha L-bracket utility
   (8 background segments = 4 corner brackets)
   ============================================ */
.tech-corners { position: relative; }
.tech-corners::before {
  content: '';
  position: absolute;
  inset: 9px;
  pointer-events: none;
  z-index: 3;
  --c: rgba(21,23,28,0.32);
  --len: 13px;
  background:
    linear-gradient(var(--c),var(--c)) left top,
    linear-gradient(var(--c),var(--c)) left top,
    linear-gradient(var(--c),var(--c)) right top,
    linear-gradient(var(--c),var(--c)) right top,
    linear-gradient(var(--c),var(--c)) left bottom,
    linear-gradient(var(--c),var(--c)) left bottom,
    linear-gradient(var(--c),var(--c)) right bottom,
    linear-gradient(var(--c),var(--c)) right bottom;
  background-repeat: no-repeat;
  background-size:
    1px var(--len), var(--len) 1px,
    1px var(--len), var(--len) 1px,
    1px var(--len), var(--len) 1px,
    1px var(--len), var(--len) 1px;
  transition: --c .3s;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
/* HUD lock-on reticle — corner brackets that target & lock onto elements */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 40px; height: 40px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity .2s;
  color: var(--ink);
}
.cur-corner {
  position: absolute;
  width: 9px; height: 9px;
  border: 1.5px solid currentColor;
  opacity: .5;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.14));
  transition: transform .28s var(--ease), border-color .2s, opacity .2s;
}
.cur-corner.tl { top: 0;    left: 0;  border-right: none; border-bottom: none; }
.cur-corner.tr { top: 0;    right: 0; border-left: none;  border-bottom: none; }
.cur-corner.bl { bottom: 0; left: 0;  border-right: none; border-top: none; }
.cur-corner.br { bottom: 0; right: 0; border-left: none;  border-top: none; }
.cur-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: width .2s var(--ease), height .2s var(--ease), opacity .2s;
}
.cur-label {
  position: absolute;
  top: 100%; left: 50%;
  transform: translate(-50%, 2px);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s;
}

/* hover (links / buttons) — LOCK ON: corners snap inward + go accent */
body.cur-hover .cur-corner { border-color: var(--accent); opacity: .95; }
body.cur-hover .cur-corner.tl { transform: translate(7px, 7px); }
body.cur-hover .cur-corner.tr { transform: translate(-7px, 7px); }
body.cur-hover .cur-corner.bl { transform: translate(7px, -7px); }
body.cur-hover .cur-corner.br { transform: translate(-7px, -7px); }
body.cur-hover .cur-dot { width: 5px; height: 5px; }

/* project (cur-view) — frame EXPANDS + "VIEW" readout */
body.cur-view .cur-corner { border-color: var(--accent); opacity: 1; }
body.cur-view .cur-corner.tl { transform: translate(-4px, -4px); }
body.cur-view .cur-corner.tr { transform: translate(4px, -4px); }
body.cur-view .cur-corner.bl { transform: translate(-4px, 4px); }
body.cur-view .cur-corner.br { transform: translate(4px, 4px); }
body.cur-view .cur-dot { width: 0; height: 0; opacity: 0; }
body.cur-view .cur-label { opacity: 1; }

body.cur-hidden #cursor { opacity: 0; }

/* ============================================
   LOADER
   ============================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
#loader::before {
  content: 'SYS // BOOT';
  position: absolute;
  top: 2rem; left: 2rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .22em;
  color: var(--ink-3);
}
#loader::after {
  content: 'AP—PORTFOLIO v2';
  position: absolute;
  bottom: 2rem; right: 2rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .18em;
  color: var(--ink-3);
}
.loader-content { text-align: center; }
.loader-letters {
  display: flex;
  gap: .15rem;
  justify-content: center;
  margin-bottom: 1.6rem;
}
.ll {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  color: var(--ink);
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  letter-spacing: -.04em;
}
.loader-bar-wrap {
  position: relative;
  width: 180px;
  height: 2px;
  background: var(--line);
  overflow: hidden;
  margin: 0 auto;
}
.loader-bar-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-line);
}

/* ============================================
   GLASS UTILITY CLASSES
   ============================================ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
}
.glass-frame {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
  overflow: hidden;
}
.glass-pill {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 0 0 1px rgba(21,23,28,0.06),
              inset 0 1px 0 rgba(255,255,255,0.9),
              0 4px 14px rgba(21,23,28,0.06);
  border-radius: var(--radius-pill);
  padding: .45rem 1.1rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.glass-panel {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--glass-shadow-hi);
}

/* ============================================
   NAV
   ============================================ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  transition: background .4s, box-shadow .4s, backdrop-filter .4s;
}
#nav.scrolled {
  background: rgba(246, 245, 242, 0.72);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(21,23,28,0.05);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.01em;
  color: var(--ink);
}
.logo-initials {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--solid);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(21,23,28,0.25);
}
.logo-initials::after {
  content: '';
  position: absolute;
  top: 5px; right: 5px;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 1px;
}
.logo-full { opacity: .6; font-weight: 500; }

.nav-links { display: flex; gap: 2.5rem; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: relative;
  transition: color .2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width .3s var(--ease);
}
.nav-links a:hover        { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

#lang-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  transition: box-shadow .2s;
}
.lang-opt { transition: color .2s; color: var(--ink-3); }
.lang-opt.active { color: var(--accent); }
.lang-sep { color: var(--ink-4); }

/* ============================================
   HERO
   ============================================ */
#hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: var(--nav-h) var(--pad-x) 5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  overflow: hidden;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  padding-top: 2rem;
}
.hero-top-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.hero-avail {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--ink-2);
}
.avail-dot {
  width: 7px; height: 7px;
  border-radius: 1px;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(46, 160, 67, .4);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(46, 160, 67, .5); }
  70%  { box-shadow: 0 0 0 7px rgba(46, 160, 67, 0); }
  100% { box-shadow: 0 0 0 0   rgba(46, 160, 67, 0); }
}

.hero-name {
  font-size: clamp(4rem, 7.5vw, 8rem);
  font-weight: 800;
  line-height: .88;
  letter-spacing: -.04em;
  color: var(--ink);
}
.hn-line      { display: block; overflow: hidden; }
.hn-inner     { display: block; transform: translateY(110%); }
.accent-line .hn-inner::after {
  content: '.';
  color: var(--accent);
}

.hero-desc {
  font-size: clamp(.88rem, 1.2vw, 1rem);
  line-height: 1.7;
  color: var(--ink-2);
  font-weight: 400;
  max-width: 40ch;
}
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* Primary CTA — solid graphite armor panel */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 2rem;
  border-radius: var(--radius-pill);
  background: var(--solid);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(21,23,28,0.22),
              inset 0 1px 0 rgba(255,255,255,0.12);
  transition: transform .3s var(--ease), box-shadow .3s, background .3s;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  left: 14px; top: 50%;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 1px;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity .3s, transform .3s var(--ease);
}
.btn-primary:hover {
  transform: translateY(-2px);
  padding-left: 2.3rem;
  box-shadow: 0 14px 34px rgba(21,23,28,0.30),
              inset 0 1px 0 rgba(255,255,255,0.14);
}
.btn-primary:hover::before { opacity: 1; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: .9rem 1.6rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--ink-2);
  transition: color .2s, box-shadow .2s, transform .3s var(--ease);
}
.btn-ghost:hover {
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-hi);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: .5rem;
}
.hero-stat { display: flex; flex-direction: column; gap: .25rem; }
.hstat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1;
}
.hstat-lbl {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero-stat-sep { width: 1px; height: 2rem; background: var(--line); }

/* Right gallery */
.hero-right {
  position: relative;
  height: 82svh;
  overflow: visible;
}
.hero-gallery-mask {
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  perspective: 1000px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}
.hero-gallery {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  will-change: transform;
}
.hg-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  transform-style: preserve-3d;
  transition: transform .4s var(--ease), box-shadow .4s;
}
.hg-card::after {
  content: '';
  position: absolute;
  top: 10px; right: 10px;
  width: 11px; height: 11px;
  border-top: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
  opacity: .5;
  transition: opacity .3s;
  z-index: 2;
}
.hg-card:hover { transform: scale(1.015); }
.hg-card:hover::after { opacity: 1; }
.hg-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.hg-card:hover img { transform: scale(1.06); }
.hg-label {
  position: absolute;
  bottom: .7rem; left: .85rem;
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(21,23,28,0.55);
  backdrop-filter: blur(6px);
  padding: .25rem .55rem;
  border-radius: 4px;
  text-shadow: none;
  pointer-events: none;
}

/* Spotlight — dim the other cards while hovering the gallery */
.hero-gallery:hover .hg-card { opacity: .45; }
.hero-gallery:hover .hg-card:hover { opacity: 1; box-shadow: var(--glass-shadow-hi); }

/* "VIEW" overlay on a card hover */
.hg-view {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -42%);
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-mono);
  font-size: .6rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: .3rem .7rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 18px rgba(255,59,34,0.35);
  opacity: 0;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 3;
  pointer-events: none;
}
.hg-card:hover .hg-view { opacity: 1; transform: translate(-50%, -50%); }

/* Fast-forward control (hold to scrub faster) */
.hero-fast-btn {
  position: absolute;
  bottom: .9rem; right: .9rem;
  z-index: 5;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .75rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .54rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer;
  user-select: none; -webkit-user-select: none;
  transition: color .2s, box-shadow .2s, transform .15s;
}
.hero-fast-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.hero-fast-btn:hover { color: var(--ink); }
.hero-fast-btn.active { color: var(--accent); box-shadow: var(--glass-shadow-hi); transform: scale(.95); }

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  opacity: 0;
  animation: fadeUp .8s 2.8s var(--ease) forwards;
  white-space: nowrap;
}
.scroll-dot {
  width: 6px; height: 6px;
  border-radius: 1px;
  background: var(--accent);
  animation: scrollBounce 1.6s ease-in-out infinite;
}
.hero-scroll-hint span {
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(6px); opacity: .4; }
}

/* ============================================
   SECTION SHARED
   ============================================ */
section {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 7rem var(--pad-x);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  position: relative;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1;
}
.section-title::before {
  content: attr(data-index);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent);
  vertical-align: super;
  margin-right: .8rem;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .85rem;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 1px;
  flex-shrink: 0;
}

/* ============================================
   FILTER PILLS
   ============================================ */
.filter-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.filter-pill {
  position: relative;
  padding: .45rem 1.1rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: rgba(255,255,255,0.45);
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(8px);
  transition: background .25s, color .25s, box-shadow .25s, transform .2s;
}
.filter-pill:hover {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink-4);
  transform: translateY(-1px);
}
.filter-pill.active {
  background: var(--solid);
  color: #fff;
  box-shadow: 0 6px 16px rgba(21,23,28,0.18);
}
.filter-pill.active .pill-count { color: var(--accent); opacity: 1; }

/* ============================================
   PROJECT LIST
   ============================================ */
.project-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.pj-item {
  position: relative;
  display: grid;
  grid-template-columns: 4rem 1fr auto 2.5rem;
  align-items: center;
  gap: 1.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
  cursor: none;
  transition: padding-left .35s var(--ease);
  overflow: visible;
}
.pj-item::before {
  content: '';
  position: absolute;
  left: -1.4rem; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .35s var(--ease);
}
.pj-item:hover { padding-left: .8rem; }
.pj-item:hover::before { transform: scaleY(1); }

.pj-num {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: .05em;
  font-variant-numeric: tabular-nums;
  padding-left: .25rem;
}
.pj-item:hover .pj-num { color: var(--accent); }
.pj-main { min-width: 0; }
.pj-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--ink);
  transition: color .2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pj-title em { font-style: italic; font-weight: 300; color: var(--ink-2); }
.pj-sub {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--ink-3);
  margin-top: .3rem;
  letter-spacing: .03em;
}
.pj-meta {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-shrink: 0;
}
.pj-cat-tag {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: .25rem .7rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.5);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pj-year {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.pj-arrow {
  font-size: 1rem;
  color: var(--ink-3);
  transition: transform .35s var(--ease), color .2s;
  padding-right: .25rem;
}
.pj-item:hover .pj-arrow {
  transform: translate(3px, -3px);
  color: var(--accent);
}
.pj-preview { display: none !important; }
.pj-item.hidden { display: none; }

/* ============================================
   TRUSTED BY STRIP
   ============================================ */
.trusted-strip {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.4rem var(--pad-x);
  display: flex;
  align-items: center;
  gap: 1rem 2.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trusted-label {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: .5rem;
  white-space: nowrap;
}
.trusted-label::before { content: ''; width: 6px; height: 6px; background: var(--accent); border-radius: 1px; }
.trusted-logos { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.trusted-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
  color: var(--ink-3);
  transition: color .25s;
}
.trusted-logo:hover { color: var(--ink); }
.trusted-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-4); flex-shrink: 0; }

/* ============================================
   SERVICES
   ============================================ */
#services { padding-top: 4rem; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.service-card {
  position: relative;
  padding: 2rem 1.8rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: transform .4s var(--ease), box-shadow .4s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--glass-shadow-hi); }
.service-num {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
}
.service-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ink);
  line-height: 1.1;
}
.service-desc {
  font-size: .88rem;
  line-height: 1.6;
  color: var(--ink-2);
  flex: 1;
}
.service-tools {
  font-size: .62rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: .85rem;
  margin-top: .35rem;
  border-top: 1px solid var(--line);
}

/* ============================================
   ABOUT
   ============================================ */
#about { padding-top: 4rem; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.about-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
  margin-bottom: 1.8rem;
  white-space: pre-line;
  color: var(--ink);
}
.about-body p {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--ink-2);
  font-weight: 400;
  margin-bottom: 1rem;
}
.about-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  box-shadow: 0 0 0 1px var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 2rem;
}
.about-meta-item {
  background: var(--bg-2);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.meta-label {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.meta-label::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 1px;
}
.meta-value {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink);
}

/* CV download button */
.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 2rem;
  padding: .85rem 1.5rem;
  border-radius: var(--radius-pill);
  background: var(--solid);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(21,23,28,0.18);
  transition: transform .3s var(--ease), box-shadow .3s, background .3s;
}
.cv-btn::after {
  content: '↓';
  font-size: .95rem;
  transition: transform .3s var(--ease);
}
.cv-btn:hover {
  transform: translateY(-2px);
  background: var(--accent);
  box-shadow: 0 14px 32px rgba(255,59,34,0.28);
}
.cv-btn:hover::after { transform: translateY(2px); }

.about-right {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.about-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 480px;
}
.about-photo-wrap::after {
  content: 'FIG.01 — AKSEL P.';
  position: absolute;
  bottom: .8rem; left: .8rem;
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .1em;
  color: #fff;
  background: rgba(21,23,28,0.55);
  backdrop-filter: blur(6px);
  padding: .25rem .55rem;
  border-radius: 4px;
  z-index: 4;
}
.about-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .7s var(--ease);
}
.about-photo-wrap:hover .about-photo { transform: scale(1.03); }

.about-chips {
  padding: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.chip {
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--ink-2);
  padding: .32rem .8rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.55);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background .2s, color .2s, box-shadow .2s, transform .2s;
}
.chip:hover {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--accent-line);
  transform: translateY(-1px);
}

/* ============================================
   SKILLS MARQUEE
   ============================================ */
.marquee-section {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(12px);
}
.marquee-track {
  padding: 1.2rem 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-inner {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  width: max-content;
  animation: marquee 42s linear infinite;
  white-space: nowrap;
}
.marquee-inner:hover { animation-play-state: paused; }
.marquee-inner span {
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.marquee-inner b {
  color: var(--accent);
  font-weight: 400;
  font-size: .8rem;
  line-height: 1;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================
   CONTACT
   ============================================ */
#contact { padding-top: 2rem; }
.contact-inner {
  position: relative;
  padding: 4rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.contact-title {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin-bottom: 2.5rem;
  white-space: pre-line;
  color: var(--ink);
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: clamp(.9rem, 1.8vw, 1.3rem);
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink-4);
  padding-bottom: .4rem;
  transition: border-color .2s, gap .3s var(--ease), color .2s;
}
.contact-email:hover { border-color: var(--accent); color: var(--accent); gap: 1rem; }
.email-arrow { flex-shrink: 0; transition: transform .35s var(--ease); }
.contact-email:hover .email-arrow { transform: translate(4px, -4px); }

.contact-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.social-link {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 400;
  color: var(--ink-2);
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .2s;
}
.social-link:hover { color: var(--accent); }
.social-link svg { flex-shrink: 0; opacity: .65; transition: opacity .2s; }
.social-link:hover svg { opacity: 1; }

/* Contact form (Netlify Forms) */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  max-width: 480px;
  margin: 1.8rem auto 1.4rem;
  text-align: left;
}
.cf-row { display: flex; gap: .7rem; }
.cf-input {
  flex: 1;
  width: 100%;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  border: none;
  border-radius: var(--radius-sm);
  padding: .75rem .95rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .85rem;
  outline: none;
  transition: box-shadow .2s;
}
.cf-input::placeholder { color: var(--ink-3); }
.cf-input:focus { box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.cf-textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.cf-submit {
  align-self: flex-start;
  margin-top: .2rem;
  padding: .8rem 1.7rem;
  border-radius: var(--radius-pill);
  background: var(--solid);
  color: var(--on-solid);
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s;
}
.cf-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--accent); color: #fff;
  box-shadow: 0 10px 24px rgba(255,59,34,0.28);
}
.cf-submit:disabled { opacity: .5; cursor: default; }
.cf-status {
  font-family: var(--font-mono);
  font-size: .7rem; letter-spacing: .03em;
  min-height: 1rem; margin: 0;
  color: var(--ink-2);
}
.cf-status.ok  { color: var(--ok); }
.cf-status.err { color: var(--accent); }
.contact-or {
  display: block;
  font-family: var(--font-mono);
  font-size: .58rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .55rem;
}

/* Creator — fragrance / TikTok (fun fact about me) */
#creator { padding-top: 4rem; }
.creator-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3.5rem;
  align-items: center;
}
.creator-copy { max-width: 46ch; }
.creator-copy .eyebrow { margin-bottom: .85rem; }
.creator-copy .section-title { margin-bottom: 1.5rem; }
.creator-lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 1.8rem;
}
.creator-stats {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-bottom: 1.9rem;
  flex-wrap: wrap;
}
.cstat { display: flex; flex-direction: column; gap: .3rem; }
.cstat-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cstat-lbl {
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.cstat-sep { width: 1px; height: 2.2rem; background: var(--line); }
.creator-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.6rem;
  border-radius: var(--radius-pill);
  background: var(--solid);
  color: var(--on-solid);
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s;
}
.creator-cta:hover {
  transform: translateY(-2px);
  background: var(--accent); color: #fff;
  box-shadow: 0 10px 24px rgba(255,59,34,0.28);
}
.reel-frame {
  position: relative;
  width: 300px;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0a0c;
  flex-shrink: 0;
}
.reel-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-badge {
  position: absolute;
  top: .7rem; left: .7rem;
  z-index: 4;
  font-size: .56rem;
  letter-spacing: .08em;
  color: #fff;
  background: rgba(21,23,28,0.6);
  backdrop-filter: blur(6px);
  padding: .25rem .55rem;
  border-radius: 4px;
  pointer-events: none;
}

/* Reaction rail — playful, goes nowhere, just delight */
.creator-media { display: flex; align-items: flex-end; gap: .85rem; }
.reel-reactions { display: flex; flex-direction: column; gap: .55rem; padding-bottom: .2rem; }
.reel-react {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.reel-react:hover { transform: scale(1.12) translateY(-2px); box-shadow: var(--glass-shadow-hi); }
.reel-react:active { transform: scale(.9); }
.reel-react.pop { animation: reactPop .4s var(--ease); }
@keyframes reactPop { 0% { transform: scale(1); } 45% { transform: scale(1.38); } 100% { transform: scale(1); } }

/* Fullscreen flying-emoji layer */
#reaction-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9700; overflow: hidden; }
.react-fly {
  position: fixed;
  font-size: 2rem;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  animation: reactFly 2.2s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes reactFly {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  12%  { opacity: 1; transform: translate(-50%, -50%) scale(var(--scale, 1)); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--rise, -300px))) rotate(var(--rot, 0deg)) scale(var(--scale, 1)); }
}

@media (max-width: 600px) {
  .cf-row { flex-direction: column; }
}
@media (max-width: 768px) {
  .creator-grid { grid-template-columns: 1fr; gap: 1.8rem; justify-items: center; }
  .creator-copy { text-align: center; max-width: 100%; }
  .creator-stats { justify-content: center; }
  .creator-media { flex-direction: column; align-items: center; }
  .reel-reactions { flex-direction: row; padding-bottom: 0; }
  .reel-frame { width: min(290px, 78vw); }
}

/* ============================================
   FOOTER
   ============================================ */
#footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem var(--pad-x);
  border-top: 1px solid var(--line);
  max-width: 100%;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(12px);
}
.footer-left { display: flex; flex-direction: column; gap: .2rem; }
.footer-name {
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}
.footer-role, .footer-center, .footer-right {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .04em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}
.modal[aria-hidden="false"] { pointer-events: all; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(233, 231, 225, 0.55);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.modal[aria-hidden="false"] .modal-backdrop { opacity: 1; }

.modal-panel {
  position: relative;
  width: 100%;
  max-height: 94svh;
  border-radius: var(--radius) var(--radius) 0 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  box-shadow: 0 0 0 1px rgba(21,23,28,0.08),
              inset 0 1.5px 0 rgba(255,255,255,1),
              0 -24px 80px rgba(21,23,28,0.18);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .6s var(--ease);
  overflow: hidden;
}
.modal[aria-hidden="false"] .modal-panel { transform: translateY(0); }

.modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.modal-topbar-left { display: flex; align-items: center; gap: 1.2rem; }
.modal-num {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .06em;
  padding: .35rem .7rem;
  border-radius: 6px;
  background: var(--solid);
  white-space: nowrap;
}
.modal-title {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--ink);
}
.modal-subtitle {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--ink-3);
  margin-top: .35rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.modal-close-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(21,23,28,0.05);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  flex-shrink: 0;
  transition: background .2s, color .2s, transform .3s var(--ease);
}
.modal-close-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(90deg);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.modal-gallery {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line);
}
.gallery-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  background:
    linear-gradient(rgba(21,23,28,0.03) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(21,23,28,0.03) 1px, transparent 1px) 0 0 / 22px 22px,
    #f1efea;
}
.gallery-main-img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: opacity .3s ease;
}
.gallery-nav-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(21,23,28,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  transition: background .2s, color .2s, transform .3s var(--ease);
  z-index: 2;
}
.gallery-prev { left: 1rem; }
.gallery-next { right: 1rem; }
.gallery-nav-btn:hover {
  background: var(--solid);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}
.gallery-counter {
  position: absolute;
  bottom: 1rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 400;
  color: var(--ink);
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: .3rem .8rem;
  border-radius: var(--radius-pill);
  display: flex; gap: .3rem;
}
.gallery-sep { color: var(--accent); }

.gallery-thumbs {
  display: flex;
  gap: .5rem;
  padding: .75rem;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-4) transparent;
  background: rgba(21,23,28,0.02);
  border-top: 1px solid var(--line);
}
.gallery-thumb {
  width: 72px; height: 50px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: none;
  box-shadow: 0 0 0 2px transparent;
  transition: box-shadow .2s, transform .2s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-thumb:hover { transform: scale(1.05); }
.gallery-thumb.active { box-shadow: 0 0 0 2px var(--accent); }
.gallery-thumb.active img { transform: scale(1.06); }

.modal-info {
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-4) transparent;
}
.modal-info-cat {
  font-family: var(--font-mono);
  font-size: .64rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.modal-info-cat::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 1px;
}
.modal-desc {
  font-size: .9rem;
  line-height: 1.7;
  color: var(--ink-2);
  font-weight: 400;
}
.modal-info-row {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.modal-info-label {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.modal-tools-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.modal-tool-tag {
  font-family: var(--font-mono);
  font-size: .66rem;
  padding: .28rem .7rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.6);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  font-weight: 400;
}
.modal-year-val {
  font-family: var(--font-mono);
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink);
}
.gallery-main-video {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.thumb-video {
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
}
.thumb-video-icon {
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.thumb-video-icon svg { width: 20px; height: 20px; }

/* 3D model viewer in gallery */
.gallery-main-model {
  width: 100%; height: 100%;
  background: transparent;
  --poster-color: transparent;
}
.gallery-model-hint {
  position: absolute;
  bottom: 1rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: .35rem .85rem;
  border-radius: var(--radius-pill);
  z-index: 3;
  pointer-events: none;
  display: flex; align-items: center; gap: .45rem;
}
.gallery-model-hint::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.thumb-model { position: relative; }
.thumb-model-badge {
  position: absolute;
  bottom: 2px; right: 2px;
  font-family: var(--font-mono);
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff;
  background: var(--accent);
  padding: .08rem .28rem;
  border-radius: 4px;
  pointer-events: none;
}

.modal-visit-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .75rem;
  padding: .6rem 1.2rem;
  border-radius: var(--radius-pill);
  background: var(--solid);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.modal-visit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(21,23,28,0.22);
}

/* Case study (process + outcome) inside the modal */
.modal-case { display: flex; flex-direction: column; gap: 1.4rem; }
.modal-case[hidden] { display: none; }
.case-label {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: .45rem;
  margin-bottom: .75rem;
}
.case-label::before { content: ''; width: 6px; height: 6px; background: var(--accent); border-radius: 1px; }
.case-process { display: flex; flex-direction: column; gap: .85rem; }
.case-step { display: grid; grid-template-columns: 1.5rem 1fr; gap: .55rem; align-items: start; }
.case-step-num {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.45;
}
.case-step-body { display: flex; flex-direction: column; gap: .18rem; }
.case-step-name {
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
}
.case-step-text { font-size: .8rem; line-height: 1.5; color: var(--ink-2); }
.case-outcome {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.case-outcome p { font-size: .82rem; line-height: 1.55; color: var(--ink); font-weight: 500; }

/* ============================================
   SLOT TRIGGER BUTTON (in contact)
   ============================================ */
.slot-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1.8rem;
  padding: .6rem 1.3rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.5);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: box-shadow .2s, color .2s, transform .2s;
}
.slot-trigger-btn:hover {
  box-shadow: inset 0 0 0 1px var(--accent-line);
  color: var(--ink);
  transform: translateY(-1px);
}
.slot-trigger-icon { font-size: 1rem; }

/* ============================================
   SLOT MACHINE MODAL
   ============================================ */
#slot-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
#slot-modal[aria-hidden="false"] { pointer-events: all; opacity: 1; }
.slot-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(233, 231, 225, 0.55);
  backdrop-filter: blur(8px);
}
.slot-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 92vw);
  padding: 2.4rem 2rem 2rem;
  text-align: center;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.92);
  box-shadow: var(--glass-shadow-hi);
  transform: scale(0.94) translateY(12px);
  transition: transform .35s var(--ease);
}
#slot-modal[aria-hidden="false"] .slot-panel { transform: scale(1) translateY(0); }
.slot-close-btn {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(21,23,28,0.05);
  color: var(--ink-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.slot-close-btn:hover { background: var(--accent); color: #fff; }
.slot-eyebrow {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.slot-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
  margin: .4rem 0 .4rem;
  letter-spacing: -.02em;
}
.slot-subtitle {
  font-size: .82rem;
  color: var(--ink-2);
  margin-bottom: 1.8rem;
  line-height: 1.5;
}
.slot-reels-wrap {
  display: flex;
  gap: .75rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}
.slot-reel-col { display: flex; flex-direction: column; align-items: center; }
.slot-reel {
  width: 96px; height: 96px;
  border-radius: var(--radius-md);
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1.5px var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: box-shadow .3s;
}
.slot-reel.spinning { box-shadow: inset 0 0 0 1.5px var(--accent-line), 0 0 16px var(--accent-soft); }
.slot-reel.locked { box-shadow: inset 0 0 0 2px var(--accent), 0 0 22px var(--accent-soft); }
.reel-glyph {
  font-size: 2.6rem;
  line-height: 1;
  transition: filter .08s;
  will-change: transform;
  user-select: none;
}
.slot-reel.spinning .reel-glyph { filter: blur(1.5px); animation: reelShake .12s linear infinite; }
@keyframes reelShake {
  0%,100% { transform: translateY(0); }
  33%  { transform: translateY(-2px); }
  66%  { transform: translateY(2px); }
}
.slot-result {
  min-height: 1.6rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
  margin-bottom: 1.2rem;
  transition: opacity .3s;
}
.slot-result.jackpot  { color: #d9a200; font-size: .95rem; }
.slot-result.triple   { color: var(--ok); }
.slot-result.double   { color: var(--accent); }
.slot-result.miss     { color: var(--ink-3); font-weight: 400; }
.slot-spin-btn {
  width: 100%;
  padding: .9rem;
  border-radius: var(--radius-pill);
  background: var(--solid);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  margin-bottom: .8rem;
}
.slot-spin-btn:hover:not(:disabled) {
  box-shadow: 0 8px 22px rgba(21,23,28,0.24);
  transform: translateY(-1px);
}
.slot-spin-btn:active:not(:disabled) { transform: translateY(0); }
.slot-spin-btn:disabled { opacity: .4; cursor: not-allowed; }
.slot-odds-label {
  font-family: var(--font-mono);
  font-size: .62rem;
  color: var(--ink-3);
  letter-spacing: .04em;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal { opacity: 0; transform: translateY(32px); }

/* ============================================
   EXIT INTENT PANEL
   ============================================ */
#exit-panel {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%) translateY(-110%);
  z-index: 9600;
  transition: transform .45s var(--ease);
  pointer-events: none;
  min-width: 320px;
}
#exit-panel.visible { transform: translateX(-50%) translateY(0); pointer-events: all; }
.exit-inner {
  margin: .75rem;
  padding: 1rem 1.2rem 1rem 1.4rem;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--glass-shadow-hi);
  border-radius: var(--radius-md);
  backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.exit-msg { font-size: .82rem; color: var(--ink-2); flex: 1; line-height: 1.4; }
.exit-msg strong { color: var(--ink); }
.exit-actions { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }
.exit-copy-btn {
  padding: .45rem .9rem;
  border-radius: var(--radius-pill);
  background: var(--solid);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.exit-copy-btn:hover { background: var(--accent); }
.exit-dismiss-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(21,23,28,0.05);
  color: var(--ink-2);
  font-size: .85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.exit-dismiss-btn:hover { background: var(--accent); color: #fff; }

/* ============================================
   AI CHAT BUBBLE
   ============================================ */
#chat-root { position: fixed; bottom: 1.8rem; right: 1.8rem; z-index: 9400; }
.chat-bubble-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--solid);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(21,23,28,0.28);
  transition: background .2s, transform .2s, box-shadow .2s;
  position: relative;
}
.chat-bubble-btn::after {
  content: '';
  position: absolute;
  top: 10px; right: 10px;
  width: 7px; height: 7px;
  background: var(--ok);
  border-radius: 50%;
  border: 1.5px solid #fff;
}
.chat-bubble-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(21,23,28,0.32); }
.chat-bubble-btn.open { background: var(--accent); }

.chat-panel {
  position: absolute;
  bottom: calc(100% + .75rem);
  right: 0;
  width: 320px;
  background: rgba(255,255,255,0.95);
  box-shadow: var(--glass-shadow-hi);
  backdrop-filter: blur(24px) saturate(180%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  opacity: 0;
  transform: scale(0.92) translateY(12px);
  transform-origin: bottom right;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  pointer-events: none;
}
.chat-panel.open { opacity: 1; transform: scale(1) translateY(0); pointer-events: all; }
.chat-header {
  padding: .85rem 1rem;
  display: flex; align-items: center; gap: .6rem;
  border-bottom: 1px solid var(--line);
}
.chat-avatar {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--solid);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: .68rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.chat-header-text { flex: 1; }
.chat-header-name {
  font-family: var(--font-display);
  font-size: .82rem; font-weight: 700; color: var(--ink); display: block;
}
.chat-header-status {
  font-family: var(--font-mono);
  font-size: .62rem; color: var(--ok); display: flex; align-items: center; gap: .3rem;
  text-transform: uppercase; letter-spacing: .06em;
}
.chat-status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); display: inline-block; }
.chat-close-btn {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(21,23,28,0.05);
  color: var(--ink-2); cursor: pointer; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.chat-close-btn:hover { background: var(--accent); color: #fff; }

.chat-messages {
  height: 240px;
  overflow-y: auto;
  padding: .85rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-4) transparent;
}
.chat-msg {
  max-width: 85%;
  padding: .5rem .75rem;
  border-radius: 12px;
  font-size: .78rem;
  line-height: 1.45;
  animation: chatMsgIn .25s var(--ease) both;
}
@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg.bot {
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.chat-msg.user {
  background: var(--solid);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.chat-typing {
  display: flex; gap: 3px; align-items: center;
  padding: .55rem .75rem;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 12px; border-bottom-left-radius: 3px;
  width: fit-content; align-self: flex-start;
}
.chat-typing span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink-3);
  animation: typingDot .9s ease infinite;
}
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot {
  0%,60%,100% { opacity: .3; transform: translateY(0); }
  30%          { opacity: 1;  transform: translateY(-3px); }
}
.chat-suggestions {
  padding: .5rem .75rem .6rem;
  display: flex; flex-wrap: wrap; gap: .35rem;
  border-top: 1px solid var(--line);
}
.chat-chip {
  padding: .3rem .65rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.6);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .64rem;
  cursor: pointer;
  transition: box-shadow .18s, color .18s;
  white-space: nowrap;
}
.chat-chip:hover { box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--ink); }
.chat-input-row {
  padding: .6rem .75rem;
  display: flex; gap: .5rem;
  border-top: 1px solid var(--line);
}
.chat-input {
  flex: 1;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--radius-pill);
  padding: .45rem .85rem;
  color: var(--ink);
  font-size: .78rem;
  font-family: var(--font-sans);
  outline: none;
  transition: box-shadow .2s;
}
.chat-input:focus { box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.chat-input::placeholder { color: var(--ink-3); }
.chat-send-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--solid);
  color: #fff;
  cursor: pointer; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .2s, transform .15s;
}
.chat-send-btn:hover { background: var(--accent); transform: scale(1.08); }

/* ============================================
   NOW PLAYING widget
   ============================================ */
#now-playing {
  position: fixed;
  bottom: 1.8rem; left: 1.8rem;
  z-index: 9400;
}
.np-card {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .45rem .95rem .45rem .45rem;
  border-radius: var(--radius-pill);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  max-width: 250px;
  transition: box-shadow .3s, transform .3s var(--ease);
}
.np-card:hover { transform: translateY(-2px); box-shadow: var(--glass-shadow-hi); }
.np-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--solid);
  color: var(--on-solid);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform .2s, background .2s;
}
.np-toggle:hover { transform: scale(1.07); }
.np-toggle .ic-pause { display: none; }
#now-playing.playing .np-toggle .ic-play  { display: none; }
#now-playing.playing .np-toggle .ic-pause { display: block; }

.np-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 17px;
  flex-shrink: 0;
}
.np-eq span {
  width: 2.5px;
  height: 4px;
  background: var(--accent);
  border-radius: 1px;
}
#now-playing.playing .np-eq span { animation: npEq .9s ease-in-out infinite; }
.np-eq span:nth-child(1) { animation-delay: 0s; }
.np-eq span:nth-child(2) { animation-delay: .18s; }
.np-eq span:nth-child(3) { animation-delay: .36s; }
.np-eq span:nth-child(4) { animation-delay: .12s; }
@keyframes npEq {
  0%, 100% { height: 4px; }
  50%      { height: 15px; }
}

.np-meta { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.np-label {
  font-family: var(--font-mono);
  font-size: .54rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: .35rem;
}
.np-label::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-4);
  transition: background .3s;
}
#now-playing.playing .np-label::before { background: var(--accent); box-shadow: 0 0 6px var(--accent-line); }
.np-track {
  font-family: var(--font-display);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Hidden YouTube audio host — present but out of sight */
#np-yt {
  position: fixed;
  bottom: 0; left: 0;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}
@media (max-width: 768px) {
  #now-playing { bottom: 1.2rem; left: 1.2rem; }
  .np-card { max-width: 200px; }
  .np-track { font-size: .7rem; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   CURSOR-TRACKING PROJECT PREVIEW
   ============================================ */
#project-preview-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 280px; height: 175px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  pointer-events: none;
  z-index: 500;
  opacity: 0;
  transform: scale(0.94);
  will-change: transform, opacity;
  box-shadow: 0 0 0 1px rgba(21,23,28,0.1),
              0 20px 50px rgba(21,23,28,0.22);
}
#project-preview-cursor::after {
  content: '';
  position: absolute;
  top: 8px; right: 8px;
  width: 10px; height: 10px;
  border-top: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
}
#project-preview-cursor img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-line);
  z-index: 10001;
  pointer-events: none;
  transform-origin: left;
  will-change: width;
}

/* ============================================
   FILM GRAIN (subtle paper tactility)
   ============================================ */
#grain {
  position: fixed;
  inset: -30%;
  width: 160%; height: 160%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grain 0.6s steps(1) infinite;
  mix-blend-mode: multiply;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-4%, -5%); }
  40%  { transform: translate(6%, 3%); }
  60%  { transform: translate(-3%, 8%); }
  80%  { transform: translate(8%, -2%); }
  100% { transform: translate(-2%, 4%); }
}

/* ============================================
   FILTER PILL COUNT BADGE
   ============================================ */
.pill-count {
  margin-left: .35rem;
  opacity: .55;
  font-size: .9em;
  font-variant-numeric: tabular-nums;
}

/* ============================================
   ACTIVE NAV LINK
   ============================================ */
.nav-links a.nav-active { color: var(--ink); }
.nav-links a.nav-active::after { width: 100%; }

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--glass-shadow-hi);
  color: var(--ink);
  font-family: var(--font-mono);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  #hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 2rem);
    padding-bottom: 4rem;
    gap: 2.5rem;
  }
  .hero-right { height: 60vw; max-height: 500px; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-photo-wrap { max-height: 360px; aspect-ratio: 4/3; }
}
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .logo-full { display: none; }
  #bg-wrap::after { inset: 8px; }
  .pj-item { grid-template-columns: 3rem 1fr 2rem; gap: 1rem; }
  .pj-meta  { display: none; }
  .pj-title { font-size: clamp(1rem, 5vw, 1.4rem); }
  .services-grid { grid-template-columns: 1fr; }
  #nav .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: .4rem var(--pad-x) 1.1rem;
    background: var(--bg-2);
    box-shadow: 0 16px 34px rgba(21,23,28,0.14);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s var(--ease), transform .28s var(--ease);
  }
  #nav.open .nav-links { opacity: 1; transform: translateY(0); pointer-events: all; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: .95rem .2rem;
    font-size: .9rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line-2);
  }
  .nav-links a::after { display: none; }
  .modal-body { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .modal-gallery { border-right: none; border-bottom: 1px solid var(--line); max-height: 55svh; }
  .modal-info { max-height: 35svh; }
  .contact-inner { padding: 2.5rem 1.5rem; }
  #footer { flex-wrap: wrap; gap: .5rem; }
  .footer-center { order: 3; width: 100%; text-align: center; }
}
@media (max-width: 500px) {
  .hero-name { font-size: clamp(3rem, 14vw, 4.5rem); }
  section { padding: 5rem var(--pad-x); }
}

/* ============================================
   ACCESSIBILITY — skip link + focus
   ============================================ */
:root { color-scheme: light; }
.skip-link {
  position: fixed;
  top: -100px; left: 1rem;
  z-index: 10002;
  background: var(--solid);
  color: var(--on-solid);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .7rem 1.2rem;
  border-radius: var(--radius-pill);
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 1rem; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
/* hide focus ring for mouse users (focus-visible covers keyboard) */
:focus:not(:focus-visible) { outline: none; }

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.nav-actions { display: flex; align-items: center; gap: .55rem; }
.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 19px; height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
#nav.open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
#nav.open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
#theme-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  flex-shrink: 0;
  transition: color .2s, box-shadow .2s, transform .3s var(--ease);
}
#theme-btn:hover { color: var(--ink); transform: rotate(18deg); }
#theme-btn svg { width: 17px; height: 17px; }
#theme-btn .icon-sun { display: none; }
#theme-btn .icon-moon { display: block; }
[data-theme="dark"] #theme-btn .icon-sun { display: block; }
[data-theme="dark"] #theme-btn .icon-moon { display: none; }

/* ============================================
   DARK THEME — "Mecha Liquid Glass / Night"
   ============================================ */
[data-theme="dark"] {
  color-scheme: dark;
  --bg:           #0e0f12;
  --bg-2:         #16181d;
  --panel:        #1a1c22;
  --ink:          #f3f3f5;
  --ink-2:        rgba(243, 243, 245, 0.62);
  --ink-3:        rgba(243, 243, 245, 0.40);
  --ink-4:        rgba(243, 243, 245, 0.20);
  --line:         rgba(243, 243, 245, 0.12);
  --line-2:       rgba(243, 243, 245, 0.07);
  --solid:        #f3f3f5;
  --on-solid:     #15171c;
  --glass-bg:        linear-gradient(160deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  --glass-bg-strong: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  --glass-shadow: 0 0 0 1px rgba(255,255,255,0.08),
                  inset 0 1px 0 rgba(255,255,255,0.10),
                  0 12px 36px rgba(0,0,0,0.5),
                  0 2px 8px rgba(0,0,0,0.3);
  --glass-shadow-hi: 0 0 0 1px rgba(255,255,255,0.12),
                  inset 0 1px 0 rgba(255,255,255,0.14),
                  0 20px 50px rgba(0,0,0,0.6),
                  0 4px 12px rgba(0,0,0,0.35);
}

/* Background — light blueprint grid on deep graphite */
[data-theme="dark"] #bg-wrap {
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px) 0 0 / 150px 150px,
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px) 0 0 / 150px 150px,
    radial-gradient(120% 90% at 25% 0%, #14161b 0%, #0e0f12 55%, #0b0c0e 100%);
}
[data-theme="dark"] #bg-wrap::after { border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .orb-2 { background: radial-gradient(circle, rgba(255,90,40,0.07) 0%, transparent 70%); }
[data-theme="dark"] .orb-4 { background: radial-gradient(circle, rgba(120,140,255,0.05) 0%, transparent 70%); }
[data-theme="dark"] #grain { mix-blend-mode: screen; opacity: 0.03; }

/* Custom cursor reticle → corners use currentColor (auto-flips); soften the glow */
[data-theme="dark"] .cur-corner { filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5)); }

/* Solid (inverted) buttons need dark text once the surface flips to light */
[data-theme="dark"] .logo-initials,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .filter-pill.active,
[data-theme="dark"] .modal-num,
[data-theme="dark"] .modal-visit-btn,
[data-theme="dark"] .slot-spin-btn,
[data-theme="dark"] .exit-copy-btn,
[data-theme="dark"] .cv-btn,
[data-theme="dark"] .chat-bubble-btn,
[data-theme="dark"] .chat-avatar,
[data-theme="dark"] .chat-msg.user,
[data-theme="dark"] .chat-send-btn,
[data-theme="dark"] .gallery-nav-btn:hover { color: var(--on-solid); }
[data-theme="dark"] .cv-btn:hover,
[data-theme="dark"] .chat-send-btn:hover,
[data-theme="dark"] .chat-bubble-btn.open { color: #fff; }

/* Subtle white tints → subtle light tints on dark */
[data-theme="dark"] .filter-pill,
[data-theme="dark"] .pj-cat-tag,
[data-theme="dark"] .chip,
[data-theme="dark"] .modal-tool-tag,
[data-theme="dark"] .chat-chip,
[data-theme="dark"] .slot-trigger-btn { background: rgba(255,255,255,0.05); }
[data-theme="dark"] .filter-pill.active { background: var(--solid); color: var(--on-solid); }
[data-theme="dark"] .marquee-section,
[data-theme="dark"] #footer { background: rgba(255,255,255,0.03); }
[data-theme="dark"] #nav.scrolled {
  background: rgba(14,15,18,0.72);
  box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(0,0,0,0.45);
}
[data-theme="dark"] .modal-close-btn,
[data-theme="dark"] .slot-close-btn,
[data-theme="dark"] .chat-close-btn,
[data-theme="dark"] .exit-dismiss-btn { background: rgba(255,255,255,0.07); }

/* Modal + overlays → dark frosted panels */
[data-theme="dark"] .modal-panel {
  background: rgba(22,24,29,0.92);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08),
              inset 0 1.5px 0 rgba(255,255,255,0.08),
              0 -24px 80px rgba(0,0,0,0.6);
}
[data-theme="dark"] .modal-backdrop,
[data-theme="dark"] .slot-backdrop { background: rgba(8,9,11,0.62); }
[data-theme="dark"] .gallery-stage {
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 22px 22px,
    #14151a;
}
[data-theme="dark"] .gallery-nav-btn,
[data-theme="dark"] .gallery-counter { background: rgba(30,32,38,0.82); }
[data-theme="dark"] .gallery-thumbs { background: rgba(255,255,255,0.02); }
[data-theme="dark"] .slot-panel { background: rgba(22,24,29,0.94); }
[data-theme="dark"] .exit-inner { background: rgba(22,24,29,0.94); }
[data-theme="dark"] .chat-panel { background: rgba(20,22,27,0.96); }
[data-theme="dark"] .toast { background: rgba(22,24,29,0.92); }
[data-theme="dark"] .gallery-main-model { --poster-color: transparent; }
[data-theme="dark"] .gallery-model-hint { background: rgba(30,32,38,0.85); }

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto !important; }
  #grain { display: none !important; }
  .orb { display: none !important; }
  .hero-gallery, .marquee-inner { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
