:root {
  --bg: #020204;
  --surface: #080810;
  --surface2: #0c0c16;
  --green: #00ff41;
  --green-dim: #00cc33;
  --green-dark: rgba(0,255,65,0.08);
  --cyan: #0ff;
  --red: #ff0040;
  --pink: #ff2d6b;
  --accent: #00ff41;
  --accent-l: #00ff41;
  --text: #c8c8d0;
  --muted: #6a6a78;
  --dim: #3a3a48;
  --border: rgba(0,255,65,0.06);
  --border2: rgba(0,255,65,0.15);
  --font: 'Syne', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --nav-h: 56px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--mono); background: var(--bg); color: var(--text); overflow-x: hidden; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(0,255,65,0.2); color: var(--green); }

/* ===== Boot Sequence Overlay ===== */
.boot-overlay {
  position: fixed; inset: 0; z-index: 100000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease;
}
.boot-overlay.done { opacity: 0; pointer-events: none; }
.boot-content {
  font-family: var(--mono); font-size: 0.72rem; color: var(--green);
  max-width: 500px; width: 90%; line-height: 1.8;
}
.boot-content .boot-line-item { opacity: 0; animation: bootFadeIn 0.15s ease-out forwards; }
.boot-content .boot-line-ok { color: var(--green); }
.boot-content .boot-line-dim { color: var(--dim); }
@keyframes bootFadeIn { to { opacity: 1; } }

/* ===== Scroll Progress ===== */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 10000;
  background: var(--green);
  transform-origin: left;
  transform: scaleX(0);
  pointer-events: none;
  box-shadow: 0 0 8px rgba(0,255,65,0.4);
  transition: opacity 0.3s;
}

/* ===== Atmospheric ===== */
.noise-layer { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; opacity: 0.04; }
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.06) 0px, rgba(0,0,0,0.06) 1px, transparent 1px, transparent 3px);
}
.dot-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, rgba(0,255,65,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 10%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 10%, transparent 60%);
}

#matrixCanvas {
  position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: 0.04;
}

/* CRT Flicker */
@keyframes crtFlicker {
  0% { opacity: 1; }
  3% { opacity: 0.95; }
  6% { opacity: 1; }
  7.5% { opacity: 0.92; }
  9% { opacity: 1; }
  50% { opacity: 1; }
  50.5% { opacity: 0.96; }
  51% { opacity: 1; }
}
body { animation: crtFlicker 8s linear infinite; }

/* CRT Glitch Canvas */
#glitchCanvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 9997; pointer-events: none;
}


/* ===== Hex Columns ===== */
.hex-column {
  position: fixed; top: 0; width: 14px; height: 100vh; z-index: 1; pointer-events: none;
  font-family: var(--mono); font-size: 0.5rem; color: rgba(0,255,65,0.06);
  line-height: 1.4; overflow: hidden; white-space: nowrap;
}
.hex-col-left { left: 8px; }
.hex-col-right { right: 8px; text-align: right; }
.hex-char {
  display: block; animation: hexFade 4s linear infinite;
  animation-delay: var(--d, 0s);
}
@keyframes hexFade {
  0% { opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===== Container ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== Navbar ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 1000;
  background: rgba(2,2,4,0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.navbar.scrolled { background: rgba(2,2,4,0.95); }
.nav-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo {
  font-family: var(--mono); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em; z-index: 10;
  position: relative; color: var(--green);
}
.nav-logo .logo-bracket { color: var(--dim); }
.nav-logo.glitch-logo {
  animation: logoGlitch 0.15s steps(2) 1;
  text-shadow: 2px 0 var(--red), -2px 0 var(--cyan);
}
@keyframes logoGlitch {
  0% { transform: translate(-1px, 1px); }
  50% { transform: translate(1px, -1px); }
  100% { transform: translate(0); }
}
.nav-links { display: flex; align-items: center; gap: 2px; position: relative; }
.nav-link {
  padding: 6px 12px; font-size: 0.72rem; font-weight: 500; color: var(--muted);
  border-radius: 4px; transition: color 0.2s, background 0.2s; font-family: var(--mono);
  text-transform: lowercase;
}
.nav-link:hover {
  color: var(--green); background: var(--green-dark);
  text-shadow: 0 0 8px rgba(0,255,65,0.2);
}
.nav-link-cta {
  color: var(--green); border: 1px solid rgba(0,255,65,0.15); background: var(--green-dark); margin-left: 4px;
}
.nav-link-cta:hover {
  background: rgba(0,255,65,0.12); color: #fff;
  border-color: rgba(0,255,65,0.4);
}

/* Nav Hover Glitch — controlled via JS .glitch-active class, NOT :hover */
.glitch-hover {
  position: relative; overflow: visible;
}

.nav-right-mobile { display: none; align-items: center; gap: 6px; }

/* Mobile Menu */
.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; z-index: 10; }
.mobile-menu-btn span { display: block; width: 18px; height: 1.5px; background: var(--green); border-radius: 1px; transition: transform 0.3s, opacity 0.3s; }
.mobile-menu-btn.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.mobile-menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: rgba(2,2,4,0.97); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  padding: 8px 24px; z-index: 999; flex-direction: column; gap: 2px;
}
.mobile-menu.open { display: flex; }
.mobile-link { padding: 12px 14px; font-size: 0.85rem; font-weight: 500; color: var(--muted); border-radius: 4px; transition: color 0.2s; font-family: var(--mono); }
.mobile-link:hover { color: var(--green); }

/* ===== Hero ===== */
.hero {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: calc(var(--nav-h) + 24px) 24px 40px; position: relative; z-index: 2;
  overflow: hidden;
}
.hero-inner { width: 100%; max-width: 1100px; padding-top: 32px; }

@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 8px rgba(0,255,65,0.6); } 50% { opacity: 0.3; box-shadow: 0 0 2px rgba(0,255,65,0.2); } }

