/* ══════════════════════════════════════════════════
   NERV // MAGI TERMINAL — style.css  v4
   ══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #040404;
  --deep:    #080808;
  --card:    #0d0d0d;
  --b1:      #1a1a1a;
  --b2:      #222;
  --b3:      #2e2e2e;
  --muted:   #686868;
  --dim:     #888;
  --light:   #b0b0b0;
  --paper:   #d8d8d8;
  --white:   #f2f2f2;
  --hi:      #e8e8e8;
  --mono:    'Share Tech Mono', monospace;
  --body:    'IBM Plex Mono', monospace;
}

html { overflow-x: hidden; scroll-behavior: auto; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

/* ── SCANLINES ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 3px,
    rgba(0,0,0,.055) 3px, rgba(0,0,0,.055) 4px
  );
  pointer-events: none; z-index: 9999;
}

/* ── VIGNETTE ── */
body::after {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.7) 100%);
  pointer-events: none; z-index: 9998;
}

/* ══════════════════════════════════════════════════
   CUSTOM CURSOR
   ══════════════════════════════════════════════════ */
#cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1px solid var(--b3);
  border-radius: 50%;
  pointer-events: none; z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s, border-color .2s, background .15s;
}
#cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 4px; height: 4px;
  background: var(--light);
  border-radius: 50%;
  pointer-events: none; z-index: 99999;
  transform: translate(-50%, -50%);
}
body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring,
body:has(.design-card:hover) #cursor-ring {
  width: 48px; height: 48px;
  border-color: var(--dim);
  background: rgba(255,255,255,.03);
}

/* ══════════════════════════════════════════════════
   GLOBAL HUD FRAME
   ══════════════════════════════════════════════════ */
#hud-frame {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 500;
}
.hud-corner {
  position: absolute;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .2em; color: var(--muted);
  text-transform: uppercase;
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 18px;
}
.hud-corner.hud-tl { top: 0; left: 0; }
.hud-corner.hud-tr { top: 0; right: 0; text-align: right; align-items: flex-end; }
.hud-corner.hud-bl { bottom: 44px; left: 0; }
.hud-corner.hud-br { bottom: 44px; right: 0; text-align: right; align-items: flex-end; }
.hud-label { color: var(--muted); font-size: 8px; letter-spacing: .3em; }
.hud-val   { color: var(--dim);   font-size: 10px; }
.hud-blink { animation: blink 1.4s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Corner bracket marks on HUD */
.hud-corner::before {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
}
.hud-tl::before { top: 6px; left: 6px; border-top: 1px solid var(--b3); border-left: 1px solid var(--b3); }
.hud-tr::before { top: 6px; right: 6px; border-top: 1px solid var(--b3); border-right: 1px solid var(--b3); }
.hud-bl::before { bottom: 6px; left: 6px; border-bottom: 1px solid var(--b3); border-left: 1px solid var(--b3); }
.hud-br::before { bottom: 6px; right: 6px; border-bottom: 1px solid var(--b3); border-right: 1px solid var(--b3); }

#hud-progress-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--b1);
}
#hud-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(to right, var(--muted), var(--light));
  transition: width .08s linear;
}

/* ══════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════ */
#hero-track { position: relative; height: 100vh; min-height: 640px; }

#hero-sticky {
  position: sticky; top: 0;
  height: 100vh; min-height: 640px;
  overflow: hidden;
  display: flex; align-items: flex-end; justify-content: flex-start;
}

#hero-video {
  position: fixed; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(.72);
  pointer-events: none; z-index: -2;
  transition: filter .3s;
}

#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 1; opacity: .45;
}

#video-dim {
  position: fixed; inset: 0;
  background: rgba(4,4,4,0);
  pointer-events: none; z-index: -1;
}

/* Layered vignette for the hero */
.hero-overlay {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(105deg, rgba(4,4,4,.96) 0%, rgba(4,4,4,.55) 55%, rgba(4,4,4,.2) 100%),
    linear-gradient(to top,  rgba(4,4,4,.99) 0%, rgba(4,4,4,.6) 35%, transparent 60%),
    linear-gradient(to bottom, rgba(4,4,4,.6) 0%, rgba(4,4,4,.1) 30%, transparent 50%);
}

