/* ================================================================
   HEXA PORTFOLIO — Cyberpunk / High-Tech Design System
   Colors: Deep space black + electric cyan + neon green
================================================================ */

:root {
  --bg-primary:    #050510;
  --bg-secondary:  #0a0a1a;
  --bg-card:       #0d0d20;
  --bg-glass:      rgba(13, 13, 32, 0.7);
  --border:        rgba(0, 255, 170, 0.12);
  --border-bright: rgba(0, 255, 170, 0.35);

  --accent-cyan:   #00ffaa;
  --accent-green:  #39ff14;
  --accent-blue:   #0080ff;
  --accent-purple: #8b5cf6;
  --accent-red:    #ff6b6b;
  --accent-gold:   #ffd700;

  --text-primary:  #eaeaf5;
  --text-secondary:#8888aa;
  --text-dim:      #44445a;

  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Space Grotesk', system-ui, sans-serif;

  --glow-cyan:  0 0 20px rgba(0, 255, 170, 0.3), 0 0 40px rgba(0, 255, 170, 0.12);
  --glow-green: 0 0 20px rgba(57, 255, 20, 0.3);

  --radius:    14px;
  --radius-sm: 7px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; cursor: none !important; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── MATRIX CANVAS ──────────────────────────────────────────── */
#matrix-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.035;
  pointer-events: none;
}

/* ── LAYOUT ─────────────────────────────────────────────────── */
section {
  position: relative;
  z-index: 1;
  padding: 110px 5vw;
  max-width: 1280px;
  margin: 0 auto;
}