/* Glitch Name */
.hero-name {
  font-family: var(--font); font-size: clamp(2.8rem, 8.5vw, 7.5rem); font-weight: 800;
  line-height: 0.95; letter-spacing: -0.04em; margin-bottom: 14px; position: relative;
  color: #fff; white-space: nowrap;
  text-shadow: 0 0 40px rgba(0,255,65,0.15);
  animation: heroIdle 4s ease-in-out infinite;
}
@keyframes heroIdle {
  0%, 89%, 100% { text-shadow: 0 0 40px rgba(0,255,65,0.15); }
  90% { text-shadow: 0 0 40px rgba(0,255,65,0.15), 3px 0 #ff0040, -3px 0 #0ff; }
  92% { text-shadow: 0 0 40px rgba(0,255,65,0.15); }
  94% { text-shadow: 0 0 40px rgba(0,255,65,0.15), -2px 0 #ff0040, 2px 0 #0ff; }
}
.hero-name::before, .hero-name::after {
  content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  overflow: hidden; opacity: 0; pointer-events: none;
}
.hero-name::before { color: var(--cyan); z-index: -1; }
.hero-name::after { color: var(--red); z-index: -1; }

.hero-name.glitching {
  animation: heroGlitchMain 0.6s steps(2) 1;
}
.hero-name.glitching::before {
  opacity: 0.7;
  animation: glitch1 0.6s steps(4) 1;
}
.hero-name.glitching::after {
  opacity: 0.7;
  animation: glitch2 0.6s steps(4) 1;
}

.hero-name.glitch-mid {
  animation: heroGlitchMain 0.9s steps(3) 1;
}
.hero-name.glitch-mid::before {
  opacity: 0.9;
  animation: glitch1 0.9s steps(6) 1, glitchFlicker 0.15s steps(1) infinite;
}
.hero-name.glitch-mid::after {
  opacity: 0.9;
  animation: glitch2 0.9s steps(6) 1, glitchFlicker 0.12s steps(1) infinite;
}

.hero-name.glitch-heavy {
  animation: heroGlitchMain 1.4s steps(4) 1;
  text-shadow: 0 0 80px #00ff41, 6px 0 #ff0040, -6px 0 #0ff;
}
.hero-name.glitch-heavy::before {
  opacity: 1;
  animation: glitch1Heavy 1.4s steps(8) 1, glitchFlicker 0.08s steps(1) infinite;
}
.hero-name.glitch-heavy::after {
  opacity: 1;
  animation: glitch2Heavy 1.4s steps(8) 1, glitchFlicker 0.1s steps(1) infinite;
}

@keyframes glitchFlicker {
  0%, 40% { opacity: 1; }
  41%, 43% { opacity: 0; }
  44%, 100% { opacity: 1; }
}
@keyframes glitch1Heavy {
  0% { clip-path: inset(5% 0 75% 0); transform: translate(-10px, 3px) scaleX(1.06) skewX(4deg); }
  8% { clip-path: inset(85% 0 2% 0); transform: translate(12px, -2px) scaleX(0.94); }
  16% { clip-path: inset(15% 0 55% 0); transform: translate(-5px, 5px) skewX(-3deg); }
  24% { clip-path: inset(50% 0 20% 0); transform: translate(8px, -4px) scaleX(1.05); }
  32% { clip-path: inset(3% 0 90% 0); transform: translate(-12px, 2px) skewX(5deg); }
  40% { clip-path: inset(70% 0 8% 0); transform: translate(6px, -3px) scaleX(0.95); }
  48% { clip-path: inset(25% 0 45% 0); transform: translate(-8px, 4px) skewX(-4deg); }
  56% { clip-path: inset(60% 0 12% 0); transform: translate(10px, -1px) scaleX(1.04); }
  64% { clip-path: inset(8% 0 80% 0); transform: translate(-6px, 3px) skewX(2deg); }
  72% { clip-path: inset(40% 0 30% 0); transform: translate(7px, -5px) scaleX(0.96); }
  80% { clip-path: inset(75% 0 5% 0); transform: translate(-10px, 2px) skewX(-5deg); }
  88% { clip-path: inset(20% 0 60% 0); transform: translate(5px, -2px) scaleX(1.03); }
  100% { clip-path: inset(45% 0 35% 0); transform: translate(-3px, 1px); }
}
@keyframes glitch2Heavy {
  0% { clip-path: inset(70% 0 8% 0); transform: translate(10px, -5px) scaleX(0.92) skewX(-4deg); }
  8% { clip-path: inset(2% 0 85% 0); transform: translate(-8px, 3px) scaleX(1.06); }
  16% { clip-path: inset(45% 0 25% 0); transform: translate(5px, -2px) skewX(3deg); }
  24% { clip-path: inset(10% 0 65% 0); transform: translate(-10px, 4px) scaleX(0.95); }
  32% { clip-path: inset(80% 0 3% 0); transform: translate(12px, -3px) skewX(-5deg); }
  40% { clip-path: inset(30% 0 40% 0); transform: translate(-6px, 2px) scaleX(1.04); }
  48% { clip-path: inset(55% 0 15% 0); transform: translate(8px, -4px) skewX(4deg); }
  56% { clip-path: inset(5% 0 78% 0); transform: translate(-12px, 3px) scaleX(0.96); }
  64% { clip-path: inset(65% 0 10% 0); transform: translate(6px, -1px) skewX(-2deg); }
  72% { clip-path: inset(18% 0 55% 0); transform: translate(-7px, 5px) scaleX(1.05); }
  80% { clip-path: inset(50% 0 22% 0); transform: translate(10px, -3px) skewX(3deg); }
  88% { clip-path: inset(35% 0 40% 0); transform: translate(-4px, 2px) scaleX(0.97); }
  100% { clip-path: inset(60% 0 18% 0); transform: translate(3px, -1px); }
}
@keyframes heroGlitchMain {
  0% { text-shadow: 0 0 40px rgba(0,255,65,0.15); transform: none; }
  8% { text-shadow: 4px 0 #ff0040, -4px 0 #0ff, 0 0 20px #00ff41; transform: skewX(-2deg) translate(3px, 0); }
  16% { text-shadow: -3px 0 #ff0040, 3px 0 #0ff; transform: skewX(1deg) translate(-2px, 1px); }
  24% { text-shadow: 0 3px #ff0040, 0 -3px #0ff, 0 0 30px #00ff41; transform: skewX(-1deg) translate(1px, -2px); }
  32% { text-shadow: 5px 0 #ff0040, -5px 0 #0ff; transform: skewX(3deg) translate(-4px, 0); }
  40% { text-shadow: -2px -2px #ff0040, 2px 2px #0ff; transform: none; }
  48% { text-shadow: 3px 0 #ff0040, -3px 0 #0ff, 0 0 40px #00ff41; transform: skewX(-2deg) scaleX(1.02); }
  56% { text-shadow: 0 0 60px #00ff41; transform: translate(2px, -1px); }
  64% { text-shadow: -4px 0 #ff0040, 4px 0 #0ff; transform: skewX(2deg) translate(-3px, 1px); }
  72% { text-shadow: 0 0 20px #00ff41; transform: scaleX(0.98); }
  80% { text-shadow: 3px 2px #ff0040, -3px -2px #0ff, 0 0 30px #00ff41; transform: skewX(-1deg); }
  88% { text-shadow: -2px 0 #ff0040, 2px 0 #0ff; transform: translate(1px, 1px); }
  100% { text-shadow: 0 0 40px rgba(0,255,65,0.15); transform: none; }
}
@keyframes glitch1 {
  0% { clip-path: inset(10% 0 70% 0); transform: translate(-6px, 2px) scaleX(1.03); }
  12% { clip-path: inset(80% 0 5% 0); transform: translate(8px, -1px) scaleX(0.97); }
  25% { clip-path: inset(20% 0 50% 0); transform: translate(-3px, 3px) skewX(2deg); }
  37% { clip-path: inset(60% 0 15% 0); transform: translate(5px, -2px); }
  50% { clip-path: inset(5% 0 85% 0); transform: translate(-7px, 1px) scaleX(1.04); }
  62% { clip-path: inset(45% 0 30% 0); transform: translate(4px, -3px) skewX(-1deg); }
  75% { clip-path: inset(70% 0 10% 0); transform: translate(-5px, 2px); }
  87% { clip-path: inset(30% 0 55% 0); transform: translate(6px, -1px) scaleX(0.98); }
  100% { clip-path: inset(15% 0 65% 0); transform: translate(-2px, 0); }
}
@keyframes glitch2 {
  0% { clip-path: inset(65% 0 10% 0); transform: translate(7px, -3px) scaleX(0.96); }
  12% { clip-path: inset(5% 0 80% 0); transform: translate(-5px, 2px) skewX(-2deg); }
  25% { clip-path: inset(40% 0 35% 0); transform: translate(3px, -1px); }
  37% { clip-path: inset(15% 0 60% 0); transform: translate(-6px, 3px) scaleX(1.03); }
  50% { clip-path: inset(75% 0 5% 0); transform: translate(4px, -2px) skewX(1deg); }
  62% { clip-path: inset(25% 0 50% 0); transform: translate(-3px, 1px); }
  75% { clip-path: inset(50% 0 20% 0); transform: translate(5px, -3px) scaleX(0.97); }
  87% { clip-path: inset(10% 0 70% 0); transform: translate(-4px, 2px); }
  100% { clip-path: inset(55% 0 25% 0); transform: translate(2px, -1px); }
}

/* Hero Divider */
.hero-divider {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-bottom: 18px; margin-top: 4px;
}
.hero-div-line {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,65,0.3), transparent);
}
.hero-div-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--green); opacity: 0.5;
  box-shadow: 0 0 8px rgba(0,255,65,0.4);
  animation: pulse 2s ease-in-out infinite;
}

.hero-role {
  font-family: var(--mono); font-size: clamp(0.78rem, 1.5vw, 1rem); color: var(--muted);
  margin-bottom: 20px; font-weight: 400;
}
.hero-role-glitch {
  position: relative; cursor: default;
  transition: color 0.3s, text-shadow 0.3s;
}
.hero-role-glitch::before,
.hero-role-glitch::after {
  content: attr(data-text); position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s;
}
.hero-role-glitch::before { color: #ff0040; }
.hero-role-glitch::after { color: #0ff; }
.hero-role-glitch:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(0,255,65,0.3);
}
.hero-role-glitch:hover::before {
  opacity: 0.8;
  animation: roleGlitch1 0.4s steps(3) infinite;
}
.hero-role-glitch:hover::after {
  opacity: 0.8;
  animation: roleGlitch2 0.4s steps(3) infinite;
}
@keyframes roleGlitch1 {
  0% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 1px); }
  33% { clip-path: inset(60% 0 10% 0); transform: translate(3px, -1px); }
  66% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 0); }
  100% { clip-path: inset(40% 0 30% 0); transform: translate(2px, 1px); }
}
@keyframes roleGlitch2 {
  0% { clip-path: inset(50% 0 20% 0); transform: translate(3px, -2px); }
  33% { clip-path: inset(5% 0 65% 0); transform: translate(-2px, 1px); }
  66% { clip-path: inset(35% 0 35% 0); transform: translate(1px, -1px); }
  100% { clip-path: inset(70% 0 5% 0); transform: translate(-3px, 2px); }
}
.hero-motto {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: clamp(0.72rem, 1.2vw, 0.88rem);
  min-height: 1.6em;
}
.hero-motto-bracket {
  color: var(--green); opacity: 0.35; font-weight: 300; font-size: 1.1em;
}
.hero-motto-text {
  color: var(--dim); letter-spacing: 0.04em;
  transition: color 0.3s, text-shadow 0.3s;
}
.hero-motto-text.decrypting {
  color: var(--green);
  text-shadow: 0 0 10px rgba(0,255,65,0.25);
}
@keyframes blink { 50% { opacity: 0; } }

/* Scroll Hint */
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-hint-text {
  font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim);
}
.scroll-hint-line {
  width: 1px; height: 32px;
  background: linear-gradient(180deg, var(--green), transparent);
  opacity: 0.4;
  animation: scrollLineGrow 2s ease-in-out infinite;
}
@keyframes scrollLineGrow {
  0%, 100% { height: 20px; opacity: 0.2; }
  50% { height: 36px; opacity: 0.5; }
}

/* ===== Marquee Strip ===== */
.marquee-strip {
  overflow: hidden;
  position: relative; z-index: 2;
  padding: 14px 0;
  border-top: 1px solid rgba(0,255,65,0.04);
  border-bottom: 1px solid rgba(0,255,65,0.04);
  background: rgba(0,255,65,0.008);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 12%, black 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, black 12%, black 88%, transparent 100%);
}
.marquee-strip::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,255,65,0.02) 0%, transparent 40%, transparent 60%, rgba(0,255,65,0.02) 100%);
}
.marquee-track {
  display: flex; width: max-content;
  animation: marqueeScroll 50s linear infinite;
}
.marquee-reverse .marquee-track { animation-direction: reverse; }
.marquee-text {
  font-family: var(--mono); font-size: 0.58rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--dim); white-space: nowrap;
  transition: color 0.4s, text-shadow 0.4s;
}
.marquee-text.color-shift {
  color: var(--green); text-shadow: 0 0 10px rgba(0,255,65,0.3);
}
.mq-sep {
  color: var(--green); opacity: 0.15; font-size: 0.5rem; vertical-align: middle;
  margin: 0 8px; font-weight: 300;
}
@keyframes marqueeScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===== Sections ===== */
.sect { padding: 72px 0; position: relative; z-index: 2; }
.sect::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(0,255,65,0.08) 30%, rgba(0,255,65,0.12) 50%, rgba(0,255,65,0.08) 70%, transparent 95%);
}
.sect-dark { background: rgba(0,255,65,0.01); border-bottom: 1px solid var(--border); }
.sect-head { margin-bottom: 48px; }
.sect-num {
  font-family: var(--mono); font-size: 0.65rem; color: var(--green);
  letter-spacing: 0.08em; display: inline-block; margin-bottom: 6px;
  text-shadow: 0 0 8px rgba(0,255,65,0.4), 0 0 20px rgba(0,255,65,0.15);
  animation: sectNumPulse 3s ease-in-out infinite;
  position: relative;
  padding-right: 40px;
}
.sect-num::after {
  content: '';
  position: absolute; right: 0; top: 50%;
  width: 24px; height: 1px;
  background: linear-gradient(90deg, var(--green), transparent);
  opacity: 0.4;
  animation: sectLineFlicker 4s ease-in-out infinite;
}
@keyframes sectNumPulse {
  0%,100% { text-shadow: 0 0 8px rgba(0,255,65,0.4), 0 0 20px rgba(0,255,65,0.15); opacity: 0.8; }
  50% { text-shadow: 0 0 12px rgba(0,255,65,0.6), 0 0 30px rgba(0,255,65,0.25); opacity: 1; }
}
@keyframes sectLineFlicker {
  0%,100% { opacity: 0.4; width: 24px; }
  50% { opacity: 0.7; width: 32px; }
  75% { opacity: 0.2; width: 18px; }
}

