/* ============================================================================
   VIKRAM.SH — Editorial Dark Portfolio
   Accent pulled from cat's eye in the frames (#8B5CF6)
   No terminal tropes. No hacker clichés. Just the work.
   ============================================================================ */

:root {
  --bg:      #090909;
  --surface: #111111;
  --ink:     #FAFAFA;
  --muted:   #D6D6DB;
  --faint:   #909098;
  --line:    rgba(242,242,242,0.08);

  /* ONE accent — the cat's purple eye */
  --accent:      #8B5CF6;
  --accent-dim:  rgba(139,92,246,0.12);
  --accent-glow: rgba(139,92,246,0.30);

  --sev-crit: #FF3B3B;
  --sev-high: #FF7A00;
  --sev-med:  #FFD600;
  --sev-low:  #4AF626;

  --mono:  "IBM Plex Mono", ui-monospace, monospace;
  --disp:  "Space Grotesk", system-ui, sans-serif;

  --gutter: clamp(24px, 6vw, 80px);
  --maxw:   1280px;

  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Emil Kowalski curves — stronger than the CSS defaults */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);    /* punchy ease-out for entrances/feedback */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);   /* on-screen movement */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);    /* iOS drawer feel */
}

/* LIGHT THEME */
html[data-theme="light"] {
  --bg:      #F4F2EE;
  --surface: #ECEAE6;
  --ink:     #0A0A0A;
  --muted:   #666666;
  --faint:   #CCCCCC;
  --line:    rgba(10,10,10,0.10);
  --accent:  #6D28D9;
  --accent-dim:  rgba(109,40,217,0.10);
  --accent-glow: rgba(109,40,217,0.22);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--disp);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}
body.touch { cursor: auto; }
@media (hover: none) { body { cursor: auto; } }

/* ── LOADING SCREEN ── */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: all;
  user-select: none;
}
#loader.done { pointer-events: none; }

/* two dark panels that split apart on reveal */
.l-panel {
  position: absolute; left: 0; right: 0; height: 50%;
  background: #090909;
  transition: transform 1.1s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
  z-index: 2;
}
html[data-theme="light"] .l-panel { background: #F4F2EE; }
.l-top { top: 0; transform-origin: top; }
.l-bot { bottom: 0; transform-origin: bottom; }
#loader.done .l-top { transform: translateY(-101%); }
#loader.done .l-bot { transform: translateY(101%); }

/* content layer — in front of panels */
.l-content {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center;
  padding: clamp(40px, 8vw, 96px);
  transition: opacity 0.25s ease;
  pointer-events: none;
}
#loader.done .l-content { opacity: 0; }

/* scanline texture over loader */
.l-content::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0px, transparent 2px, rgba(0,0,0,0.07) 2px, rgba(0,0,0,0.07) 4px);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .l-content::after { display: none; } }

/* top strip */
.l-strip {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(139,92,246,0.7);
  margin-bottom: clamp(48px, 8vh, 80px);
  position: relative; z-index: 1;
}
.l-brand { font-weight: 500; }
.l-time  { letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }

/* big name */
.l-main { position: relative; z-index: 1; margin-bottom: clamp(28px, 5vh, 48px); }