/* ── NAV ────────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  height: 64px;
  background: rgba(5, 5, 16, 0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
#navbar.scrolled {
  border-bottom-color: var(--border-bright);
  box-shadow: 0 2px 40px rgba(0, 255, 170, 0.06);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.nav-logo .bracket { color: var(--accent-cyan); }
.nav-links {
  display: flex;
  gap: 36px;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}
.nav-links a .prompt { color: var(--accent-cyan); opacity: 0.4; }
.nav-links a:hover,
.nav-links a.active { color: var(--accent-cyan); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent-cyan);
  transition: width var(--transition);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-green);
  letter-spacing: 0.04em;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green), 0 0 14px var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ── SECTION HEADERS ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 60px;
}
.section-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
  opacity: 0.55;
  letter-spacing: 0.08em;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-bright), transparent);
}
.section-sub {
  margin-top: -40px;
  margin-bottom: 52px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 640px;
}

/* ── HERO ───────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 64px;
  max-width: none;
  padding-left: 6vw;
  padding-right: 6vw;
}
#hero-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 80px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
}
.hero-text { order: 1; }
.hero-terminal { order: 2; }
.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  margin-bottom: 10px;
  opacity: 0.75;
  letter-spacing: 0.08em;
}
.hero-name {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 55%, var(--accent-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: clamp(0.82rem, 1.4vw, 0.98rem);
}
.hero-prefix { color: var(--accent-cyan); }
.hero-title { color: var(--text-secondary); min-width: 260px; }
.cursor-blink {
  color: var(--accent-cyan);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 44px;
  max-width: 500px;
}
.highlight { color: var(--accent-cyan); font-weight: 500; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: 0.83rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 24px rgba(0, 255, 170, 0.25);
}
.btn-primary:hover {
  background: #00e899;
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 13px 30px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.83rem;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.btn-ghost:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 170, 0.1);
}
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  animation: float 3s ease-in-out infinite;
}
.scroll-line {
  width: 1px; height: 44px;
  background: linear-gradient(var(--accent-cyan), transparent);
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(9px); }
}

/* ── TERMINAL / CODE WINDOWS ────────────────────────────────── */
.hero-terminal, .code-window, .contact-terminal {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 0 80px rgba(0, 255, 170, 0.04), 0 24px 80px rgba(0, 0, 0, 0.6);
}
.terminal-bar, .cw-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.t-btn { width: 12px; height: 12px; border-radius: 50%; }
.t-red    { background: #ff5f57; }
.t-yellow { background: #febc2e; }
.t-green  { background: #28c840; }
.t-title, .cw-file {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-secondary);
  margin-left: 8px;
}
.terminal-body {
  background: var(--bg-card);
  padding: 22px;
  min-height: 240px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.terminal-line { display: flex; gap: 10px; margin-bottom: 10px; }
.t-prompt { color: var(--accent-green); }
.terminal-output { color: var(--text-secondary); line-height: 2.0; }
.terminal-output .t-key { color: var(--accent-cyan); }
.terminal-output .t-val { color: var(--accent-green); }
.terminal-output .t-num { color: var(--accent-purple); }
.cursor-inline { color: var(--accent-cyan); animation: blink 1s step-end infinite; }
.code-window { font-family: var(--font-mono); font-size: 0.79rem; }
.cw-code {
  background: var(--bg-card);
  padding: 24px;
  overflow-x: auto;
  line-height: 1.9;
}
.c-kw  { color: var(--accent-purple); }
.c-mod { color: var(--accent-cyan); }
.c-cls { color: var(--accent-gold); }
.c-fn  { color: var(--accent-purple); }
.c-name { color: #7dd3fc; }
.c-com { color: var(--text-dim); font-style: italic; }

/* ── ABOUT ──────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-p {
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.9;
  margin-bottom: 22px;
}
.about-stats { display: flex; gap: 20px; margin-top: 44px; }
.stat-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  transition: var(--transition);
}
.stat-card:hover {
  border-color: var(--border-bright);
  box-shadow: var(--glow-cyan);
}
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent-cyan);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 6px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── SKILLS ─────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.skill-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: default;
}
.skill-tag:hover {
  border-color: var(--border-bright);
  color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 255, 170, 0.08);
}
.skill-icon { font-size: 1.05rem; flex-shrink: 0; }
.skill-level { margin-left: auto; display: flex; gap: 3px; flex-shrink: 0; }
.skill-level span {
  width: 4px; height: 12px;
  border-radius: 2px;
  background: var(--text-dim);
}
.skill-level span.active {
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

/* ── AUTOMATIONS ── FULL DETAIL CARDS ───────────────────────── */
.automations-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.auto-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.auto-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green), var(--accent-blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}
.auto-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 60px rgba(0, 255, 170, 0.06);
}
.auto-card:hover::before { transform: scaleX(1); }

/* Card header row */
.auto-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.auto-left { display: flex; align-items: center; gap: 12px; }
.auto-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.auto-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid;
  background: rgba(255,255,255,0.03);
}
.auto-complexity-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.complexity-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.complexity-dots { display: inline-flex; gap: 4px; }
.complexity-dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}
.complexity-dots span.lit {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

/* Icon */
.auto-icon-wrap { margin-bottom: 12px; }
.auto-icon { font-size: 2.4rem; }

/* Title + tagline */
.auto-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}
.auto-tagline {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-cyan);
  margin-bottom: 24px;
  opacity: 0.85;
  line-height: 1.5;
}

/* Description — big, detailed */
.auto-description {
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.95;
  margin-bottom: 28px;
  max-width: 900px;
}

/* Metrics */
.auto-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}
.metric-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 255, 170, 0.07);
  border: 1px solid rgba(0, 255, 170, 0.18);
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-cyan);
}
.metric-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  flex-shrink: 0;
}

/* How it works */
.auto-how {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.how-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.04em;
}
.how-icon { color: var(--accent-cyan); }
.steps-list { display: flex; flex-direction: column; gap: 10px; }
.step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  opacity: 0.6;
  flex-shrink: 0;
  padding-top: 1px;
  letter-spacing: 0.05em;
}
.step-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Tags */
.auto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.auto-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 5px 12px;
  border-radius: 5px;
  background: rgba(128, 0, 255, 0.08);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
  transition: var(--transition);
}
.auto-tag:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-purple);
}

/* Pipeline */
.auto-pipeline {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-bottom: 16px;
}
.pipeline-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 10px;
}
.pipeline-flow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.pipe-arrow { color: var(--accent-green); margin: 0 4px; font-size: 0.9rem; }

/* GitHub ref */
.auto-ref {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}
.ref-label {
  color: var(--accent-cyan);
  opacity: 0.5;
  margin-right: 6px;
}