/* Glitch Title */
.sect-title {
  font-family: var(--font); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 10px; position: relative; display: inline-block;
}
.sect-title::before, .sect-title::after {
  content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  overflow: hidden; opacity: 0; pointer-events: none;
}
.sect-title::before { color: var(--cyan); }
.sect-title::after { color: var(--red); }
.sect-title:hover::before { opacity: 0.7; animation: glitchSmall1 0.2s steps(2) infinite; }
.sect-title:hover::after { opacity: 0.7; animation: glitchSmall2 0.2s steps(2) infinite; }
@keyframes glitchSmall1 {
  0% { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 1px); }
  50% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -1px); }
  100% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 0); }
}
@keyframes glitchSmall2 {
  0% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
  50% { clip-path: inset(10% 0 50% 0); transform: translate(-2px, 1px); }
  100% { clip-path: inset(40% 0 30% 0); transform: translate(1px, 0); }
}

.sect-sub {
  font-size: 0.8rem; color: var(--muted); max-width: 500px; line-height: 1.6;
  font-style: italic; opacity: 0.7;
}

/* ===== Project Cards ===== */
.projects-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.proj-card {
  position: relative; padding: 28px; border-radius: 2px;
  background: linear-gradient(165deg, rgba(0,255,65,0.02) 0%, transparent 40%);
  border: 1px solid var(--border);
  transition: border-color 0.4s, transform 0.3s, box-shadow 0.4s;
  overflow: hidden; transform-style: preserve-3d;
}
.proj-card-glow {
  position: absolute; top: -60px; right: -60px; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(0,255,65,0.06) 0%, transparent 70%);
  pointer-events: none; transition: opacity 0.5s; opacity: 0;
}
.proj-card:hover { border-color: rgba(0,255,65,0.25); box-shadow: 0 0 40px rgba(0,255,65,0.04); }
.proj-card:hover .proj-card-glow { opacity: 1; }

