/* ═══════════════════════════════════════════════════════════════════════════
   v4 — Jackson Chelote Portfolio
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ──────────────────────────────────────────────────────── */
:root {
  --bg:           #030712;
  --surface:      rgba(13,17,23,0.85);
  --surface-s:    #0d1117;
  --card:         rgba(22,27,34,0.9);
  --card-s:       #161b22;
  --border:       rgba(255,255,255,0.06);
  --border-2:     rgba(255,255,255,0.1);
  --text:         #f0f6fc;
  --text-2:       #c9d1d9;
  --muted:        #7d8590;
  --accent:       #00ff87;
  --accent-dim:   rgba(0,255,135,0.08);
  --accent-glow:  0 0 24px rgba(0,255,135,0.25);
  --purple:       #8b5cf6;
  --purple-dim:   rgba(139,92,246,0.08);
  --purple-glow:  0 0 24px rgba(139,92,246,0.25);
  --cyan:         #22d3ee;
  --cyan-dim:     rgba(34,211,238,0.08);
  --red:          #f85149;
  --yellow:       #e3b341;
  --font-head:    'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Cascadia Code', monospace;
  --nav-h:        64px;
  --max-w:        1100px;
  --r:            12px;
  --r-lg:         20px;
  --ease:         cubic-bezier(0.4,0,0.2,1);
}

/* ── RESET ──────────────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100vw;
}
a { text-decoration: none; color: inherit; }
ul,ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

/* ── SCROLLBAR ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* ── PROGRESS BAR ───────────────────────────────────────────────────────── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 9999;
  background: linear-gradient(90deg, var(--accent), var(--cyan), var(--purple));
  width: 0%; box-shadow: 0 0 10px rgba(0,255,135,0.5);
  transition: width 0.08s linear; pointer-events: none;
}

/* ── BACKGROUND LAYERS ──────────────────────────────────────────────────── */
#particles {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  width: 100%; height: 100%;
}
.aurora {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: 0;
  animation: blobFloat 25s var(--ease) infinite, blobIn 2s ease forwards;
}
.blob-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(139,92,246,0.5), rgba(168,85,247,0.25), transparent 70%);
  top: -220px; right: -130px; animation-duration: 22s, 2s; animation-delay: 0s, 0s;
}
.blob-2 {
  width: 580px; height: 580px;
  background: radial-gradient(circle, rgba(34,211,238,0.4), rgba(14,165,233,0.2), transparent 70%);
  bottom: 15%; left: -160px; animation-duration: 28s, 2s; animation-delay: -9s, 0.4s;
}
.blob-3 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(0,255,135,0.3), rgba(16,185,129,0.15), transparent 70%);
  bottom: -80px; right: 22%; animation-duration: 33s, 2s; animation-delay: -18s, 0.8s;
}
@keyframes blobIn    { to { opacity: 0.2; } }
@keyframes blobFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  25%     { transform: translate(28px,-38px) scale(1.04); }
  50%     { transform: translate(-18px,22px) scale(0.97); }
  75%     { transform: translate(38px,28px) scale(1.03); }
}
.dot-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 20%, transparent 100%);
}

/* ── CURSOR GLOW ────────────────────────────────────────────────────────── */
#cursor-glow {
  position: fixed; pointer-events: none; z-index: 9998;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%);
  transform: translate(-50%,-50%); transition: opacity 0.4s; opacity: 0;
}

/* ── LAYOUT ─────────────────────────────────────────────────────────────── */
.content-layer { position: relative; z-index: 1; }
.max-w { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────────────────── */
.grad-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 45%, var(--purple) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; background-size: 200% auto;
  animation: gradShift 5s ease infinite;
}
@keyframes gradShift {
  0%  { background-position: 0% center; }
  50% { background-position: 100% center; }
  100%{ background-position: 0% center; }
}
.section-label {
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px; display: block;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700; line-height: 1.15; color: var(--text); margin-bottom: 12px;
}
.section-sub { font-size: 1rem; color: var(--muted); max-width: 520px; line-height: 1.7; }
.section-head { margin-bottom: 52px; }
.section-head.center { text-align: center; }
.section-head.center .section-sub { margin: 0 auto; }