/* ── CONTACT ────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}
.contact-heading {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.contact-sub {
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.85;
}
.contact-terminal {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.contact-form-body {
  background: var(--bg-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cf-field { display: flex; flex-direction: column; gap: 8px; }
.cf-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
}
.cf-label .t-prompt { color: var(--accent-green); margin-right: 6px; }
.cf-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
}
.cf-input::placeholder { color: var(--text-dim); }
.cf-input:focus {
  border-color: var(--border-bright);
  box-shadow: 0 0 0 3px rgba(0, 255, 170, 0.07);
}
.cf-textarea { resize: vertical; min-height: 110px; }
.cf-submit { width: 100%; justify-content: center; }

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 6vw;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--text-dim);
}
.footer-copy .bracket { color: var(--accent-cyan); opacity: 0.45; }

/* ── CUSTOM CURSOR ──────────────────────────────────────────── */
#cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0;
  box-shadow: 0 0 8px var(--accent-cyan), 0 0 20px rgba(0,255,170,0.4);
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}
#cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 36px; height: 36px;
  border: 2px dotted var(--accent-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: width 0.25s ease, height 0.25s ease, opacity 0.3s ease, border-color 0.25s ease;
  animation: ring-spin 8s linear infinite;
}
@keyframes ring-spin {
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}
#cursor-dot.cursor-hover {
  transform: translate(-50%, -50%) scale(1.8);
  background: var(--accent-green);
  box-shadow: 0 0 12px var(--accent-green), 0 0 30px rgba(57,255,20,0.4);
}
#cursor-ring.cursor-hover {
  width: 54px; height: 54px;
  border-color: var(--accent-green);
}

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-bright); }

/* ── SELECTION ──────────────────────────────────────────────── */
::selection {
  background: rgba(0, 255, 170, 0.18);
  color: var(--accent-cyan);
}

/* ── FADE-IN ANIMATION ──────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   RICH ANIMATIONS & TRANSITIONS
================================================================ */