.proj-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.proj-card-status {
  display: flex; align-items: center; gap: 6px;
}
.live-dot {
  width: 4px; height: 4px; border-radius: 50%; background: var(--green);
  opacity: 0.7; animation: pulse 2s ease-in-out infinite; position: relative;
}
.proj-status-text {
  font-family: var(--mono); font-size: 0.5rem; color: var(--dim);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.proj-card-idx {
  font-family: var(--mono); font-size: 0.7rem; color: var(--dim);
  opacity: 0.4; font-weight: 600;
  transition: opacity 0.4s, color 0.4s, text-shadow 0.4s;
}
.proj-card:hover .proj-card-idx {
  opacity: 0.8; color: var(--green);
  text-shadow: 0 0 10px rgba(0,255,65,0.2);
}

.proj-name {
  font-family: var(--font); font-size: 1.5rem; font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 4px;
  position: relative; display: inline-block;
  text-shadow: 0 0 30px rgba(0,255,65,0.08);
}
.proj-name::after {
  content: ''; position: absolute; bottom: -3px; left: 0; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--green), transparent); transition: width 0.4s;
}
.proj-card:hover .proj-name::after { width: 100%; }

.proj-type {
  font-family: var(--mono); font-size: 0.65rem; color: var(--cyan);
  letter-spacing: 0.04em; margin-bottom: 16px; opacity: 0.7;
}

.proj-desc {
  font-size: 0.82rem; color: var(--muted); line-height: 1.7;
  margin-bottom: 20px; max-width: 460px;
  padding-left: 14px;
  border-left: 2px solid rgba(0,255,65,0.1);
  transition: border-color 0.4s;
}
.proj-card:hover .proj-desc { border-left-color: rgba(0,255,65,0.3); }

.proj-feats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 20px;
}
.proj-feat-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.72rem; color: var(--muted);
  padding: 6px 10px; border-radius: 3px;
  background: rgba(255,255,255,0.015); border: 1px solid rgba(255,255,255,0.03);
  transition: border-color 0.3s, background 0.3s, opacity 0.8s ease, transform 0.8s ease;
  opacity: 0; transform: translateY(12px);
}
.proj-feat-item.revealed {
  opacity: 1; transform: translateY(0);
}
.proj-feat-item:hover {
  border-color: rgba(0,255,65,0.1); background: rgba(0,255,65,0.02);
}
.proj-feat-icon {
  font-size: 0.65rem; color: var(--green); opacity: 0.6; flex-shrink: 0;
}

.proj-stack {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px;
}
.proj-stack span {
  padding: 3px 10px; font-size: 0.62rem; font-weight: 600; font-family: var(--mono);
  color: var(--green-dim); background: rgba(0,255,65,0.04);
  border: 1px solid rgba(0,255,65,0.08); border-radius: 2px;
  transition: border-color 0.3s, color 0.3s;
}
.proj-stack span:hover {
  border-color: rgba(0,255,65,0.2); color: var(--green);
}

.proj-cta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; margin-top: 4px;
  border: 1px solid rgba(0,255,65,0.12); border-radius: 2px;
  background: rgba(0,255,65,0.02);
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  color: var(--green); transition: all 0.3s;
  position: relative; overflow: hidden;
}
.proj-cta::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,255,65,0.04), transparent);
  pointer-events: none;
}
.proj-cta:hover::after {
  animation: ctaScanLine 0.6s ease-out 1;
}
.proj-cta:hover {
  border-color: rgba(0,255,65,0.3);
  background: rgba(0,255,65,0.05);
  box-shadow: 0 0 20px rgba(0,255,65,0.04);
}
.proj-cta-text {
  transition: text-shadow 0.3s;
}
.proj-cta-arrow {
  font-size: 1.1rem; transition: transform 0.3s; opacity: 0.6;
}
.proj-cta:hover .proj-cta-text {
  text-shadow: 0 0 12px rgba(0,255,65,0.3);
}
.proj-cta:hover .proj-cta-arrow { transform: translateX(4px); opacity: 1; }

/* ===== Tech Stack — Arsenal Grid ===== */
.ark-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(0,255,65,0.08);
  border-radius: 2px;
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 0 30px rgba(0,255,65,0.01), 0 2px 16px rgba(0,0,0,0.3);
  position: relative;
}
.ark-grid::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,65,0.15), transparent);
}
.ark-group {
  padding: 18px 22px;
  border-right: 1px solid rgba(0,255,65,0.05);
  border-bottom: 1px solid rgba(0,255,65,0.05);
  position: relative;
  transition: background 0.4s;
}
.ark-group:nth-child(3n) { border-right: none; }
.ark-group:nth-last-child(-n+3) { border-bottom: none; }
.ark-group:hover {
  background: rgba(0,255,65,0.015);
}
.ark-group-label {
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,255,65,0.04);
}
.ark-group:hover .ark-group-label {
  color: var(--green);
  text-shadow: 0 0 10px rgba(0,255,65,0.15);
}
.ark-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ark-item {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  padding: 2px 0 2px 14px;
  position: relative;
  cursor: default;
  transition: color 0.3s, transform 0.3s, text-shadow 0.3s;
}
.ark-item::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--green);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.3s, transform 0.3s;
  text-shadow: 0 0 6px rgba(0,255,65,0.3);
}
.ark-item:hover {
  color: var(--text);
  transform: translateX(4px);
  text-shadow: 0 0 12px rgba(0,255,65,0.1);
}
.ark-item:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* ===== Footer ===== */
.footer { padding: 80px 0 48px; position: relative; z-index: 2; }
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(0,255,65,0.08) 30%, rgba(0,255,65,0.12) 50%, rgba(0,255,65,0.08) 70%, transparent 95%);
}