/* ── TAGS ───────────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 500; font-family: var(--font-mono);
  padding: 3px 9px; border-radius: 6px;
  background: var(--card); border: 1px solid var(--border); color: var(--text-2);
  white-space: nowrap;
}
.tag-green  { background: var(--accent-dim); border-color: rgba(0,255,135,0.2);  color: var(--accent); }
.tag-purple { background: var(--purple-dim); border-color: rgba(139,92,246,0.2); color: var(--purple); }
.tag-cyan   { background: var(--cyan-dim);   border-color: rgba(34,211,238,0.2); color: var(--cyan);  }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px;
  font-size: 0.88rem; font-weight: 600; font-family: var(--font-body);
  transition: all 0.2s var(--ease); cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #030712; border: none; }
.btn-primary:hover {
  background: #2dffa0;
  box-shadow: var(--accent-glow), 0 8px 24px rgba(0,255,135,0.2);
  transform: translateY(-2px);
}
.btn-ghost { background: transparent; border: 1px solid var(--border-2); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--purple); color: var(--purple); background: var(--purple-dim); transform: translateY(-2px); }
.btn-sm { padding: 7px 15px; font-size: 0.8rem; }

/* ── SCROLL REVEAL ──────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ── NAV ────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h); display: flex; align-items: center;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled {
  background: rgba(3,7,18,0.9);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--text); }
.logo-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #030712; flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link { padding: 8px 14px; font-size: 0.85rem; font-weight: 500; color: var(--muted); border-radius: 8px; transition: color 0.2s, background 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-cta {
  margin-left: 8px; padding: 8px 16px;
  background: var(--accent-dim); border: 1px solid rgba(0,255,135,0.2);
  color: var(--accent); border-radius: 8px; font-size: 0.85rem; font-weight: 600;
  transition: all 0.2s var(--ease);
}
.nav-cta:hover { background: var(--accent); color: #030712; border-color: var(--accent); box-shadow: var(--accent-glow); }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; border-radius: 8px; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text-2); border-radius: 2px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE NAV OVERLAY ─────────────────────────────────────────────────── */
.nav-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(3,7,18,0.98); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: scale(0.97) translateY(-6px);
  transition: opacity 0.3s, transform 0.3s;
}
.nav-overlay.open { opacity: 1; pointer-events: all; transform: none; }
.nav-overlay .nav-link {
  font-size: 1.3rem; font-weight: 700; font-family: var(--font-head);
  padding: 12px 36px; color: var(--muted); border-radius: 10px;
  transition: color 0.2s, background 0.2s; text-align: center;
}
.nav-overlay .nav-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-overlay .nav-link.active { color: var(--accent); }
.nav-overlay .nav-cta { margin-top: 16px; font-size: 0.95rem; padding: 12px 28px; }

/* ── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; padding: calc(var(--nav-h) + 72px) 0 96px;
  display: flex; align-items: center; overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; width: 100%; }
.hero-left { min-width: 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 100px;
  background: var(--accent-dim); border: 1px solid rgba(0,255,135,0.18);
  font-size: 0.76rem; font-weight: 500; color: var(--accent);
  font-family: var(--font-mono); margin-bottom: 26px;
}
.badge-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease infinite; flex-shrink: 0;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.4;transform:scale(1.4)} }
.hero-name {
  font-family: var(--font-head); font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 22px;
}
.hero-role {
  font-size: clamp(0.8rem, 1.25vw, 0.9rem); color: var(--muted); margin-bottom: 24px;
  min-height: 40px; display: flex; align-items: center; gap: 4px; flex-wrap: nowrap;
}
#typed-text { color: var(--text-2); }
.typed-cursor {
  display: inline-block; width: 2px; height: 1.1em;
  background: var(--accent); margin-left: 1px; vertical-align: middle;
  animation: blink 1s step-end infinite; box-shadow: 0 0 6px var(--accent);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.hero-bio { font-size: 0.98rem; color: var(--muted); line-height: 1.8; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.social-link {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--muted); transition: all 0.2s var(--ease);
}
.social-link:hover { color: var(--text); border-color: var(--purple); background: var(--purple-dim); box-shadow: var(--purple-glow); transform: translateY(-2px); }

/* ── TEST PANEL (hero right) ────────────────────────────────────────────── */
.hero-right { position: relative; min-width: 0; }
.test-panel-glow {
  position: absolute; inset: -30px;
  background: radial-gradient(ellipse, rgba(139,92,246,0.1), transparent 70%);
  pointer-events: none; z-index: 0; filter: blur(20px);
}
.test-panel {
  position: relative; z-index: 1;
  background: rgba(13,17,23,0.9);
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,255,135,0.04), 0 40px 80px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.07);
  transition: transform 0.4s var(--ease);
}
.panel-chrome {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px 10px;
  background: rgba(22,27,34,0.7); border-bottom: 1px solid var(--border);
}
.chrome-dot { width: 12px; height: 12px; border-radius: 50%; }
.chrome-dot.red { background: #ff5f57; }
.chrome-dot.yellow { background: #ffbd2e; }
.chrome-dot.green { background: #28c840; }
.chrome-title { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.panel-body { padding: 14px 20px 18px; font-family: var(--font-mono); font-size: 0.77rem; line-height: 1.9; }
.panel-line { opacity: 0; transform: translateX(-6px); display: block; }
.panel-line.lit { animation: lineIn 0.22s ease forwards; }
@keyframes lineIn { to { opacity: 1; transform: none; } }
.pl-cmd  { color: var(--cyan); }
.pl-info { color: var(--muted); }
.pl-pass { color: var(--text-2); }
.pl-check { color: var(--accent); }
.pl-time { color: rgba(255,255,255,0.25); font-size: 0.67rem; float: right; }
.pl-summary { color: var(--accent); font-weight: 700; display: block; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; }
.pl-skip { display: block; height: 4px; }

/* ── MARQUEE ────────────────────────────────────────────────────────────── */
.marquee-section {
  padding: 18px 0; overflow: hidden;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: rgba(13,17,23,0.4);
}
.marquee-track { display: flex; width: max-content; animation: marquee 35s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 28px; border-right: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); white-space: nowrap;
  transition: color 0.2s;
}
.marquee-item:hover { color: var(--text-2); }
.marquee-item:nth-child(4n+1) i { color: var(--accent); }
.marquee-item:nth-child(4n+2) i { color: var(--purple); }
.marquee-item:nth-child(4n+3) i { color: var(--cyan); }
.marquee-item:nth-child(4n)   i { color: var(--yellow); }
@keyframes marquee { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ── BENTO STATS ────────────────────────────────────────────────────────── */
.bento-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.bento-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 26px; position: relative; overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.bento-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.bento-card:hover::after { opacity: 1; }
.bento-card:hover { border-color: rgba(0,255,135,0.16); box-shadow: 0 0 30px rgba(0,255,135,0.04), 0 8px 40px rgba(0,0,0,0.3); transform: translateY(-3px); }
.bento-span2 { grid-column: span 2; }
.bento-bg-icon { position: absolute; right: 16px; top: 14px; font-size: 1.8rem; opacity: 0.07; color: var(--accent); }
.bento-num { font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1; color: var(--text); margin-bottom: 8px; }
.bento-sfx { color: var(--accent); font-size: 1.3rem; }
.bento-label { font-size: 0.84rem; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.bento-ctx { font-size: 0.74rem; color: var(--muted); line-height: 1.55; }

/* ── SKILLS ─────────────────────────────────────────────────────────────── */
.skills-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.skill-card {
  background: var(--card-s) padding-box, linear-gradient(135deg,transparent,transparent) border-box;
  border: 1px solid var(--border); border-radius: var(--r); padding: 22px;
  transition: all 0.25s var(--ease);
}
.skill-card:hover {
  background: var(--card-s) padding-box, linear-gradient(135deg, var(--accent), var(--cyan)) border-box;
  border-color: transparent; box-shadow: 0 0 24px rgba(0,255,135,0.05); transform: translateY(-2px);
}
.skill-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.skill-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.88rem; flex-shrink: 0; }
.sk-green  { background: var(--accent-dim); color: var(--accent); }
.sk-purple { background: var(--purple-dim); color: var(--purple); }
.sk-cyan   { background: var(--cyan-dim);   color: var(--cyan);  }
.sk-yellow { background: rgba(227,179,65,0.1); color: var(--yellow); }
.skill-name { font-family: var(--font-head); font-weight: 600; font-size: 0.88rem; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.skill-pill { font-family: var(--font-mono); font-size: 0.68rem; padding: 3px 8px; border-radius: 4px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-2); transition: all 0.15s; }
.skill-pill:hover { background: var(--accent-dim); border-color: rgba(0,255,135,0.2); color: var(--accent); }

/* ── FEATURED WORK (4 company cards) ───────────────────────────────────── */
.work-section { background: rgba(13,17,23,0.5); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.work-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.work-card {
  background: var(--card-s) padding-box, linear-gradient(135deg,transparent,transparent) border-box;
  border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  transition: all 0.3s var(--ease);
}
.work-card:hover {
  background: var(--card-s) padding-box, linear-gradient(135deg, var(--accent), var(--cyan) 50%, var(--purple)) border-box;
  border-color: transparent; transform: translateY(-4px);
  box-shadow: 0 0 40px rgba(0,255,135,0.05), 0 16px 48px rgba(0,0,0,0.4);
}
.work-head {
  padding: 20px 22px; display: flex; align-items: center; gap: 14px;
  position: relative; overflow: hidden; min-height: 88px;
}
.work-head-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.25), rgba(0,0,0,0.05));
  pointer-events: none;
}
.wh-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: rgba(255,255,255,0.92); flex-shrink: 0; position: relative; z-index: 1;
}
.wh-info { position: relative; z-index: 1; flex: 1; min-width: 0; }
.wh-company { font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; color: rgba(255,255,255,0.95); }
.wh-role { font-family: var(--font-mono); font-size: 0.66rem; color: rgba(255,255,255,0.6); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wh-anim { position: relative; z-index: 1; flex-shrink: 0; }

/* Work card animations */
/* 1. Checks (LinkToAny) */
.anim-checks { display: flex; gap: 5px; }
.anim-chk {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,255,135,0.12); border: 1px solid rgba(0,255,135,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: var(--accent);
  opacity: 0; animation: chkPop 5s ease infinite;
}
.anim-chk:nth-child(1){animation-delay:0.0s}
.anim-chk:nth-child(2){animation-delay:0.5s}
.anim-chk:nth-child(3){animation-delay:1.0s}
.anim-chk:nth-child(4){animation-delay:1.5s}
.anim-chk:nth-child(5){animation-delay:2.0s}
@keyframes chkPop {
  0%,8%  { opacity:0; transform:scale(0.5); }
  18%,85%{ opacity:1; transform:scale(1); }
  100%   { opacity:0.3; }
}

/* 2. Coverage donut (Explorex) */
.anim-donut { position: relative; width: 56px; height: 56px; }
.anim-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-bg   { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 5; }
.donut-fill { fill: none; stroke: #fbbf24; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 107; stroke-dashoffset: 107; animation: donutFill 2.5s 0.5s ease forwards; }
.donut-lbl  { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700; color: rgba(255,255,255,0.9); }
@keyframes donutFill { to { stroke-dashoffset: 16.05; } } /* 85% = 107*0.15 */

/* 3. Device rows (Broker Network) */
.anim-devices { display: flex; flex-direction: column; gap: 4px; }
.anim-dev { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.63rem; color: rgba(255,255,255,0.65); }
.anim-dev-chk { color: #34d399; opacity: 0; animation: fadei 0.3s ease forwards; }
.anim-dev:nth-child(1) .anim-dev-chk { animation-delay: 0.3s; }
.anim-dev:nth-child(2) .anim-dev-chk { animation-delay: 0.7s; }
.anim-dev:nth-child(3) .anim-dev-chk { animation-delay: 1.1s; }
@keyframes fadei { to { opacity: 1; } }

/* 4. Velocity bars (Housing.com) */
.anim-velocity { display: flex; gap: 6px; align-items: flex-end; height: 50px; }
.vel-bar {
  width: 20px; border-radius: 4px 4px 0 0; height: 0;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 2px;
  font-family: var(--font-mono); font-size: 0.56rem; color: rgba(255,255,255,0.8);
  animation: growBar 1.2s ease forwards;
}
.vel-b1 { background: rgba(255,255,255,0.15); animation-delay: 0.2s; --h: 28px; }
.vel-b2 { background: rgba(59,130,246,0.55); animation-delay: 0.6s; --h: 48px; }
@keyframes growBar { to { height: var(--h); } }

/* Work card body */
.work-body { padding: 18px 22px 22px; }
.work-stat { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; }
.work-stat-n { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--accent); line-height: 1; }
.work-stat-l { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); }
.work-bullets { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.work-bullet { display: flex; gap: 8px; font-size: 0.82rem; color: var(--text-2); line-height: 1.5; }
.work-bullet::before { content: '▹'; color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* ── CONTACT SECTION (on index + contact page) ──────────────────────────── */
.contact-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; }
.contact-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 22px 14px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: all 0.2s var(--ease); cursor: pointer; position: relative;
}
.contact-card:hover { border-color: var(--purple); background: var(--purple-dim); box-shadow: var(--purple-glow); transform: translateY(-3px); }
.contact-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--purple-dim); border: 1px solid rgba(139,92,246,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--purple);
}
.contact-label { font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-value { font-size: 0.8rem; font-weight: 600; color: var(--text-2); word-break: break-all; }
.copy-email:hover .contact-icon { background: var(--accent-dim); border-color: rgba(0,255,135,0.2); color: var(--accent); }
.copy-tooltip {
  position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #030712;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700;
  padding: 4px 10px; border-radius: 6px;
  opacity: 0; pointer-events: none; white-space: nowrap; transition: opacity 0.2s;
}
.copy-email.copied .copy-tooltip { opacity: 1; }

/* Contact page extras */
.open-to-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-bottom: 60px; }
.open-to-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 24px;
  transition: all 0.2s var(--ease);
}
.open-to-card:hover { border-color: rgba(0,255,135,0.2); transform: translateY(-2px); }
.open-to-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-dim); border: 1px solid rgba(0,255,135,0.2); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--accent); margin-bottom: 14px; }
.open-to-title { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.open-to-desc { font-size: 0.84rem; color: var(--muted); line-height: 1.6; }

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 30px 0; background: rgba(3,7,18,0.8); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-copy { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.footer-links { display: flex; gap: 22px; }
.footer-link { font-size: 0.8rem; color: var(--muted); transition: color 0.2s; }
.footer-link:hover { color: var(--text); }

/* ── PAGE HERO ──────────────────────────────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 80px) 0 68px;
  border-bottom: 1px solid var(--border); position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(139,92,246,0.08), transparent);
  pointer-events: none;
}
.page-hero-title { font-family: var(--font-head); font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; line-height: 1.08; margin-bottom: 18px; }
.page-hero-sub { font-size: 1rem; color: var(--muted); max-width: 600px; line-height: 1.72; }

/* ── EXPERIENCE TABS ────────────────────────────────────────────────────── */
.exp-container { display: grid; grid-template-columns: 230px 1fr; gap: 0; min-height: 540px; }
.exp-tab-list { border-left: 2px solid var(--border); }
.exp-tab-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; cursor: pointer; background: none;
  border: none; border-left: 2px solid transparent; margin-left: -2px;
  transition: all 0.2s; text-align: left;
}
.exp-tab-btn:hover { background: rgba(255,255,255,0.03); }
.exp-tab-btn.active { border-left-color: var(--accent); background: var(--accent-dim); }
.etb-icon {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: rgba(255,255,255,0.85);
  transition: transform 0.2s;
}
.exp-tab-btn.active .etb-icon { transform: scale(1.05); }
.etb-info { min-width: 0; }
.etb-name { font-family: var(--font-head); font-size: 0.84rem; font-weight: 600; color: var(--text-2); transition: color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etb-period { font-family: var(--font-mono); font-size: 0.63rem; color: var(--muted); margin-top: 1px; }
.exp-tab-btn.active .etb-name { color: var(--accent); }

.exp-panel { display: none; padding: 4px 0 0 44px; animation: fadeUp 0.3s ease; }
.exp-panel.active { display: block; }
@keyframes fadeUp { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }

.exp-job-title { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.exp-company-link { color: var(--accent); font-family: var(--font-mono); font-size: 0.82rem; margin-bottom: 6px; display: block; }
.exp-period-row { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.exp-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.exp-bullets { display: flex; flex-direction: column; gap: 11px; }
.exp-bullet { display: block; position: relative; padding-left: 18px; font-size: 0.875rem; color: var(--text-2); line-height: 1.7; }
.exp-bullet::before { content: '▹'; color: var(--accent); position: absolute; left: 0; top: 3px; }
.sub-proj-head { font-family: var(--font-mono); font-size: 0.72rem; color: var(--purple); margin-bottom: 8px; margin-top: 18px; display: flex; align-items: center; gap: 6px; }
.ai-badge {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 22px; padding: 14px 16px;
  background: var(--accent-dim); border: 1px solid rgba(0,255,135,0.14);
  border-radius: 10px; font-size: 0.82rem; color: var(--text-2); line-height: 1.65;
}
.ai-badge i { color: var(--accent); flex-shrink: 0; margin-top: 2px; }

/* ── EDUCATION ──────────────────────────────────────────────────────────── */
.edu-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.edu-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; display: flex; gap: 16px; align-items: flex-start; transition: all 0.2s var(--ease); }
.edu-card:hover { border-color: rgba(34,211,238,0.2); transform: translateY(-2px); }
.edu-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--cyan-dim); color: var(--cyan); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.edu-degree { font-weight: 700; font-size: 0.94rem; margin-bottom: 4px; }
.edu-school { color: var(--muted); font-size: 0.83rem; margin-bottom: 4px; }
.edu-year { font-family: var(--font-mono); font-size: 0.72rem; color: var(--purple); }

/* ── PROJECTS ───────────────────────────────────────────────────────────── */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filter-btn { padding: 7px 17px; border-radius: 100px; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500; background: var(--card); border: 1px solid var(--border); color: var(--muted); transition: all 0.2s; cursor: pointer; }
.filter-btn:hover, .filter-btn.active { background: var(--accent-dim); border-color: rgba(0,255,135,0.25); color: var(--accent); }

.projects-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.proj-card {
  background: var(--card-s) padding-box, linear-gradient(135deg,transparent,transparent) border-box;
  border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  cursor: pointer; transition: all 0.3s var(--ease);
}
.proj-card:hover {
  background: var(--card-s) padding-box, linear-gradient(135deg, var(--accent), var(--cyan) 50%, var(--purple)) border-box;
  border-color: transparent; transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(0,255,135,0.05);
}
.proj-art { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; position: relative; overflow: hidden; }
.proj-art-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, rgba(22,27,34,0.9)); }
.proj-art i { position: relative; z-index: 1; }
.proj-body { padding: 20px 22px 22px; }
.proj-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.proj-status { font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.s-active   { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(139,92,246,0.22); }
.s-deployed { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,255,135,0.22); }
.s-complete { background: var(--cyan-dim);   color: var(--cyan);   border: 1px solid rgba(34,211,238,0.22); }
.proj-title { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.proj-desc  { font-size: 0.84rem; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.proj-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.proj-gh { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); transition: color 0.2s; }
.proj-gh:hover { color: var(--text-2); }
.proj-details { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; font-weight: 600; color: var(--accent); transition: gap 0.2s; }
.proj-details:hover { gap: 9px; }

/* ── MODAL ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(3,7,18,0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface-s);
  border: 1px solid var(--border-2); border-radius: var(--r-lg);
  width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
  position: relative; transform: translateY(20px) scale(0.97);
  transition: transform 0.3s var(--ease);
  box-shadow: 0 0 0 1px rgba(0,255,135,0.05), 0 40px 80px rgba(0,0,0,0.65);
}
.modal-overlay.open .modal { transform: none; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,0.5); border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); font-size: 0.9rem; cursor: pointer;
  transition: all 0.2s; backdrop-filter: blur(6px);
}
.modal-close:hover { background: rgba(255,255,255,0.12); color: var(--text); transform: rotate(90deg); }
.modal-art {
  height: 200px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.modal-art .art-icon { font-size: 4rem; color: rgba(255,255,255,0.8); position: relative; z-index: 2; }
.modal-art-fade { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, var(--surface-s) 100%); z-index: 1; }
.modal-content { padding: 24px 28px 32px; }
.modal-title { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.modal-meta  { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin-bottom: 14px; }
.modal-bullets { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 22px; }
.modal-bullet { display: block; position: relative; padding-left: 18px; font-size: 0.875rem; color: var(--text-2); line-height: 1.65; }
.modal-bullet::before { content: '▹'; color: var(--accent); position: absolute; left: 0; top: 3px; }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid  { grid-template-columns: 1fr; gap: 40px; }
  .hero-right { display: none; } /* hide panel, avoids mobile UX issue */
  .bento-grid { grid-template-columns: repeat(2,1fr); }
  .bento-span2{ grid-column: span 2; }
  .skills-grid{ grid-template-columns: repeat(2,1fr); }
  .work-grid  { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(3,1fr); }
  .exp-container { display: block; }
  .exp-tab-list { display: none; }
  .exp-panel { display: block; padding: 0; }
  .exp-panel + .exp-panel { margin-top: 52px; padding-top: 52px; border-top: 1px solid var(--border); }
  .filter-tabs { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .open-to-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links  { display: none; }
  .hamburger  { display: flex; }
  .section    { padding: 64px 0; }
  .max-w      { padding: 0 16px; }
  .hero-name  { font-size: clamp(2.4rem, 9vw, 3.2rem); }
  .hero-role  { font-size: 0.8rem; min-height: 36px; flex-wrap: nowrap; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-span2{ grid-column: span 1; }
  .skills-grid{ grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2,1fr); }
  .page-hero-title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .exp-tab-btn { padding: 8px 12px; }
  .modal-overlay { inset: var(--nav-h) 0 0 0; align-items: flex-start; padding: 10px; }
  .modal { margin: 0; max-height: calc(100vh - var(--nav-h) - 40px); }
  .modal-close { position: absolute; top: 14px; right: 14px; z-index: 10; }
}

@media (min-width: 641px) {
  .modal-overlay { align-items: flex-start; padding-top: calc(var(--nav-h) + 16px); }
  .modal { max-height: calc(90vh - var(--nav-h)); }
}