/* Scrub HUD */
#scrub-bar {
  position: fixed; bottom: 2px; left: 0;
  height: 1px; width: 0%;
  background: var(--dim); z-index: 501;
  pointer-events: none; transition: opacity .3s;
}
#scrub-mode {
  position: fixed; bottom: 16px; right: 22px;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .3em; color: var(--muted);
  z-index: 501; text-transform: uppercase; pointer-events: none;
}

/* Hero top bar */
.hero-hud {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 28px 36px; z-index: 10; pointer-events: none;
}
.hud-logo {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .2em; color: var(--dim);
}
.hud-logo-hi { color: var(--hi); }

/* NERV cross */
.nerv-cross-sm { width: 22px; height: 22px; position: relative; flex-shrink: 0; }
.cs-v { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 1px; height: 100%; background: var(--dim); }
.cs-h { position: absolute; top: 50%; left: 0; transform: translateY(-50%); width: 100%; height: 1px; background: var(--dim); }
.cs-l { position: absolute; width: 6px; height: 6px; border: 1px solid var(--muted); background: var(--black); transform: rotate(45deg); }
.cs-tl { top: -2px; left: -2px; } .cs-tr { top: -2px; right: -2px; }
.cs-bl { bottom: -2px; left: -2px; } .cs-br { bottom: -2px; right: -2px; }

.hud-status { font-family: var(--mono); font-size: 10px; letter-spacing: .15em; color: var(--muted); text-align: right; }
.blink-dot {
  display: inline-block; width: 5px; height: 5px;
  background: var(--light); border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
  animation: blink 1.2s step-end infinite;
}
.dim-text { color: var(--b3); }

/* Side annotations */
.hero-side-left, .hero-side-right {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; z-index: 9; pointer-events: none;
}
.hero-side-left { left: 18px; }
.hero-side-right { right: 18px; }
.side-line { width: 1px; height: 64px; background: var(--b2); }
.side-text {
  font-family: var(--mono); font-size: 8px;
  letter-spacing: .3em; color: var(--muted); text-transform: uppercase;
  writing-mode: vertical-rl; transform: rotate(180deg);
}

/* Hero main content */
.hero-content {
  position: relative; z-index: 10;
  padding: 0 52px 64px;
  max-width: 900px;
}

.hero-classified {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .45em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 22px;
  display: flex; align-items: center; gap: 12px;
}
.cls-box {
  border: 1px solid var(--b3); padding: 2px 9px;
  font-size: 9px; color: var(--muted);
  letter-spacing: .2em;
}

.hero-name {
  font-family: var(--mono);
  font-size: clamp(56px, 9.5vw, 116px);
  line-height: .86; letter-spacing: -.025em;
  margin-bottom: 30px;
  display: flex; flex-direction: column;
}
.name-line-1 { color: var(--white); }
.name-line-2 {
  -webkit-text-stroke: 1px var(--b3);
  color: transparent; letter-spacing: .06em;
  position: relative;
}
/* animated underline on ghost text */
.name-line-2::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  -webkit-text-stroke: 0;
  color: var(--b3);
  clip-path: inset(0 100% 0 0);
  animation: text-reveal 3s ease-out 0.5s forwards;
}
@keyframes text-reveal {
  to { clip-path: inset(0 0% 0 0); }
}
.name-line-3 { color: var(--hi); }

.hero-role {
  font-family: var(--body); font-size: 12px;
  color: var(--light); letter-spacing: .08em;
  margin-bottom: 48px; font-weight: 300;
}
.role-bracket { color: var(--muted); }
.role-sep     { margin: 0 14px; color: var(--b3); }

/* Pill-style nav */
.hero-nav { display: flex; gap: 0; flex-wrap: wrap; }
.hero-nav a {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .22em; color: var(--muted);
  text-decoration: none; text-transform: uppercase;
  padding: 11px 22px;
  border: 1px solid var(--b2);
  margin-right: -1px; margin-bottom: -1px;
  transition: color .2s, background .2s, border-color .2s;
  display: flex; align-items: center; gap: 8px;
  position: relative; overflow: hidden;
}
.hero-nav a::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--white);
  transform: translateY(101%);
  transition: transform .25s cubic-bezier(.16,1,.3,1);
  z-index: 0; mix-blend-mode: difference;
}
.hero-nav a:hover::before { transform: translateY(0); }
.hero-nav a:hover { color: var(--white); border-color: var(--b3); z-index: 1; }
.nav-idx { color: var(--b3); font-size: 9px; position: relative; z-index: 1; }
.hero-nav a span:last-child { position: relative; z-index: 1; }