.cta-block {
  text-align: center; margin-bottom: 48px;
}
.cta-label {
  font-family: var(--mono); font-size: 0.65rem; color: var(--green);
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(0,255,65,0.2);
}
.cta-tg {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 18px 32px; border-radius: 3px;
  background: rgba(0,255,65,0.03);
  border: 1px solid rgba(0,255,65,0.15);
  transition: all 0.4s;
  position: relative; overflow: hidden;
  text-decoration: none;
}
.cta-tg::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,255,65,0.04) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.4s;
}
.cta-tg:hover {
  border-color: rgba(0,255,65,0.4);
  box-shadow: 0 0 30px rgba(0,255,65,0.06), 0 0 60px rgba(0,255,65,0.03);
  transform: translateY(-2px);
}
.cta-tg:hover::before { opacity: 1; }
.cta-tg-icon {
  color: var(--green); display: flex; align-items: center;
  filter: drop-shadow(0 0 6px rgba(0,255,65,0.3));
  transition: filter 0.3s;
}
.cta-tg:hover .cta-tg-icon {
  filter: drop-shadow(0 0 12px rgba(0,255,65,0.5));
}
.cta-tg-body {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}
.cta-tg-handle {
  font-family: var(--mono); font-size: 1.1rem; font-weight: 700;
  color: #fff; letter-spacing: -0.01em;
  text-shadow: 0 0 20px rgba(0,255,65,0.1);
  transition: text-shadow 0.3s, color 0.3s;
}
.cta-tg:hover .cta-tg-handle {
  color: var(--green);
  text-shadow: 0 0 20px rgba(0,255,65,0.3);
}
.cta-tg-sub {
  font-family: var(--mono); font-size: 0.62rem; color: var(--dim);
  letter-spacing: 0.04em;
}
.cta-tg-arrow {
  font-size: 1.3rem; color: var(--green); opacity: 0.4;
  transition: opacity 0.3s, transform 0.3s;
}
.cta-tg:hover .cta-tg-arrow {
  opacity: 1; transform: translateX(6px);
}

.footer-bottom {
  padding-top: 0;
}
.footer-line {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(0,255,65,0.18) 50%, transparent 90%);
  margin-bottom: 24px;
}
.footer-row {
  display: flex; justify-content: center; align-items: center; gap: 24px;
  font-family: var(--mono); font-size: 0.62rem; color: var(--muted);
}
.footer-copy { letter-spacing: 0.06em; }
.footer-built { letter-spacing: 0.06em; }
.footer-heart {
  color: var(--green); font-size: 0.55rem;
  animation: heartPulse 2s ease-in-out infinite;
  display: inline-block;
  vertical-align: middle;
}
@keyframes heartPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

/* ===== Interactive Terminal Panel ===== */
.term-panel {
  background: var(--surface);
  border: 1px solid rgba(0,255,65,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 40px;
  text-align: left;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  box-shadow:
    0 0 40px rgba(0,255,65,0.02),
    0 2px 20px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(0,255,65,0.03);
  position: relative;
}
.term-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,65,0.2), transparent);
}
.term-chrome {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px;
  background: rgba(0,255,65,0.025);
  border-bottom: 1px solid rgba(0,255,65,0.06);
}
.term-chrome-left {
  display: flex; align-items: center; gap: 8px;
}
.term-chrome-dot {
  width: 6px; height: 6px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.term-dot-live {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: termPulse 2s ease-in-out infinite;
}
@keyframes termPulse { 0%,100%{opacity:1}50%{opacity:0.35} }
.term-chrome-label {
  font-family: var(--mono); font-size: 0.62rem;
  color: var(--muted); letter-spacing: 0.02em;
}
.term-chrome-right {
  display: flex; align-items: center; gap: 8px;
}
.term-chrome-tag {
  font-family: var(--mono); font-size: 0.55rem;
  color: var(--dim); letter-spacing: 0.1em;
  padding: 1px 6px; border: 1px solid rgba(0,255,65,0.06);
  border-radius: 2px; background: rgba(0,255,65,0.02);
}
.term-chrome-sep {
  color: var(--dim); opacity: 0.25; font-size: 0.55rem;
}
.term-chrome-status {
  font-family: var(--mono); font-size: 0.55rem;
  color: var(--green); letter-spacing: 0.1em;
  text-shadow: 0 0 8px rgba(0,255,65,0.25);
}
.term-body {
  padding: 14px 16px; max-height: 220px; overflow-y: auto;
  font-family: var(--mono); font-size: 0.7rem; line-height: 1.75;
  display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin; scrollbar-color: var(--dim) transparent;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px, transparent 21px,
    rgba(0,255,65,0.008) 21px, rgba(0,255,65,0.008) 22px
  );
}
.term-body::-webkit-scrollbar { width: 3px; }
.term-body::-webkit-scrollbar-track { background: transparent; }
.term-body::-webkit-scrollbar-thumb { background: rgba(0,255,65,0.15); border-radius: 2px; }
.term-line { color: var(--text); white-space: pre-wrap; word-break: break-word; }
.term-muted { color: var(--muted); }
.term-green { color: var(--green); text-shadow: 0 0 6px rgba(0,255,65,0.15); }
.term-cyan { color: var(--cyan); }
.term-red { color: var(--red); }
.term-dim { color: var(--dim); }
.term-prompt-line { color: var(--muted); }
.term-prompt-line .term-green { color: var(--green); }

.term-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid rgba(0,255,65,0.06);
  background: rgba(0,255,65,0.015);
  position: relative;
}
.term-prompt {
  font-family: var(--mono); font-size: 0.68rem; color: var(--green);
  white-space: nowrap; flex-shrink: 0;
  text-shadow: 0 0 8px rgba(0,255,65,0.2);
}
.term-prompt-colon { color: var(--dim); }
.term-prompt-tilde { color: var(--cyan); text-shadow: 0 0 6px rgba(0,255,255,0.15); }
.term-prompt-dollar { color: var(--green); margin-left: 1px; }
.term-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-family: var(--mono); font-size: 0.7rem; color: var(--text);
  caret-color: var(--green);
}
.term-cursor-blink {
  width: 7px; height: 14px;
  background: var(--green); opacity: 0.7;
  animation: termCursorBlink 1s step-end infinite;
  flex-shrink: 0;
  display: none;
}
.term-input:placeholder-shown ~ .term-cursor-blink { display: block; }
@keyframes termCursorBlink { 0%,100%{opacity:0.7}50%{opacity:0} }