.l-name {
  font-family: var(--disp);
  font-size: clamp(64px, 17vw, 200px);
  font-weight: 800; letter-spacing: -0.055em; text-transform: uppercase;
  line-height: 0.86;
  color: #F2F2F2;
  position: relative;
  /* glitch flicker */
  animation: l-glitch 5s steps(1) infinite;
}
html[data-theme="light"] .l-name { color: #0A0A0A; }

@keyframes l-glitch {
  0%, 88%, 100% { text-shadow: none; clip-path: none; transform: none; }
  90% { text-shadow: -3px 0 #8B5CF6, 3px 0 #FF3B3B; transform: skewX(-1deg); }
  92% { text-shadow: 3px 0 #8B5CF6; clip-path: inset(20% 0 60% 0); transform: translate(2px); }
  94% { text-shadow: none; clip-path: none; transform: none; }
  96% { text-shadow: -2px 0 #FF3B3B; clip-path: inset(60% 0 20% 0); transform: translate(-1px); }
  98% { text-shadow: none; clip-path: none; transform: skewX(0.5deg); }
}
@media (prefers-reduced-motion: reduce) { .l-name { animation: none; } }

.l-tagline {
  font-family: var(--disp); font-size: clamp(16px, 2.2vw, 26px); font-weight: 400;
  color: rgba(242,242,242,0.4); line-height: 1.3;
  margin-top: 20px;
}
html[data-theme="light"] .l-tagline { color: rgba(10,10,10,0.4); }

/* cycling status text */
.l-status-wrap {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  color: rgba(139,92,246,0.9);
  margin-bottom: 20px;
  position: relative; z-index: 1;
  min-height: 16px;
}
.l-cursor {
  animation: l-blink 1s steps(1) infinite;
  font-size: 10px;
}
@keyframes l-blink { 50% { opacity: 0; } }
.l-status { transition: opacity 0.3s ease; }
.l-status.fade { opacity: 0; }

/* progress bar */
.l-progress-outer {
  width: clamp(200px, 45vw, 480px); height: 1px;
  background: rgba(139,92,246,0.15);
  overflow: visible; margin-bottom: 12px;
  position: relative; z-index: 1;
}
.l-progress-bar {
  height: 100%; width: 0%;
  background: #8B5CF6;
  box-shadow: 0 0 12px rgba(139,92,246,0.8), 0 0 24px rgba(139,92,246,0.4);
  transition: none; /* animated via rAF lerp in JS for true glide */
  position: relative;
}
.l-progress-bar::after {
  content: ''; position: absolute; right: 0; top: -3px;
  width: 6px; height: 6px; border-radius: 50%;
  background: #8B5CF6; box-shadow: 0 0 8px #8B5CF6;
}

/* meta counter */
.l-meta {
  display: flex; align-items: center; gap: 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: rgba(242,242,242,0.3);
  position: relative; z-index: 1;
}
html[data-theme="light"] .l-meta { color: rgba(10,10,10,0.3); }
#l-frames { color: rgba(242,242,242,0.7); font-variant-numeric: tabular-nums; }
html[data-theme="light"] #l-frames { color: rgba(10,10,10,0.7); }
.l-meta-sep { margin: 0 12px 0 2px; }
.l-pct { color: #8B5CF6; font-weight: 600; }

/* corner brackets */
.l-corner {
  position: absolute; width: 20px; height: 20px;
  border: 1.5px solid rgba(139,92,246,0.5);
  z-index: 1;
}
.lc-tl { top: 24px; left: 24px; border-right: 0; border-bottom: 0; }
.lc-tr { top: 24px; right: 24px; border-left: 0; border-bottom: 0; }
.lc-bl { bottom: 24px; left: 24px; border-right: 0; border-top: 0; }
.lc-br { bottom: 24px; right: 24px; border-left: 0; border-top: 0; }

::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }

/* ── FRAME CANVAS ── */
#frame-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
  display: block;
}

/* frame counter — tiny, bottom right */
#frame-counter {
  position: fixed; bottom: 20px; right: var(--gutter);
  z-index: 900; pointer-events: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  color: var(--muted);
  display: flex; align-items: center; gap: 4px;
  opacity: 0; transition: opacity 0.5s;
}
#frame-counter.visible { opacity: 1; }
.fc-sep { opacity: 0.4; }
.fc-bar { width: 32px; height: 1px; background: var(--line); overflow: hidden; margin-left: 6px; }
#fc-fill { display: block; height: 100%; width: 0%; background: var(--accent); transition: width 0.06s linear; }
@media (max-width: 600px) { #frame-counter { display: none; } }

/* loading */
#frame-loading {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 900; pointer-events: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--accent);
  border: 1px solid var(--accent-dim); background: rgba(9,9,9,0.9);
  padding: 4px 10px; white-space: nowrap;
  transition: opacity 0.4s;
}
html[data-theme="light"] #frame-loading { background: rgba(244,242,238,0.9); }
#frame-loading.hidden { opacity: 0; }

/* ── CURSOR ── */
#reticle {
  position: fixed; top: 0; left: 0;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  z-index: 9999; pointer-events: none;
  will-change: transform;
}
#reticle img {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; object-position: center top;
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  filter: grayscale(15%) contrast(1.05);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
#reticle.hot img { transform: scale(1.18); box-shadow: 0 0 22px var(--accent-glow); }
body.touch #reticle { display: none; }
@media (hover: none) { #reticle { display: none; } }

/* ── NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 800;
  padding: 20px var(--gutter);
  transition: background 0.3s, backdrop-filter 0.3s;
}
#nav.scrolled {
  background: rgba(9,9,9,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
html[data-theme="light"] #nav.scrolled {
  background: rgba(244,242,238,0.88);
}

.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-brand {
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.12em; color: var(--ink);
  transition: color 0.2s;
}
.nav-brand:hover { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 32px;
}
.nav-link {
  font-family: var(--disp); font-size: 14px; font-weight: 500;
  color: var(--muted); letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.2s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }

#theme-toggle {
  background: none; border: 1px solid var(--line); cursor: none;
  padding: 6px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); border-radius: 6px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
#theme-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
#theme-toggle svg { width: 14px; height: 14px; }

/* ── India (IST) live clock ── */
.ist-clock {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(242,242,242,0.03);
  white-space: nowrap; user-select: none;
  transition: border-color 0.2s, background 0.2s;
}
.ist-clock:hover { border-color: var(--accent); background: var(--accent-dim); }
.ist-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 7px var(--accent-glow);
  animation: ist-pulse 2.4s ease-in-out infinite;
}
@keyframes ist-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.7); }
}
.ist-time { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 500; }
.ist-zone { color: var(--accent); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .ist-dot { animation: none; } }
@media (max-width: 640px) { .ist-clock { display: none; } }