/* ── SCANLINES OVERLAY ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 170, 0.011) 2px,
    rgba(0, 255, 170, 0.011) 4px
  );
  pointer-events: none;
  z-index: 9990;
  animation: scanlines-drift 10s linear infinite;
}
@keyframes scanlines-drift {
  to { background-position: 0 40px; }
}

/* ── AURORA BACKGROUND ─────────────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: -30%;
  width: 160%; height: 160%;
  background:
    radial-gradient(ellipse 55% 35% at 20% 25%, rgba(0,255,170,0.030) 0%, transparent 55%),
    radial-gradient(ellipse 45% 55% at 78% 68%, rgba(0,128,255,0.024) 0%, transparent 55%),
    radial-gradient(ellipse 40% 45% at 55% 48%, rgba(139,92,246,0.020) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
  animation: aurora-drift 18s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  0%   { transform: translate(0%,    0%); }
  33%  { transform: translate(2%,    1.5%); }
  66%  { transform: translate(-1.5%, 2.5%); }
  100% { transform: translate(1%,   -1.5%); }
}

/* ── NAV ENTRANCE ──────────────────────────────────────────────── */
#navbar { animation: nav-drop 0.7s cubic-bezier(0.22,1,0.36,1) 0.1s both; }
@keyframes nav-drop {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.nav-links li { opacity: 0; animation: nav-item-fall 0.45s ease forwards; }
.nav-links li:nth-child(1) { animation-delay: 0.45s; }
.nav-links li:nth-child(2) { animation-delay: 0.55s; }
.nav-links li:nth-child(3) { animation-delay: 0.65s; }
.nav-links li:nth-child(4) { animation-delay: 0.75s; }
@keyframes nav-item-fall {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── HERO TEXT STAGGER ENTRANCE ────────────────────────────────── */
.hero-greeting {
  opacity: 0;
  animation: slide-from-left 0.7s cubic-bezier(0.22,1,0.36,1) 0.35s forwards;
}
.hero-name {
  opacity: 0;
  background-size: 200% 200%;
  animation:
    name-rise     0.9s cubic-bezier(0.22,1,0.36,1) 0.55s forwards,
    gradient-shift 7s  ease-in-out                  1.5s  infinite alternate;
}
.hero-title-wrap {
  opacity: 0;
  animation: slide-from-left 0.6s cubic-bezier(0.22,1,0.36,1) 0.85s forwards;
}
.hero-desc  { opacity: 0; animation: fade-rise 0.7s ease 1.05s forwards; }
.hero-cta   { opacity: 0; animation: fade-rise 0.7s ease 1.25s forwards; }
.hero-terminal {
  opacity: 0;
  animation: terminal-slide-in 0.9s cubic-bezier(0.22,1,0.36,1) 0.65s forwards;
}
.hero-scroll { opacity: 0; animation: fade-rise 0.6s ease 1.6s forwards; }

@keyframes slide-from-left {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes name-rise {
  from { opacity: 0; transform: translateY(36px) skewX(-4deg); }
  to   { opacity: 1; transform: translateY(0)    skewX(0deg);  }
}
@keyframes fade-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes terminal-slide-in {
  from { opacity: 0; transform: translateX(36px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes gradient-shift {
  0%   { background-position: 0%   50%; }
  100% { background-position: 100% 50%; }
}

/* ── GLITCH ─────────────────────────────────────────────────────── */
@keyframes glitch-main {
  0%   { clip-path: inset(0 0 95% 0);   transform: translate(-3px, 0);   }
  20%  { clip-path: inset(30% 0 55% 0); transform: translate( 3px, 0);   filter: hue-rotate(80deg);  }
  45%  { clip-path: inset(65% 0 15% 0); transform: translate(-2px, 1px); }
  70%  { clip-path: inset(10% 0 75% 0); transform: translate( 2px,-1px); filter: hue-rotate(160deg); }
  100% { clip-path: inset(0 0 0 0);     transform: translate(0,0);       filter: none; }
}
.hero-name.glitching {
  animation:
    glitch-main   0.35s steps(3) forwards,
    gradient-shift 7s  ease-in-out 0.35s infinite alternate !important;
}

/* ── NEON PULSE ON HIGHLIGHTS ──────────────────────────────────── */
.highlight { animation: neon-pulse 3.5s ease-in-out infinite; }
@keyframes neon-pulse {
  0%,100% { text-shadow: 0 0 6px rgba(0,255,170,0.35); }
  50%      { text-shadow: 0 0 12px rgba(0,255,170,0.75), 0 0 28px rgba(0,255,170,0.25); }
}

/* ── SECTION HEADER REVEAL ─────────────────────────────────────── */
.section-num {
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.section-title {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.55s 0.1s ease, transform 0.55s 0.1s ease;
}
.section-line {
  transform-origin: left; transform: scaleX(0);
  transition: transform 0.75s cubic-bezier(0.22,1,0.36,1) 0.15s;
}
.section-header.hx-revealed .section-num   { opacity: 1; transform: translateY(0); }
.section-header.hx-revealed .section-title  { opacity: 1; transform: translateY(0); }
.section-header.hx-revealed .section-line   { transform: scaleX(1); }

/* ── SECTION WIPE LINE ─────────────────────────────────────────── */
.hx-wipe-line {
  position: absolute;
  top: 0; left: 0;
  height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.9s cubic-bezier(0.22,1,0.36,1);
  opacity: 0.3; pointer-events: none;
}
section.hx-wipe .hx-wipe-line { transform: scaleX(1); }

/* ── AUTO-CARD 3D TILT & SWEEP ─────────────────────────────────── */
.auto-card {
  will-change: transform;
  transition: transform 0.12s ease, border-color var(--transition), box-shadow var(--transition);
}
.auto-card:hover {
  box-shadow: 0 0 60px rgba(0,255,170,0.1), 0 32px 80px rgba(0,0,0,0.7);
}
.auto-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0; transform: scaleX(0); transform-origin: left;
}
.auto-card:hover::after {
  opacity: 0.7; transform: scaleX(1);
  transition: transform 0.45s ease, opacity 0.3s ease;
}
.card-scan {
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 60%;
  background: linear-gradient(transparent, rgba(0,255,170,0.025), transparent);
  pointer-events: none;
}
.auto-card:hover .card-scan { animation: inner-scan 1.4s ease forwards; }
@keyframes inner-scan {
  from { top: -60%; }
  to   { top: 160%; }
}

/* ── METRIC PILL SHIMMER ───────────────────────────────────────── */
.metric-pill { position: relative; overflow: hidden; }
.metric-pill::before {
  content: '';
  position: absolute;
  top: 0; left: -110%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,255,170,0.15), transparent);
}
.auto-card:hover .metric-pill:nth-child(1)::before { animation: pill-shimmer 0.6s 0.00s ease forwards; }
.auto-card:hover .metric-pill:nth-child(2)::before { animation: pill-shimmer 0.6s 0.10s ease forwards; }
.auto-card:hover .metric-pill:nth-child(3)::before { animation: pill-shimmer 0.6s 0.20s ease forwards; }
@keyframes pill-shimmer {
  from { left: -110%; }
  to   { left:  110%; }
}
.metric-dot { animation: metric-dot-pulse 2.2s ease-in-out infinite; }
@keyframes metric-dot-pulse {
  0%,100% { box-shadow: 0 0 6px var(--accent-green); opacity: 1; }
  50%      { box-shadow: 0 0 14px var(--accent-green), 0 0 22px rgba(57,255,20,0.3); opacity: 0.6; }
}

/* ── STEP ITEMS CASCADE ────────────────────────────────────────── */
.step-item {
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: border-left-color 0.3s ease;
}
.auto-card:hover .step-item               { border-left-color: rgba(0,255,170,0.3); }
.auto-card:hover .step-item:nth-child(1)  { transition-delay: 0.04s; }
.auto-card:hover .step-item:nth-child(2)  { transition-delay: 0.09s; }
.auto-card:hover .step-item:nth-child(3)  { transition-delay: 0.14s; }
.auto-card:hover .step-item:nth-child(4)  { transition-delay: 0.19s; }
.auto-card:hover .step-item:nth-child(5)  { transition-delay: 0.24s; }
.auto-card:hover .step-item:nth-child(6)  { transition-delay: 0.29s; }

/* ── PIPELINE ARROWS MARCH ─────────────────────────────────────── */
.pipe-arrow { display: inline-block; animation: arrow-march 1.8s ease-in-out infinite; }
.pipe-arrow:nth-of-type(1) { animation-delay: 0.00s; }
.pipe-arrow:nth-of-type(2) { animation-delay: 0.22s; }
.pipe-arrow:nth-of-type(3) { animation-delay: 0.44s; }
.pipe-arrow:nth-of-type(4) { animation-delay: 0.66s; }
.pipe-arrow:nth-of-type(5) { animation-delay: 0.88s; }
@keyframes arrow-march {
  0%,100% { opacity: 0.4; transform: translateX(0); }
  50%      { opacity: 1;   transform: translateX(4px); }
}

/* ── AUTO-TAG HOVER LIFT ───────────────────────────────────────── */
.auto-tag:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(139,92,246,0.22); }

/* ── SKILL TAG SHINE ───────────────────────────────────────────── */
.skill-tag { position: relative; overflow: hidden; }
.skill-tag::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(0,255,170,0.08) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.skill-tag:hover::after { transform: translateX(120%); }
.skill-level span.active { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.skill-tag:hover .skill-level span.active {
  transform: scaleY(1.3);
  box-shadow: 0 0 8px var(--accent-cyan), 0 0 16px rgba(0,255,170,0.4);
}

/* ── AUTO-BADGE FLICKER ────────────────────────────────────────── */
.auto-badge { animation: badge-flicker 6s linear infinite; }
@keyframes badge-flicker {
  0%,84%,100% { opacity: 1; }
  86%  { opacity: 0.7; }
  88%  { opacity: 1;   }
  90%  { opacity: 0.5; }
  92%  { opacity: 1;   }
}

/* ── STATUS DOT RIPPLE ─────────────────────────────────────────── */
.status-dot { position: relative; }
.status-dot::before {
  content: '';
  position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--accent-green);
  opacity: 0;
  animation: status-ripple 2.5s ease-out infinite;
}
@keyframes status-ripple {
  0%   { opacity: 0.8; transform: scale(0.8); }
  100% { opacity: 0;   transform: scale(2.4); }
}

/* ── TERMINAL SCANLINE ─────────────────────────────────────────── */
.terminal-body { position: relative; overflow: hidden; }
.terminal-body::after {
  content: '';
  position: absolute; left: 0; right: 0; height: 3px;
  background: linear-gradient(transparent, rgba(0,255,170,0.13), transparent);
  pointer-events: none;
  animation: term-scan 5s linear infinite;
}
@keyframes term-scan {
  from { top: -3%; }
  to   { top: 103%; }
}

/* ── CODE WINDOW SHEEN ─────────────────────────────────────────── */
.code-window { position: relative; overflow: hidden; }
.code-window::after {
  content: '';
  position: absolute;
  top: 0; left: -50%; width: 35%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0,255,170,0.035), transparent);
  pointer-events: none;
  animation: code-sheen 7s ease-in-out infinite;
}
@keyframes code-sheen {
  0%   { left: -50%; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: 150%; opacity: 0; }
}

/* ── BUTTON SHINE + RIPPLE ─────────────────────────────────────── */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.btn-primary:hover::before { transform: translateX(120%); }
.btn-ripple {
  position: absolute; border-radius: 50%;
  transform: scale(0);
  background: rgba(5,5,16,0.28);
  animation: btn-ripple-burst 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes btn-ripple-burst {
  to { transform: scale(4); opacity: 0; }
}
.btn-ghost { position: relative; overflow: hidden; }
.btn-ghost::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,255,170,0.05);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
.btn-ghost:hover::before { transform: translateX(0); }

/* ── STAT CARD GLOW ────────────────────────────────────────────── */
.stat-card { position: relative; overflow: hidden; }
.stat-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0,255,170,0.08) 0%, transparent 70%);
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover .stat-num { text-shadow: 0 0 20px var(--accent-cyan), 0 0 40px rgba(0,255,170,0.35); transition: text-shadow 0.3s ease; }