/* ===== Live Access Log ===== */
.access-log {
  position: fixed; bottom: 16px; left: 16px; z-index: 100;
  width: 340px; background: rgba(2,2,4,0.94);
  border: 1px solid rgba(0,255,65,0.1); border-radius: 3px;
  font-family: var(--mono); font-size: 0.52rem;
  backdrop-filter: blur(10px); opacity: 0.75;
  transition: opacity 0.3s;
}
.access-log:hover { opacity: 1; }
.access-log.log-open { opacity: 0.95; }
.log-chrome {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  background: rgba(0,255,65,0.03);
  color: var(--muted); font-size: 0.55rem;
  cursor: pointer; user-select: none;
  transition: background 0.2s;
}
.log-chrome:hover { background: rgba(0,255,65,0.04); }
.log-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 4px rgba(0,255,65,0.5); animation: pulse 1.5s ease-in-out infinite; }
.log-toggle-icon {
  margin-left: auto; font-size: 0.45rem; color: var(--dim);
  transition: transform 0.3s;
  display: inline-block;
}
.access-log.log-open .log-toggle-icon { transform: rotate(90deg); }
.log-body {
  padding: 0; max-height: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 1px;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.access-log.log-open .log-body {
  padding: 6px 10px; max-height: 160px;
  border-top: 1px solid var(--border);
}
.log-line {
  color: var(--dim); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
  animation: logFadeIn 0.3s ease-out;
  line-height: 1.5;
}
.log-line .log-time { color: var(--muted); }
.log-line .log-status-ok { color: var(--green-dim); }
.log-line .log-status-err { color: var(--red); }
.log-line .log-path { color: var(--muted); }
@keyframes logFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Scan Line on Cards ===== */
.proj-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0; z-index: 5; transition: opacity 0.2s;
}
.proj-card:hover::before {
  opacity: 0.6;
  animation: scanLine 1.5s ease-in-out infinite;
}
@keyframes scanLine {
  0% { top: 0; opacity: 0.6; }
  50% { opacity: 0.3; }
  100% { top: 100%; opacity: 0; }
}

/* ===== System Toasts ===== */
.toast-container {
  position: fixed; top: calc(var(--nav-h) + 12px); right: 16px; z-index: 500;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.sys-toast {
  background: rgba(2,2,4,0.94); border: 1px solid var(--border);
  border-radius: 3px; padding: 10px 16px; font-family: var(--mono);
  font-size: 0.65rem; color: var(--muted); backdrop-filter: blur(8px);
  transform: translateX(120%); opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  pointer-events: auto; white-space: nowrap; max-width: 360px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.sys-toast.show { transform: translateX(0); opacity: 1; }
.sys-toast.hide { transform: translateX(120%); opacity: 0; }
.toast-tag { font-weight: 700; margin-right: 6px; }
.toast-tag-ok { color: var(--green); }
.toast-tag-warn { color: #ffbd2e; }
.toast-tag-info { color: var(--cyan); }

/* ===== Konami Overlay ===== */
.konami-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,255,65,0.08);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; transition: opacity 0.2s;
}
.konami-overlay.active {
  opacity: 1;
  animation: konamiFlash 1s steps(4) 1;
}
@keyframes konamiFlash {
  0% { background: rgba(0,255,65,0.15); }
  25% { background: rgba(0,255,65,0.02); }
  50% { background: rgba(0,255,65,0.12); }
  75% { background: rgba(0,255,65,0.04); }
  100% { background: rgba(0,255,65,0.08); }
}
.konami-msg {
  font-family: var(--mono); font-size: clamp(1.2rem, 4vw, 2.5rem); font-weight: 700;
  color: var(--green); text-shadow: 0 0 40px rgba(0,255,65,0.6), 0 0 80px rgba(0,255,65,0.3);
  letter-spacing: 0.15em; opacity: 0;
}
.konami-overlay.active .konami-msg {
  animation: konamiText 2s ease-out forwards;
}
@keyframes konamiText {
  0% { opacity: 0; transform: scale(0.8); }
  20% { opacity: 1; transform: scale(1.05); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

/* ===== Particle Canvas ===== */
#particleCanvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1; opacity: 0.25;
}

/* ===== ASCII Floaters ===== */
.ascii-floaters {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden;
}
.ascii-float {
  position: absolute;
  font-family: var(--mono); font-size: 0.5rem; color: rgba(0,255,65,0.06);
  white-space: pre; line-height: 1.2;
  animation: asciiDrift linear infinite;
  opacity: 0;
}
@keyframes asciiDrift {
  0% { opacity: 0; transform: translateY(10vh) rotate(0deg); }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-110vh) rotate(8deg); }
}

/* ===== Circuit Lines ===== */
.sect-circuit { position: relative; overflow: hidden; }
.circuit-line {
  position: absolute; top: 0; width: 1px; height: 100%;
  pointer-events: none; z-index: 0;
}
.circuit-line-left { left: 20px; }
.circuit-line-right { right: 20px; }
.circuit-line::before {
  content: '';
  position: absolute; top: 0; left: 0; width: 1px; height: 100%;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 20px,
    rgba(0,255,65,0.06) 20px,
    rgba(0,255,65,0.06) 22px,
    transparent 22px,
    transparent 40px
  );
}
.circuit-line::after {
  content: '';
  position: absolute; width: 5px; height: 5px;
  border: 1px solid rgba(0,255,65,0.1); border-radius: 50%;
  left: -2px;
  animation: circuitNodePulse 4s ease-in-out infinite;
}
.circuit-line-left::after { top: 30%; }
.circuit-line-right::after { top: 60%; }
@keyframes circuitNodePulse {
  0%,100% { box-shadow: 0 0 3px rgba(0,255,65,0.1); opacity: 0.3; }
  50% { box-shadow: 0 0 8px rgba(0,255,65,0.3); opacity: 0.8; }
}