/* Corner brackets */
.frame-corner { position: absolute; width: 28px; height: 28px; z-index: 10; pointer-events: none; }
.fc-tl { top: 14px; left: 14px; border-top: 1px solid var(--b3); border-left: 1px solid var(--b3); }
.fc-tr { top: 14px; right: 14px; border-top: 1px solid var(--b3); border-right: 1px solid var(--b3); }
.fc-bl { bottom: 14px; left: 14px; border-bottom: 1px solid var(--b3); border-left: 1px solid var(--b3); }
.fc-br { bottom: 14px; right: 14px; border-bottom: 1px solid var(--b3); border-right: 1px solid var(--b3); }
.corner-label {
  position: absolute; font-family: var(--mono); font-size: 8px;
  color: var(--muted); letter-spacing: .2em; z-index: 10; pointer-events: none;
}
.cl-tl { top: 9px; left: 46px; }
.cl-tr { top: 9px; right: 46px; }
.cl-bl { bottom: 9px; left: 46px; }
.cl-br { bottom: 9px; right: 46px; }

/* Drop zone */
#video-drop {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 8; opacity: 0; pointer-events: none; transition: opacity .4s;
}
#video-drop.visible { opacity: 1; pointer-events: auto; }
#video-drop-inner {
  border: 1px solid var(--b2); padding: 44px 60px;
  text-align: center; cursor: crosshair;
  background: rgba(4,4,4,.88);
  transition: border-color .2s, background .2s;
  position: relative;
}
#video-drop-inner:hover { border-color: var(--muted); background: rgba(4,4,4,.92); }
.drop-cross { width: 32px; height: 32px; position: relative; margin: 0 auto 22px; }
.dc-v { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 1px; height: 100%; background: var(--b3); }
.dc-h { position: absolute; top: 50%; left: 0; transform: translateY(-50%); width: 100%; height: 1px; background: var(--b3); }
#video-drop-inner p {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .35em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 6px;
}
.drop-sub { font-size: 10px !important; }
#video-drop-inner small {
  display: block; font-size: 9px; color: var(--b3);
  letter-spacing: .3em; text-transform: uppercase; margin-top: 18px;
}
#video-file-input { display: none; }

/* ══════════════════════════════════════════════════
   TICKER
   ══════════════════════════════════════════════════ */