#nav-hamburger {
  display: none; background: none; border: none; cursor: none;
  flex-direction: column; gap: 5px; padding: 4px;
}
#nav-hamburger span {
  display: block; width: 22px; height: 1.5px; background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.25s;
}
#nav-hamburger.open span:first-child { transform: translateY(6.5px) rotate(45deg); }
#nav-hamburger.open span:last-child  { transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 720px) {
  .nav-links { display: none; }
  #nav-hamburger { display: flex; }
}

#nav-mobile {
  display: none; flex-direction: column; gap: 0;
  padding: 20px 0 12px;
  border-top: 1px solid var(--line); margin-top: 16px;
}
#nav-mobile.open { display: flex; }
.nav-mobile-link {
  font-size: 22px; font-weight: 600; padding: 10px 0;
  color: var(--ink); border-bottom: 1px solid var(--line);
  transition: color 0.2s, padding-left 0.2s;
}
.nav-mobile-link:hover { color: var(--accent); padding-left: 8px; }

/* ── LAYOUT ── */
main { position: relative; z-index: 5; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* reveal on scroll */
.rv {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 0.08s; }
.rv.d2 { transition-delay: 0.16s; }
.rv.d3 { transition-delay: 0.24s; }
.rv.d4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1 !important; transform: none !important; } }

/* ── HERO ── */
#hero {
  min-height: 100dvh;
  display: flex; align-items: flex-end;
  padding: 0 var(--gutter) clamp(60px, 10vh, 100px);
  position: relative;
}
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; }

/* subtle gradient so text reads over frames */
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(9,9,9,0.72) 0%,
    rgba(9,9,9,0.30) 55%,
    transparent 100%
  );
  pointer-events: none;
}
html[data-theme="light"] #hero::before {
  background: linear-gradient(to right, rgba(244,242,238,0.65) 0%, rgba(244,242,238,0.25) 55%, transparent 100%);
}

.hero-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
}