/* ===== System Metrics ===== */
.metrics-section {
  padding: 48px 0; position: relative; z-index: 2;
}
.mon-label {
  font-family: var(--mono); font-size: 0.55rem; color: var(--green-dim);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 12px; text-align: center;
}
.mon-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 2px; overflow: hidden;
  font-family: var(--mono); font-size: 0.72rem;
}
.mon-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: rgba(0,255,65,0.03);
  border-bottom: 1px solid var(--border);
}
.mon-title {
  color: var(--green); font-weight: 700; font-size: 0.75rem;
  display: flex; align-items: center; gap: 8px;
  text-shadow: 0 0 8px rgba(0,255,65,0.2);
}
.mon-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block;
  animation: monPulse 2s ease-in-out infinite;
}
.mon-dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); }
@keyframes monPulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}
.mon-meta {
  color: var(--dim); font-size: 0.62rem; display: flex; gap: 6px; align-items: center;
}
.mon-sep { opacity: 0.3; }
.mon-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.mon-cell {
  padding: 14px 16px; border-right: 1px solid var(--border);
  position: relative;
}
.mon-cell:last-child { border-right: none; }
.mon-cell-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.mon-cell-label {
  color: var(--dim); font-size: 0.55rem; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mon-cell-val {
  color: var(--green); font-size: 0.78rem; font-weight: 600;
  text-shadow: 0 0 6px rgba(0,255,65,0.15);
}
.mon-cell-val-cyan { color: var(--cyan); text-shadow: 0 0 6px rgba(0,255,255,0.15); }
.mon-bar {
  width: 100%; height: 3px; background: rgba(255,255,255,0.04);
  margin-bottom: 8px; overflow: hidden;
}
.mon-fill {
  height: 100%; width: 0%; background: var(--green);
  transition: width 2.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 4px rgba(0,255,65,0.25);
}
.mon-fill-cyan { background: var(--cyan); box-shadow: 0 0 4px rgba(0,255,255,0.25); }
.mon-fill-warn { background: #ffa500; box-shadow: 0 0 4px rgba(255,165,0,0.25); }
.mon-detail {
  display: flex; justify-content: space-between; gap: 8px;
  color: var(--dim); font-size: 0.58rem;
}
.mon-detail em {
  font-style: normal; color: rgba(0,255,65,0.6);
}
.mon-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 16px; background: rgba(0,255,65,0.015);
}
.mon-vms { display: flex; gap: 6px; flex-wrap: wrap; }
.mon-vm-tag {
  font-size: 0.58rem; padding: 2px 8px; border-radius: 2px;
  border: 1px solid var(--border);
}
.mon-vm-run { color: var(--green); border-color: rgba(0,255,65,0.15); }
.mon-vm-stop { color: var(--dim); border-color: rgba(255,255,255,0.05); opacity: 0.5; }
.mon-refresh { color: var(--dim); font-size: 0.55rem; }

/* ===== Vignette Overlay ===== */
.vignette-overlay {
  position: fixed; inset: 0; z-index: 9996; pointer-events: none;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 50%, rgba(0,0,0,0.5) 100%);
}

/* ===== Project Card Perspective ===== */
.projects-row { perspective: 1200px; }
.proj-card { transition: border-color 0.4s, transform 0.3s, box-shadow 0.4s; }
.proj-card:hover { transform: translateZ(8px); }

/* ===== Nav Logo Idle Glow ===== */
@keyframes logoIdleGlow {
  0%, 100% { text-shadow: none; }
  50% { text-shadow: 0 0 12px rgba(0,255,65,0.25), 0 0 24px rgba(0,255,65,0.1); }
}
.nav-logo-glow { animation: logoIdleGlow 5s ease-in-out infinite; }

/* ===== Scroll Hint Fade ===== */
.scroll-hint { transition: opacity 0.6s ease; }
.scroll-hint.faded { opacity: 0; pointer-events: none; }