.ticker-wrap {
  background: var(--deep);
  border-top: 1px solid var(--b1); border-bottom: 1px solid var(--b1);
  height: 30px; display: flex; align-items: center; overflow: hidden;
  position: relative;
}
.ticker-label {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .3em; color: var(--muted);
  padding: 0 18px; white-space: nowrap; flex-shrink: 0;
  border-right: 1px solid var(--b1);
}
.ticker-inner {
  display: flex; gap: 52px; white-space: nowrap;
  animation: ticker 44s linear infinite; flex-shrink: 0; padding-left: 52px;
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-inner span { font-family: var(--mono); font-size: 9px; letter-spacing: .22em; color: var(--dim); text-transform: uppercase; }
.t-hi  { color: var(--light) !important; }
.t-sep { color: var(--b2) !important; }

/* ══════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════ */
.section {
  max-width: 1020px; margin: 0 auto;
  padding: 100px 52px;
  position: relative;
  background: rgba(4,4,4,.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Subtle left border accent per section */
.section::before {
  content: '';
  position: absolute; left: 0; top: 60px; bottom: 60px;
  width: 1px; background: linear-gradient(to bottom, transparent, var(--b2), transparent);
}

/* Section eyebrow */
.section-eyebrow {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 52px; flex-wrap: wrap;
}
.eyebrow-file {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .35em; color: var(--dim);
}
.eyebrow-rule { flex: 1; height: 1px; background: var(--b2); min-width: 20px; }
.eyebrow-title {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .28em; color: var(--dim); text-transform: uppercase;
}
.eyebrow-stamp {
  font-family: var(--mono); font-size: 8px;
  letter-spacing: .4em; color: var(--muted);
  border: 1px solid var(--b2); padding: 3px 10px;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--mono);
  font-size: clamp(34px, 4.5vw, 58px);
  line-height: .98; color: var(--white);
  letter-spacing: -.02em; margin-bottom: 52px;
}
.title-ghost { -webkit-text-stroke: 1px var(--b3); color: transparent; }

/* ══════════════════════════════════════════════════
   ABOUT
   ══════════════════════════════════════════════════ */
.about-grid {
  display: grid; grid-template-columns: 1.3fr 1fr;
  border: 1px solid var(--b1);
}
.about-text { padding: 44px; border-right: 1px solid var(--b1); }
.text-decoration {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .3em; color: var(--muted);
  margin-bottom: 22px; text-transform: uppercase;
}
.about-text p {
  color: var(--paper); font-size: 13px;
  line-height: 1.95; font-weight: 300; margin-bottom: 18px;
}
.about-text p:last-of-type { margin-bottom: 28px; }
.about-alert {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .28em; color: var(--dim);
  border: 1px solid var(--b2); padding: 9px 14px;
  display: inline-flex; align-items: center; gap: 10px;
  text-transform: uppercase;
  position: relative;
}
/* Animated top border on alert */
.about-alert::before {
  content: '';
  position: absolute; top: -1px; left: 0;
  height: 1px; width: 0%; background: var(--light);
  animation: progress-line 2s ease-out 1s forwards;
}
@keyframes progress-line { to { width: 100%; } }
.alert-icon { color: var(--muted); }

.about-stats { padding: 44px; }
.stats-header {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .3em; color: var(--muted);
  margin-bottom: 22px;
}
.stat-row {
  padding: 15px 0; border-bottom: 1px solid var(--b1);
  display: flex; justify-content: space-between; align-items: baseline;
}
.stat-row:last-child { border-bottom: none; }
.stat-key { font-family: var(--mono); font-size: 9px; letter-spacing: .25em; color: var(--dim); text-transform: uppercase; }
.stat-val { font-family: var(--mono); font-size: 12px; color: var(--paper); }
.stat-active { color: var(--hi); }

/* ══════════════════════════════════════════════════
   TIMELINE
   ══════════════════════════════════════════════════ */
.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: grid; grid-template-columns: 20px 168px 1fr;
  border: 1px solid var(--b1); margin-bottom: -1px;
  position: relative; transition: background .2s;
}
.timeline-item:hover { background: rgba(255,255,255,.012); }

.timeline-spine {
  display: flex; flex-direction: column;
  align-items: center; padding-top: 34px;
  border-right: 1px solid var(--b1);
}
.spine-dot {
  width: 7px; height: 7px;
  border: 1px solid var(--muted); background: var(--black);
  flex-shrink: 0; transform: rotate(45deg);
  transition: background .3s, border-color .3s;
}
.timeline-item:hover .spine-dot {
  background: var(--light); border-color: var(--light);
}
.spine-line { flex: 1; width: 1px; background: var(--b1); margin-top: 8px; }
.timeline-item:last-child .spine-line { display: none; }

.timeline-meta {
  padding: 30px 22px; border-right: 1px solid var(--b1);
  display: flex; flex-direction: column; gap: 12px;
}
.timeline-period { font-family: var(--mono); font-size: 10px; letter-spacing: .15em; color: var(--muted); }
.timeline-type {
  font-family: var(--mono); font-size: 8px; letter-spacing: .35em;
  text-transform: uppercase; padding: 3px 8px;
  border: 1px solid var(--b2); display: inline-block; width: fit-content;
}
.ttype-it     { color: var(--light); border-color: var(--b3); }
.ttype-design { color: var(--muted); border-color: var(--b2); }

.timeline-body { padding: 30px 40px; }
.timeline-role { font-family: var(--mono); font-size: 16px; color: var(--white); letter-spacing: .03em; margin-bottom: 5px; }
.timeline-company { font-family: var(--mono); font-size: 9px; letter-spacing: .25em; color: var(--muted); text-transform: uppercase; margin-bottom: 18px; }
.timeline-desc { font-size: 12px; color: var(--paper); font-weight: 300; line-height: 1.88; margin-bottom: 18px; }

/* ══════════════════════════════════════════════════
   DESIGN GRID
   ══════════════════════════════════════════════════ */
.design-filters {
  display: flex; overflow: hidden;
  border: 1px solid var(--b1);
}
.filter-btn {
  font-family: var(--mono); font-size: 9px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--muted);
  background: none; border: none; border-right: 1px solid var(--b1);
  padding: 13px 20px; cursor: crosshair; flex: 1;
  transition: color .2s, background .2s;
  display: flex; align-items: center; gap: 8px; position: relative;
}
.filter-btn:last-child { border-right: none; }
.filter-btn::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0%; height: 1px; background: var(--light);
  transition: width .3s ease;
}
.filter-btn:hover::after, .filter-btn.active::after { width: 100%; }
.filter-btn:hover   { color: var(--paper); }
.filter-btn.active  { color: var(--white); background: rgba(255,255,255,.03); }
.fb-idx { color: var(--b3); font-size: 8px; }