/* THE name — massive, confident, no gimmicks */
.hero-name {
  font-size: clamp(72px, 18vw, 200px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 32px;
}
.name-line { display: block; }

.hero-sub {
  font-size: clamp(18px, 2.2vw, 26px); font-weight: 400;
  color: var(--muted); max-width: 36ch;
  margin-bottom: 36px; line-height: 1.4; text-wrap: balance;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.btn-primary {
  font-family: var(--disp); font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  background: var(--accent); color: #fff;
  padding: 13px 28px; cursor: none;
  display: inline-flex; align-items: center; gap: 8px;
  /* Emil: name exact properties, never `all`; feedback under 160ms */
  transition: background 200ms var(--ease-out), transform 140ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #7C3AED; transform: translateY(-2px); box-shadow: 0 8px 28px var(--accent-glow); }
}
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  font-family: var(--disp); font-size: 14px; font-weight: 500;
  color: var(--muted); border: 1px solid var(--line);
  padding: 12px 28px; cursor: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 140ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover { color: var(--ink); border-color: var(--muted); transform: translateY(-2px); }
}
.btn-ghost:active { transform: scale(0.97); }

/* ── COPY-EMAIL BUTTON (Emil: state indication via morph + blur mask) ── */
.btn-copy {
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  padding: 12px 20px; cursor: none;
  display: inline-flex; align-items: center; gap: 10px;
  position: relative; overflow: hidden;
  transition: border-color 200ms var(--ease-out), transform 140ms var(--ease-out), background 200ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-copy:hover { border-color: var(--accent); background: var(--accent-dim); }
}
.btn-copy:active { transform: scale(0.97); }
/* the label crossfades+blurs between states — Emil's blur-to-mask trick */
.btn-copy .copy-label {
  display: inline-flex; align-items: center; gap: 8px;
  transition: filter 200ms ease, opacity 200ms ease, transform 200ms var(--ease-out);
}
.btn-copy.copied .copy-label { filter: blur(3px); opacity: 0; transform: translateY(-4px); }
.btn-copy .copied-label {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, calc(-50% + 6px));
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 600;
  opacity: 0; filter: blur(3px);
  transition: filter 200ms ease, opacity 200ms ease, transform 200ms var(--ease-out);
  pointer-events: none; white-space: nowrap;
}
.btn-copy.copied .copied-label { opacity: 1; filter: blur(0); transform: translate(-50%, -50%); }
.btn-copy svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── BACK TO TOP (Emil: scale from 0.9 not 0, ease-out, fast) ── */
#to-top {
  position: fixed; bottom: 20px; left: var(--gutter);
  z-index: 850;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); cursor: none;
  opacity: 0; transform: scale(0.9) translateY(8px);
  pointer-events: none;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out),
              color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
#to-top.show { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  #to-top:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
}
#to-top:active { transform: scale(0.92); }
#to-top svg { width: 16px; height: 16px; }
@media (max-width: 600px) { #to-top { left: auto; right: 20px; } }
@media (prefers-reduced-motion: reduce) {
  #to-top { transition: opacity 200ms ease; transform: none; }
  #to-top.show { transform: none; }
}

/* ── project link buttons (Emil: pressable, scale feedback) ── */
.proj-btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line);
  padding: 6px 12px; cursor: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out),
              background 180ms var(--ease-out), transform 120ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .proj-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
}
.proj-btn:active { transform: scale(0.96); }
.proj-btn svg { width: 11px; height: 11px; }

/* ── findings "view all" button ── */
.findings-more {
  display: flex; justify-content: center; margin-top: 36px;
}
.btn-outline {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--line);
  padding: 12px 26px; cursor: none;
  display: inline-flex; align-items: center; gap: 10px;
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out),
              background 200ms var(--ease-out), transform 140ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
  .btn-outline:hover .btn-arrow { transform: translateX(3px); }
}
.btn-outline:active { transform: scale(0.97); }
.btn-arrow { display: inline-block; transition: transform 200ms var(--ease-out); }