/* ===== Hero Animated Gradient Border ===== */
.hero-inner { position: relative; }
.hero-inner::before {
  content: ''; position: absolute; inset: -1px; border-radius: 4px;
  padding: 1px; pointer-events: none; z-index: -1;
  background: conic-gradient(from var(--hero-border-angle, 0deg), transparent 60%, rgba(0,255,65,0.12) 70%, rgba(0,255,255,0.08) 80%, transparent 90%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: heroRotateBorder 8s linear infinite;
}
@property --hero-border-angle {
  syntax: '<angle>'; initial-value: 0deg; inherits: false;
}
@keyframes heroRotateBorder {
  to { --hero-border-angle: 360deg; }
}

/* ===== Floating Keyword Badges ===== */
.keyword-badges { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.keyword-badge {
  position: absolute; font-family: var(--mono); font-size: 0.5rem;
  color: rgba(0,255,65,0.12); letter-spacing: 0.08em;
  padding: 2px 8px; border: 1px solid rgba(0,255,65,0.04); border-radius: 2px;
  animation: badgeDrift 20s ease-in-out infinite alternate;
  white-space: nowrap;
}
.keyword-badge:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; }
.keyword-badge:nth-child(2) { top: 25%; right: 10%; animation-delay: -5s; animation-duration: 18s; }
.keyword-badge:nth-child(3) { bottom: 30%; left: 12%; animation-delay: -10s; animation-duration: 22s; }
.keyword-badge:nth-child(4) { bottom: 20%; right: 8%; animation-delay: -3s; animation-duration: 16s; }
@keyframes badgeDrift {
  0% { transform: translate(0, 0) rotate(-1deg); opacity: 0.6; }
  25% { transform: translate(8px, -12px) rotate(0.5deg); opacity: 0.4; }
  50% { transform: translate(-5px, 8px) rotate(-0.5deg); opacity: 0.7; }
  75% { transform: translate(12px, -5px) rotate(1deg); opacity: 0.3; }
  100% { transform: translate(-8px, 12px) rotate(-0.5deg); opacity: 0.5; }
}

/* ===== Motto Cursor ===== */
.motto-cursor {
  display: inline-block; width: 1ch; color: var(--green);
  animation: blink 1s step-end infinite;
  font-weight: 400;
}

/* ===== Live Dot ===== */

/* ===== CTA Scan Line ===== */
.cta-tg::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,255,65,0.06), transparent);
  transition: none; pointer-events: none;
}
.cta-tg:hover::after {
  animation: ctaScanLine 0.8s ease-out 1;
}
@keyframes ctaScanLine {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ===== Nav Active Indicator ===== */
.nav-active-dot {
  position: absolute; bottom: 0; height: 2px; width: 20px;
  background: var(--green); border-radius: 1px;
  box-shadow: 0 0 8px rgba(0,255,65,0.4);
  transition: left 0.35s cubic-bezier(0.22, 1, 0.36, 1), width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

/* ===== Energy Pulse Between Sections ===== */
.energy-rule {
  position: relative; width: 100%; height: 1px; z-index: 2;
  background: linear-gradient(90deg, transparent 5%, rgba(0,255,65,0.06) 50%, transparent 95%);
  overflow: visible;
}
.energy-rule::after {
  content: ''; position: absolute; top: -1px; width: 40px; height: 3px;
  background: radial-gradient(ellipse, rgba(0,255,65,0.5) 0%, transparent 70%);
  border-radius: 50%;
  animation: energyPulse 4s ease-in-out infinite;
}
@keyframes energyPulse {
  0% { left: -40px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* ===== CTA Glow Heartbeat ===== */
@keyframes ctaHeartbeat {
  0%, 100% { box-shadow: 0 0 0 rgba(0,255,65,0); }
  30% { box-shadow: 0 0 20px rgba(0,255,65,0.06); }
  50% { box-shadow: 0 0 30px rgba(0,255,65,0.08), 0 0 60px rgba(0,255,65,0.03); }
  70% { box-shadow: 0 0 15px rgba(0,255,65,0.04); }
}
.cta-tg { animation: ctaHeartbeat 4s ease-in-out infinite; }

/* ===== Mon Bar Shimmer ===== */
.mon-fill { position: relative; overflow: hidden; }
.mon-fill::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: barShimmer 5s ease-in-out infinite;
}
@keyframes barShimmer {
  0%, 70% { left: -60%; }
  100% { left: 160%; }
}

/* ===== Marquee Hover Interaction ===== */
.marquee-strip:hover .marquee-track { animation-duration: 120s; }
.marquee-strip:hover .marquee-text { color: var(--muted); text-shadow: 0 0 6px rgba(0,255,65,0.08); }

/* ===== Arsenal Cascade Reveal ===== */
.ark-group {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.ark-group.revealed { opacity: 1; transform: translateY(0); }

/* ===== Section Number Count-Up ===== */
.sect-num { transition: text-shadow 0.3s; }

/* ===== Footer Slide-Up ===== */
.term-panel.slide-up {
  animation: termSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes termSlideUp {
  0% { opacity: 0; transform: translateY(40px); }
  70% { transform: translateY(-4px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== Project Card Entrance (3D) ===== */
.proj-card.card-entering {
  animation: cardDeal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes cardDeal {
  0% { opacity: 0; transform: perspective(800px) rotateX(8deg) translateY(30px); }
  100% { opacity: 1; transform: perspective(800px) rotateX(0) translateY(0); }
}

/* ===== Animations ===== */
.anim-up { opacity: 0; transform: translateY(24px); animation: animUpFallback 0s 3.5s forwards; }
@keyframes animUpFallback { to { opacity: 1; transform: none; } }

/* ===== Responsive: Tablet ===== */
@media (max-width: 900px) {
  .projects-row { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .proj-feats-grid { grid-template-columns: 1fr; }
  .sect { padding: 60px 0; }
  .access-log { width: 280px; }
  .mon-grid { grid-template-columns: repeat(2, 1fr); }
  .mon-cell:nth-child(2) { border-right: none; }
  .ark-grid { grid-template-columns: repeat(2, 1fr); }
  .ark-group:nth-child(3n) { border-right: 1px solid rgba(0,255,65,0.05); }
  .ark-group:nth-child(2n) { border-right: none; }
  .ark-group:nth-last-child(-n+3) { border-bottom: 1px solid rgba(0,255,65,0.05); }
  .ark-group:nth-last-child(-n+2) { border-bottom: none; }
  .circuit-line { display: none; }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-right-mobile { display: flex; }
  .mobile-menu-btn { display: flex; }

  .hero { padding: calc(var(--nav-h) + 16px) 16px 36px; }
  .hero-name { white-space: normal; word-break: break-all; }

  .sect { padding: 48px 0; }
  .sect-head { margin-bottom: 28px; }

  .proj-name { font-size: 1.15rem; }

  .footer { padding: 60px 0 24px; }
  .cta-tg { padding: 14px 20px; gap: 12px; }
  .cta-tg-handle { font-size: 0.9rem; }

  .access-log { width: 240px; bottom: 8px; left: 8px; }
  .hex-column { display: none; }
  .ark-grid { grid-template-columns: repeat(2, 1fr); }
  .mon-grid { grid-template-columns: 1fr; }
  .mon-cell { border-right: none; border-bottom: 1px solid var(--border); padding: 10px 12px; }
  .mon-cell:last-child { border-bottom: none; }
  .mon-header { flex-direction: column; gap: 4px; align-items: flex-start; }
  .mon-meta { flex-wrap: wrap; }
  .mon-footer { flex-direction: column; gap: 6px; align-items: flex-start; }
  .ascii-floaters { display: none; }
  #particleCanvas { display: none; }

  .footer-row { flex-direction: column; gap: 6px; text-align: center; }
  .toast-container { right: 8px; top: calc(var(--nav-h) + 8px); }
  .sys-toast { font-size: 0.58rem; padding: 8px 12px; max-width: 280px; }

  .term-panel { margin-left: 0; margin-right: 0; }
  .term-body { max-height: 180px; font-size: 0.63rem; }
  .term-input { font-size: 0.63rem; }
  .term-prompt { font-size: 0.6rem; }
  .term-chrome-right { display: none; }
  .term-chrome-label { font-size: 0.58rem; }
}

/* ===== Responsive: Small Mobile ===== */
@media (max-width: 380px) {
  .hero-motto { font-size: 0.68rem; }
  .container { padding: 0 16px; }
}

/* ===== Responsive: Ultra-wide ===== */
@media (min-width: 1440px) {
  .container { max-width: 1200px; }
  .nav-container { max-width: 1200px; }
  .hero-inner { max-width: 1200px; }
}

/* ===== Easter Egg Styles ===== */

/* God mode (iddqd) */
.god-mode * {
  text-shadow: 0 0 10px #ffd700, 0 0 20px #ffa500 !important;
}
.god-mode {
  animation: godFlash 0.5s ease 2;
}
@keyframes godFlash {
  0%, 100% { background: var(--bg); }
  50% { background: rgba(255,215,0,0.08); }
}

/* Noclip float */
.noclip-float {
  animation: noclipDrift 3s ease-in-out infinite alternate !important;
}
@keyframes noclipDrift {
  0% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-15px) rotate(0.5deg); }
  66% { transform: translateY(10px) rotate(-0.3deg); }
  100% { transform: translateY(-8px) rotate(0.2deg); }
}

/* Hello World overlay */
.hello-world-overlay {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.85);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.hello-world-overlay.active { opacity: 1; }
.hello-world-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2rem, 8vw, 6rem);
  color: #00ff41;
  text-shadow: 0 0 30px #00ff41, 0 0 60px #00ff41;
  animation: helloGlow 1s ease-in-out infinite alternate;
}
@keyframes helloGlow {
  from { text-shadow: 0 0 20px #00ff41, 0 0 40px #00ff41; }
  to   { text-shadow: 0 0 40px #00ff41, 0 0 80px #00ff41, 0 0 120px #00ff41; }
}

/* Earthquake */
.earthquake {
  animation: quake 0.08s infinite alternate !important;
}
@keyframes quake {
  0% { transform: translate(2px, 1px); }
  25% { transform: translate(-2px, -1px); }
  50% { transform: translate(1px, -2px); }
  75% { transform: translate(-1px, 2px); }
  100% { transform: translate(2px, -1px); }
}

/* DVD Screensaver */
.dvd-screensaver {
  position: fixed;
  z-index: 99998;
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 800;
  color: #00ff41;
  text-shadow: 0 0 20px currentColor;
  pointer-events: none;
  letter-spacing: 0.15em;
}

/* Confetti */
.confetti-container {
  position: fixed; inset: 0;
  z-index: 99999;
  pointer-events: none;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px; height: 10px;
  opacity: 0.9;
  animation: confettiFall 3s ease-in forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* CRT mode */
.crt-mode .scanlines { opacity: 0.15 !important; }
.crt-mode { filter: sepia(0.15) brightness(0.95); }

/* Debug overlay */
.debug-overlay {
  position: fixed; top: 60px; left: 10px;
  z-index: 99999;
  background: rgba(0,0,0,0.85);
  border: 1px solid var(--green);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--green);
  white-space: pre;
  pointer-events: none;
  line-height: 1.6;
}

/* Retro mode */
.retro-mode {
  font-family: 'Courier New', monospace !important;
  image-rendering: pixelated;
}
.retro-mode * {
  font-family: 'Courier New', monospace !important;
  border-radius: 0 !important;
}