.design-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--b1); border-top: none;
}
.design-card {
  border-right: 1px solid var(--b1); border-bottom: 1px solid var(--b1);
  cursor: crosshair; overflow: hidden; position: relative;
  transition: background .2s;
}
.design-card:nth-child(3n) { border-right: none; }
.design-card:hover { background: rgba(255,255,255,.018); }
.design-card.hidden { display: none; }

/* sweep line */
.design-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(to right, transparent, var(--dim), transparent);
  transform: translateX(-100%); transition: transform .5s ease;
  z-index: 2;
}
.design-card:hover::before { transform: translateX(100%); }

.design-card-img { width: 100%; aspect-ratio: 4/3; position: relative; overflow: hidden; }
.design-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  transition: filter .5s, transform .6s cubic-bezier(.16,1,.3,1);
}
.design-card:hover .design-card-img img {
  filter: grayscale(.25) contrast(1.1);
  transform: scale(1.06);
}

.design-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
}
.dp-icon  { font-size: 26px; color: var(--b3); transition: color .3s; }
.dp-label { font-family: var(--mono); font-size: 8px; letter-spacing: .4em; color: var(--b3); text-transform: uppercase; transition: color .3s; }
.design-card:hover .dp-icon,
.design-card:hover .dp-label { color: var(--muted); }

.design-card-body {
  padding: 14px 20px;
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--b1);
}
.design-card-num   { font-family: var(--mono); font-size: 9px; color: var(--b3); }
.design-card-cat   { font-family: var(--mono); font-size: 8px; letter-spacing: .3em; color: var(--muted); text-transform: uppercase; flex: 1; }
.design-card-title { font-family: var(--mono); font-size: 11px; color: var(--paper); letter-spacing: .05em; }
.design-card-arrow { font-size: 12px; color: var(--b3); transition: transform .2s, color .2s; }
.design-card:hover .design-card-arrow { color: var(--light); transform: translateX(4px); }

/* ── LIGHTBOX ── */
#lightbox {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
#lightbox.open { opacity: 1; pointer-events: auto; }
#lightbox-backdrop {
  position: absolute; inset: 0;
  background: rgba(4,4,4,.95); backdrop-filter: blur(20px);
}
#lightbox-panel {
  position: relative; z-index: 1;
  width: 88vw; max-width: 900px;
  border: 1px solid var(--b2); background: var(--deep);
  display: grid; grid-template-columns: 1fr 1fr;
  transform: translateY(24px) scale(.98);
  transition: transform .4s cubic-bezier(.16,1,.3,1);
}
#lightbox.open #lightbox-panel { transform: translateY(0) scale(1); }

/* Animated border on lightbox */
#lightbox-panel::before {
  content: '';
  position: absolute; inset: -1px;
  background: linear-gradient(135deg, var(--b3), transparent 40%, transparent 60%, var(--b3));
  z-index: -1;
  animation: lb-border 4s linear infinite;
}
@keyframes lb-border {
  0%   { opacity: .5; }
  50%  { opacity: 1; }
  100% { opacity: .5; }
}

.lb-frame-corner { position: absolute; width: 18px; height: 18px; z-index: 2; }
.lb-fc-tl { top: -1px;  left: -1px;  border-top:    2px solid var(--dim); border-left:   2px solid var(--dim); }
.lb-fc-tr { top: -1px;  right: -1px; border-top:    2px solid var(--dim); border-right:  2px solid var(--dim); }
.lb-fc-bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--dim); border-left:   2px solid var(--dim); }
.lb-fc-br { bottom: -1px; right:-1px; border-bottom: 2px solid var(--dim); border-right:  2px solid var(--dim); }

#lightbox-close {
  position: absolute; top: 16px; right: 16px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .3em;
  color: var(--muted); background: none;
  border: 1px solid var(--b2); padding: 6px 14px;
  cursor: crosshair; z-index: 2;
  transition: color .2s, border-color .2s;
}
#lightbox-close:hover { color: var(--white); border-color: var(--muted); }