/* 3 key stats — functional, horizontal */
.hero-stats {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-n { font-family: var(--disp); font-size: clamp(22px, 3vw, 32px); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.stat-l { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stat-divider { width: 1px; height: 36px; background: var(--line); }

/* ── ORIGIN — two-column editorial ── */
.section-origin {
  padding: clamp(80px, 14vh, 160px) 0;
  background: transparent;
}
.origin-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
@media (max-width: 780px) { .origin-grid { grid-template-columns: 1fr; } }

.origin-title {
  font-size: clamp(40px, 7vw, 88px); font-weight: 800;
  line-height: 0.9; letter-spacing: -0.04em; text-transform: uppercase;
  margin-bottom: 28px;
  /* sticky on desktop so it pins while timeline scrolls */
  position: sticky; top: 100px;
}
.origin-lede {
  font-size: clamp(17px, 1.8vw, 21px); color: var(--muted);
  line-height: 1.55; text-wrap: pretty; max-width: 44ch;
}

/* timeline */
.olog { display: grid; gap: 0; }
.olog-item { display: contents; }

/* make it look different — each entry is its own row */
.olog-row {
  display: grid; grid-template-columns: 64px 1fr;
  gap: 20px; padding: 28px 0;
  border-top: 1px solid var(--line);
}
.olog-row:last-child { border-bottom: 1px solid var(--line); }
.olog-t { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.08em; padding-top: 4px; }
.olog-h { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.08em; }
.olog-b { font-size: 14px; color: var(--muted); line-height: 1.65; max-width: 52ch; }

/* ── FINDINGS ── */
.section-findings { padding: clamp(80px, 14vh, 160px) 0; }

.findings-header {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 4vw, 60px); align-items: end;
  margin-bottom: 48px;
}
@media (max-width: 700px) { .findings-header { grid-template-columns: 1fr; } }

.findings-title {
  font-size: clamp(38px, 6.5vw, 80px); font-weight: 800;
  line-height: 0.92; letter-spacing: -0.04em; text-transform: uppercase;
}
.findings-meta { padding-bottom: 4px; }
.findings-desc { font-size: 14px; color: var(--muted); max-width: 38ch; line-height: 1.6; margin-bottom: 24px; }
.bounty-num {
  display: flex; align-items: baseline; gap: 8px;
}
.bounty-num span:first-child { font-size: clamp(28px, 4vw, 48px); font-weight: 800; letter-spacing: -0.03em; color: var(--accent); }
.bounty-label { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }

/* findings list */
.findings-list { border-top: 1px solid var(--line); }
.finding {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 20px; align-items: start;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  cursor: none;
  transition: background 0.15s, padding-left 0.15s;
}
.finding:hover { padding-left: 12px; }
.sev-badge {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 7px; border: 1px solid currentColor; white-space: nowrap; line-height: 1.5;
}
.sev-critical { color: var(--sev-crit); }
.sev-high     { color: var(--sev-high); }
.sev-medium   { color: var(--sev-med); }
.sev-low      { color: var(--sev-low); }
.f-title { font-size: clamp(15px, 1.7vw, 19px); font-weight: 500; color: var(--ink); letter-spacing: -0.01em; }
.f-meta { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-top: 5px; display: flex; gap: 12px; flex-wrap: wrap; letter-spacing: 0.04em; }
.f-meta .type { color: var(--ink); font-weight: 500; }
.f-note { font-size: 13px; color: var(--muted); max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease), margin-top 0.4s; line-height: 1.65; }
.finding.open .f-note { max-height: 120px; margin-top: 10px; }
@media (max-width: 580px) {
  .finding { grid-template-columns: auto 1fr; }
}

.platforms { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 24px; }
.platforms .p { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--line); color: var(--muted); transition: color 0.2s, border-color 0.2s; }
.platforms .p:hover { color: var(--ink); border-color: var(--faint); }

/* ── PROJECTS — cards slide in from the right on scroll ── */
.section-projects { padding: clamp(80px, 14vh, 160px) 0; position: relative; }

.projects-title {
  font-size: clamp(40px, 8.5vw, 124px); font-weight: 800;
  line-height: 0.84; letter-spacing: -0.045em; text-transform: uppercase;
  color: var(--ink);
  margin-bottom: clamp(40px, 7vh, 90px);
}

.proj-cards { display: flex; flex-direction: column; gap: clamp(22px, 4vh, 44px); }

.pcard {
  width: min(720px, 100%);
  opacity: 0;
  transform: translateX(clamp(80px, 16vw, 240px));
  transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
/* every other card aligns right so the slide-from-right reads clearly */
.pcard:nth-child(even) { align-self: flex-end; }
.pcard.in { opacity: 1; transform: translateX(0); }

.pcard-inner {
  position: relative;
  border: 1px solid rgba(242,242,242,0.32);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 60px);
  background: linear-gradient(180deg, rgba(17,17,17,0.78), rgba(9,9,9,0.55));
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  box-shadow: 0 0 70px rgba(139,92,246,0.12), inset 0 0 40px rgba(0,0,0,0.45);
  min-height: clamp(220px, 30vh, 320px);
  display: flex; flex-direction: column;
}