/* ── FOOTER BORDER PULSE ───────────────────────────────────────── */
footer { animation: footer-pulse 5s ease-in-out infinite; }
@keyframes footer-pulse {
  0%,100% { border-top-color: var(--border); }
  50%      { border-top-color: rgba(0,255,170,0.22); }
}

/* ── CONTACT TERMINAL FOCUS GLOW ───────────────────────────────── */
.contact-terminal { transition: box-shadow 0.4s ease, border-color 0.4s ease; }
.contact-terminal:focus-within {
  border-color: var(--border-bright);
  box-shadow: 0 0 40px rgba(0,255,170,0.1), 0 0 80px rgba(0,255,170,0.04);
}

/* ── ABOUT PARAGRAPH REVEAL ────────────────────────────────────── */
.about-p { opacity: 0; transform: translateX(-16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.about-p.hx-revealed  { opacity: 1; transform: translateX(0); }
.about-p:nth-child(2) { transition-delay: 0.18s; }

/* ── SCROLL LINE PULSE ─────────────────────────────────────────── */
.scroll-line { animation: scroll-pulse 1.8s ease-in-out infinite; }
@keyframes scroll-pulse {
  0%,100% { height: 44px; opacity: 1; }
  50%      { height: 20px; opacity: 0.4; }
}

/* ── CARD RISE (overrides basic fade-in) ───────────────────────── */
.auto-card.fade-in.visible {
  animation: card-rise 0.7s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes card-rise {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── SKILL POP-IN ──────────────────────────────────────────────── */
.skill-tag.fade-in.visible {
  animation: skill-pop 0.45s cubic-bezier(0.34,1.5,0.64,1) forwards;
}
@keyframes skill-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.88); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .auto-card { padding: 28px 24px; }
  .auto-title { font-size: 1.3rem; }
}
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 48px; }
  .hero-terminal { order: 1; }
  .hero-text { order: 2; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .nav-links { display: none; }
  .about-stats { flex-wrap: wrap; }
  .auto-card { padding: 24px 20px; }
}
@media (max-width: 600px) {
  section { padding: 80px 4vw; }
  .auto-title { font-size: 1.2rem; }
  .auto-description { font-size: 0.9rem; }
  .pipeline-flow { font-size: 0.72rem; }
}