#lightbox-img-wrap {
  aspect-ratio: 1; background: var(--card);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border-right: 1px solid var(--b2);
}
#lightbox-img-wrap img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
#lightbox-placeholder-icon { font-size: 36px; color: var(--b3); }

#lightbox-info { padding: 52px 44px; display: flex; flex-direction: column; justify-content: center; }
.lb-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: .3em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 18px;
}
.lb-eye-rule { flex: 1; height: 1px; background: var(--b2); }
#lightbox-title { font-family: var(--mono); font-size: 22px; color: var(--white); margin-bottom: 20px; }
#lightbox-desc  { font-size: 12px; color: var(--paper); font-weight: 300; line-height: 1.9; margin-bottom: 28px; }
.lb-tags-label  { font-family: var(--mono); font-size: 9px; letter-spacing: .3em; color: var(--muted); margin-bottom: 10px; }
#lightbox-tags  { display: flex; flex-wrap: wrap; gap: 6px; }

/* ══════════════════════════════════════════════════
   WORK LIST
   ══════════════════════════════════════════════════ */
.work-list { display: flex; flex-direction: column; }
.work-item {
  border: 1px solid var(--b1); margin-bottom: -1px;
  display: grid; grid-template-columns: 84px 1fr auto;
  position: relative; overflow: hidden; cursor: crosshair;
  transition: background .2s;
}
.work-item::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--white);
  transform: translateX(-101%);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
  z-index: 0; mix-blend-mode: difference;
}
.work-item:hover::before { transform: translateX(0); }

.work-num {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: .1em; padding: 30px 0 30px 28px;
  border-right: 1px solid var(--b1);
  display: flex; align-items: flex-start;
  position: relative; z-index: 1;
}
.wn-bracket { color: var(--b3); }
.work-body  { padding: 26px 34px; position: relative; z-index: 1; }
.work-title { font-family: var(--mono); font-size: 15px; color: var(--white); margin-bottom: 7px; letter-spacing: .04em; }
.work-desc  { font-size: 12px; color: var(--light); font-weight: 300; line-height: 1.75; }
.work-tags  { padding: 26px 22px; display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; position: relative; z-index: 1; }

/* ── TAGS ── */
.tag {
  font-family: var(--mono); font-size: 8px;
  letter-spacing: .18em; color: var(--muted);
  border: 1px solid var(--b2); padding: 3px 8px;
  text-transform: uppercase;
}
.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ══════════════════════════════════════════════════
   SKILLS
   ══════════════════════════════════════════════════ */
.skills-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  border: 1px solid var(--b1);
}
.skill-cell {
  padding: 38px; border-right: 1px solid var(--b1);
  border-bottom: 1px solid var(--b1); position: relative;
}
.skill-cell:nth-child(3n) { border-right: none; }
.skill-cell:nth-last-child(-n+3) { border-bottom: none; }

/* Cell letter in corner */
.skill-cell::before {
  content: attr(data-cell);
  position: absolute; top: 14px; right: 18px;
  font-family: var(--mono); font-size: 32px;
  color: var(--b2); letter-spacing: -.02em; line-height: 1;
  pointer-events: none;
}

.skill-category {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .3em; color: var(--muted);
  text-transform: uppercase; margin-bottom: 28px;
  display: flex; align-items: center; gap: 10px;
}
.sk-cat-num {
  width: 18px; height: 18px; border: 1px solid var(--b2);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--muted); flex-shrink: 0;
}
.skill-items { display: flex; flex-direction: column; gap: 16px; }
.skill-item  { display: flex; align-items: center; gap: 14px; }
.skill-bar-bg { flex: 1; height: 1px; background: var(--b2); position: relative; }
.skill-bar-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: linear-gradient(to right, var(--muted), var(--light));
  transform-origin: left; transform: scaleX(0);
  transition: transform 1.5s cubic-bezier(.16,1,.3,1);
}
.skill-name { font-size: 11px; color: var(--paper); width: 110px; font-weight: 300; }
.skill-pct  { font-family: var(--mono); font-size: 10px; color: var(--muted); width: 28px; text-align: right; }
.skill-pct::after { content: '%'; }

/* ══════════════════════════════════════════════════
   CONTACT
   ══════════════════════════════════════════════════ */
.contact-block { border: 1px solid var(--b1); padding: 60px 56px; position: relative; }