/* corner brackets — recon framing */
.pc-corner { position: absolute; width: 18px; height: 18px; border: 1.5px solid var(--accent); }
.pc-corner.tl { top: -1px; left: -1px;  border-right: 0; border-bottom: 0; }
.pc-corner.tr { top: -1px; right: -1px; border-left: 0;  border-bottom: 0; }
.pc-corner.bl { bottom: -1px; left: -1px;  border-right: 0; border-top: 0; }
.pc-corner.br { bottom: -1px; right: -1px; border-left: 0;  border-top: 0; }

.pc-index { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; color: var(--accent); margin-bottom: 18px; }
.pc-name { font-size: clamp(26px, 3.8vw, 48px); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); line-height: 1.0; text-transform: uppercase; }
.pc-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 12px 0 20px; }
.pc-desc { font-size: clamp(13px, 1.3vw, 15px); color: var(--muted); line-height: 1.72; max-width: 54ch; }
.pc-coords { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--faint); margin-top: auto; padding-top: 22px; align-self: flex-end; }

@media (max-width: 760px) {
  .pcard, .pcard:nth-child(even) { width: 100%; align-self: stretch; }
}

/* reduced motion → no slide, just show the cards */
@media (prefers-reduced-motion: reduce) {
  .pcard { opacity: 1; transform: none; transition: none; }
}

/* ── pc-gh — GitHub link on each project card ── */
.pc-gh {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); text-decoration: none;
  margin-top: 20px; align-self: flex-start;
  border-bottom: 1px solid rgba(139,92,246,0.3);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.pc-gh:hover { color: var(--ink); border-color: var(--ink); }
.pc-gh svg  { width: 11px; height: 11px; }

/* ── proj-more — "explore all" row ── */
.proj-more { margin-top: clamp(36px, 6vh, 64px); }

.btn-spiral {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); background: transparent;
  border: 1px solid rgba(139,92,246,0.45);
  padding: 14px 30px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.25s, background 0.2s;
  position: relative; overflow: hidden;
}
.btn-spiral::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(139,92,246,0.18) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.btn-spiral:hover {
  color: #e2d9ff; border-color: rgba(139,92,246,0.9);
  box-shadow: 0 0 30px rgba(139,92,246,0.28), inset 0 0 20px rgba(139,92,246,0.06);
}
.btn-spiral:hover::after { opacity: 1; }
.btn-spiral:active { transform: scale(0.97); }

/* ── SPIRAL MODAL — full-screen 3-D orbit viewer ── */
#spiral-modal {
  position: fixed; inset: 0; z-index: 9000;
  background: radial-gradient(ellipse at 50% 44%, #07061a 0%, #020209 100%);
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.23,1,0.32,1);
}
#spiral-modal.open { opacity: 1; pointer-events: all; }

.spiral-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px;
  padding: 16px 28px;
  background: rgba(5,4,16,0.72);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(139,92,246,0.12);
}
.spiral-title {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(180,150,255,0.9);
}
.spiral-hint {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--muted); opacity: 0.38; margin-left: auto;
}
.spiral-close {
  background: none;
  border: 1px solid rgba(139,92,246,0.25);
  color: rgba(180,150,255,0.6);
  padding: 5px 14px; cursor: pointer;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  border-radius: 2px;
}
.spiral-close:hover {
  color: #e2d9ff; border-color: var(--accent);
  background: rgba(139,92,246,0.08);
}

#spiral-canvas { position: absolute; inset: 0; cursor: grab; display: block; }
#spiral-canvas:active { cursor: grabbing; }

#spiral-tip {
  position: fixed; pointer-events: none; z-index: 9010;
  background: rgba(6,5,18,0.94);
  border: 1px solid rgba(139,92,246,0.32);
  border-radius: 3px;
  padding: 10px 16px; display: none;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  min-width: 150px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(139,92,246,0.08);
}
.stip-name {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: #e8dcff;
}
.stip-tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(180,150,255,0.75); margin-top: 5px;
}