/* Animated corner accent */
.contact-block::before, .contact-block::after {
  content: '';
  position: absolute; width: 40px; height: 40px;
  transition: width .4s, height .4s;
}
.contact-block::before { top: -1px; left: -1px; border-top: 2px solid var(--b3); border-left: 2px solid var(--b3); }
.contact-block::after  { bottom: -1px; right: -1px; border-bottom: 2px solid var(--b3); border-right: 2px solid var(--b3); }
.contact-block:hover::before, .contact-block:hover::after { width: 80px; height: 80px; }

.contact-header {
  display: flex; align-items: center; gap: 18px; margin-bottom: 36px;
}
.ch-line { flex: 1; height: 1px; background: var(--b2); }
.ch-label { font-family: var(--mono); font-size: 9px; letter-spacing: .4em; color: var(--muted); }

.contact-intro {
  font-size: 13px; color: var(--paper);
  font-weight: 300; line-height: 1.95;
  max-width: 580px; margin-bottom: 44px;
}

.contact-links { display: flex; flex-direction: column; }
.contact-link {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 0; border-top: 1px solid var(--b1);
  text-decoration: none; color: var(--paper);
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em;
  transition: color .2s, padding-left .25s cubic-bezier(.16,1,.3,1);
}
.contact-link:last-child { border-bottom: 1px solid var(--b1); }
.contact-link:hover { color: var(--white); padding-left: 10px; }
.cl-num  { font-size: 9px; color: var(--b3); width: 22px; }
.contact-link-label { font-size: 9px; letter-spacing: .3em; color: var(--muted); width: 80px; text-transform: uppercase; }
.cl-val  { flex: 1; }
.contact-link-arrow { color: var(--b3); transition: color .2s, transform .25s; }
.contact-link:hover .contact-link-arrow { color: var(--white); transform: translateX(6px); }

/* ══════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--b1); padding: 36px 52px;
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1020px; margin: 0 auto; flex-wrap: wrap; gap: 14px;
}
.footer-nerv {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .25em; color: var(--muted);
}
.footer-quote { font-family: var(--body); font-size: 10px; color: var(--b3); font-style: italic; }
.footer-copy  { font-family: var(--mono); font-size: 9px; letter-spacing: .25em; color: var(--muted); }

/* ══════════════════════════════════════════════════
   REVEAL
   ══════════════════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════════════
   GLITCH UTILITY
   ══════════════════════════════════════════════════ */
@keyframes glitch {
  0%,100% { text-shadow: none; transform: none; clip-path: none; }
  20%  { text-shadow: -3px 0 var(--light); transform: translateX(3px); }
  40%  { text-shadow: 3px 0 var(--muted); transform: translateX(-3px); }
  60%  { text-shadow: -2px 0 var(--dim); transform: translateX(2px); clip-path: inset(20% 0 50% 0); }
  80%  { text-shadow: 2px 0 var(--light); transform: translateX(-1px); clip-path: none; }
}
.glitch-active { animation: glitch .35s steps(2) 1; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 820px) {
  #hero-video            { object-position: 70% center; }
  .section               { padding: 68px 24px; }
  .hero-content          { padding: 0 24px 52px; }
  .hero-side-left, .hero-side-right { display: none; }
  .about-grid            { grid-template-columns: 1fr; }
  .about-text            { border-right: none; border-bottom: 1px solid var(--b1); }
  .timeline-item         { grid-template-columns: 20px 1fr; }
  .timeline-meta         { display: none; }
  .design-grid           { grid-template-columns: 1fr 1fr; }
  .design-card:nth-child(3n) { border-right: 1px solid var(--b1); }
  .design-card:nth-child(2n) { border-right: none; }
  .skills-grid           { grid-template-columns: 1fr; }
  .skill-cell            { border-right: none !important; }
  .work-item             { grid-template-columns: 68px 1fr; }
  .work-tags             { display: none; }
  #lightbox-panel        { grid-template-columns: 1fr; width: 95vw; }
  #lightbox-img-wrap     { aspect-ratio: 16/9; border-right: none; border-bottom: 1px solid var(--b2); }
  .filter-btn            { font-size: 8px; padding: 11px 10px; }
  #hud-frame             { display: none; }
  footer                 { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 500px) {
  #hero-video            { object-position: 75% center; }
  .design-grid           { grid-template-columns: 1fr; }
  .design-card           { border-right: none !important; }
  .hero-name             { font-size: clamp(44px, 15vw, 76px); }
  .hero-nav a            { padding: 9px 14px; }
  .contact-block         { padding: 36px 24px; }
}