/* ── OTHER BUILDS — compact chip grid in the about/human section ── */
.other-builds { margin-top: clamp(28px, 4vh, 48px); }
.other-builds-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 14px;
}
.other-builds-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.obuild {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); padding: 5px 12px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.obuild:hover { color: var(--accent); border-color: var(--accent); }

/* ── CREDENTIALS — infinite marquee ── */
.section-creds {
  padding: clamp(48px, 8vh, 96px) 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.creds-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); padding: 0 var(--gutter); margin-bottom: 24px;
}
.creds-marquee-wrap { position: relative; }
.creds-marquee-wrap::before,
.creds-marquee-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 2; pointer-events: none;
}
.creds-marquee-wrap::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.creds-marquee-wrap::after  { right: 0; background: linear-gradient(to left, var(--bg), transparent); }

.creds-marquee {
  display: flex; gap: 0; white-space: nowrap;
  animation: marquee 28s linear infinite;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .creds-marquee { animation-play-state: paused; } }

.cred-item {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 32px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.cred-k { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; }
.cred-v { font-size: 13px; color: var(--ink); max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.cred-meta { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.08em; }

/* ── HUMAN ── */
.section-human { padding: clamp(80px, 14vh, 160px) 0; }
.human-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 760px) { .human-grid { grid-template-columns: 1fr; } }

.portrait {
  aspect-ratio: 4/5; border: 1px solid var(--line);
  position: relative; overflow: hidden;
  background: repeating-linear-gradient(135deg, #141414 0 8px, #111 8px 16px);
}
.portrait .portrait-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait .ph-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; text-align: center; }
.portrait .ph-corner { position: absolute; width: 12px; height: 12px; border: 1px solid var(--accent); }
.portrait .ph-corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.portrait .ph-corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.portrait .ph-corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.portrait .ph-corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

.human-statement { font-size: clamp(18px, 2.4vw, 26px); font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 36px; text-wrap: balance; }
.facets { display: grid; gap: 0; border-top: 1px solid var(--line); }
.facet { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); transition: background 0.15s; }
.facet:hover { background: var(--surface); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
@media (max-width: 480px) { .facet { grid-template-columns: 1fr; gap: 4px; } }
.facet-k { font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; padding-top: 3px; }
.facet-v { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ── CONTACT ── */
.section-contact { padding: clamp(80px, 16vh, 180px) 0; }
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(40px, 6vw, 80px); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-title {
  font-size: clamp(42px, 7.5vw, 96px); font-weight: 800;
  line-height: 0.9; letter-spacing: -0.04em; text-transform: uppercase;
  margin-bottom: 16px;
}
.contact-sub { font-size: 14px; color: var(--muted); max-width: 36ch; line-height: 1.6; margin-bottom: 28px; }
.contact-email {
  font-family: var(--mono); font-size: clamp(13px, 1.6vw, 18px); color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(139,92,246,0.25);
  padding-bottom: 4px;
  transition: gap 0.2s, border-color 0.2s;
}
.contact-email:hover { gap: 14px; border-color: var(--accent); }
.contact-actions { margin-top: 24px; }

.goals-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.goals { list-style: none; counter-reset: g; border-top: 1px solid var(--line); }
.goals li {
  counter-increment: g; padding: 14px 0; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
  font-size: 14px; color: var(--muted); line-height: 1.6;
}
.goals li::before { content: "0" counter(g); font-family: var(--mono); font-size: 9px; color: var(--accent); padding-top: 4px; letter-spacing: 0.08em; }

/* socials */
.socials { display: grid; gap: 0; border-top: 1px solid var(--line); margin-top: 32px; }
.social { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); transition: color 0.15s; }
.social:hover .sh { color: var(--accent); }
.social .sk { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.social .sh { font-size: 13px; color: var(--muted); transition: color 0.15s; }
.social-ico { width: 10px; height: 10px; flex-shrink: 0; opacity: 0.5; }
.social:hover .social-ico { opacity: 1; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--line);
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.08em;
  position: relative; z-index: 5;
}
.footer-mid { color: var(--faint); }
.accent-dot { color: var(--accent); }
