/* ═══ Design Tokens ═══ */
:root {
  --bg-deep: #07101f;
  --bg-section: #0c1629;
  --bg-alt: #101e38;
  --bg-card: #0f1a2e;
  --bg-card-hover: #162240;
  --border: rgba(91, 141, 237, 0.12);
  --border-hover: rgba(91, 141, 237, 0.3);
  --accent: #5b8dee;
  --accent-light: #8bb0f7;
  --accent-glow: rgba(91, 141, 237, 0.25);
  --accent2: #8b78e6;
  --text: #e2e8f0;
  --text-dim: rgba(226, 232, 240, 0.6);
  --text-muted: rgba(226, 232, 240, 0.4);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══ Reset ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

/* ═══ Utility ═══ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }
.section { padding: 100px 0; }
.section-alt { background: var(--bg-section); }
.section-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 16px; font-family: var(--font-mono); }
.label-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse-dot 2s infinite; }
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; margin-bottom: 12px; line-height: 1.2; }
.section-subtitle { color: var(--text-dim); font-size: 1.05rem; max-width: 600px; margin-bottom: 48px; }

/* ═══ NAV ═══ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: rgba(7, 16, 31, 0.85);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--text); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-dim); transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 12px; }
.nav-icon { color: var(--text-dim); transition: color var(--transition); display: flex; align-items: center; }
.nav-icon:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: var(--transition); }

/* ═══ HERO ═══ */
#hero {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 120px 24px 100px; text-align: center; overflow: visible;
}
#hero-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--accent);
  background: rgba(91, 141, 237, 0.1); border: 1px solid rgba(91, 141, 237, 0.2);
  padding: 6px 16px; border-radius: 50px; margin-bottom: 24px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pulse-dot 2s infinite; }
#hero h1 {
  font-family: var(--font-display); font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900; line-height: 1.05; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-role {
  font-family: var(--font-mono); font-size: 1.1rem; color: var(--accent);
  margin-bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.role-prefix { color: var(--text-muted); }
.cursor { animation: blink 1s step-end infinite; }
.hero-tagline { font-size: 1.15rem; color: var(--text-dim); margin-bottom: 32px; line-height: 1.6; }
.hero-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 40px; }
.hero-pills span {
  font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 50px;
  background: rgba(91, 141, 237, 0.1); border: 1px solid rgba(91, 141, 237, 0.2);
  color: var(--accent-light); font-family: var(--font-mono);
}
.hero-stats { display: flex; justify-content: center; gap: 40px; margin-bottom: 40px; }
.stat { text-align: center; }
.stat-num { display: block; font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.hero-ctas { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  padding: 12px 28px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; transition: all var(--transition); border: none; cursor: pointer;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-glow); color: #fff; }
.btn-outline {
  padding: 12px 28px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  background: transparent; border: 1px solid var(--border-hover); color: var(--text-dim);
  transition: all var(--transition); cursor: pointer; display: inline-flex; align-items: center;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.scroll-indicator {
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-indicator span { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); }
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--accent), transparent); animation: scroll-pulse 2s infinite; }

/* ═══ ABOUT ═══ */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-text h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 20px; line-height: 1.3; }
.about-text > p { color: var(--text-dim); margin-bottom: 16px; font-size: 0.95rem; }
.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.about-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; transition: all var(--transition);
}
.about-card:hover { border-color: var(--border-hover); transform: translateY(-4px); background: var(--bg-card-hover); }
.card-icon { font-size: 1.6rem; margin-bottom: 8px; }
.about-card h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.about-card p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }
.profile-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; text-align: center; position: sticky; top: 88px;
}
.profile-card img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); margin-bottom: 16px; }
.profile-info h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.profile-role { display: block; font-size: 0.85rem; color: var(--accent); margin: 4px 0; }
.profile-loc { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }
.profile-details { border-top: 1px solid var(--border); padding-top: 16px; text-align: left; }
.detail { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.8rem; }
.detail-key { color: var(--text-muted); }
.detail-val { color: var(--text-dim); font-weight: 500; }
.profile-links { display: flex; gap: 12px; margin-top: 16px; justify-content: center; }
.profile-links a {
  font-size: 0.8rem; font-weight: 600; padding: 6px 14px; border-radius: var(--radius-sm);
  background: rgba(91, 141, 237, 0.1); border: 1px solid var(--border); color: var(--accent);
  transition: all var(--transition);
}
.profile-links a:hover { background: var(--accent); color: #fff; }

/* ═══ PIPELINE ═══ */
.pipeline-flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 8px 0 20px; }
.pipe-stage {
  flex: 1; min-width: 160px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 16px; text-align: center;
  transition: all var(--transition); display: flex; flex-direction: column; align-items: center;
}
.pipe-stage:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.pipe-stage::before { content: attr(data-step); font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-bottom: 8px; letter-spacing: 1px; }
.pipe-icon { font-size: 1.6rem; margin-bottom: 8px; }
.pipe-stage h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.pipe-stage p { font-size: 0.7rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 10px; }
.pipe-tools { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.pipe-tools span { font-size: 10px; padding: 3px 8px; border-radius: 4px; background: rgba(91,141,237,0.1); color: var(--accent); font-family: var(--font-mono); }
.pipe-arrow { display: flex; align-items: center; padding: 0 4px; flex-shrink: 0; align-self: center; }
.terminal {
  margin-top: 48px; background: #0d1117; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: #161b22; border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title { margin-left: 8px; font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.terminal-body {
  padding: 20px; font-family: var(--font-mono); font-size: 13px; line-height: 1.8;
  color: var(--text-dim); min-height: 200px; overflow-x: auto;
}
.terminal-body code { white-space: pre; }

/* ═══ TECH STACK ═══ */
.stack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stack-category {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: all var(--transition);
}
.stack-category:hover { border-color: var(--border-hover); }
.stack-category h4 { font-size: 0.85rem; font-weight: 600; color: var(--accent); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-mono); }
.stack-items { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-items span {
  font-size: 12px; padding: 6px 12px; border-radius: 6px;
  background: rgba(91, 141, 237, 0.08); border: 1px solid var(--border);
  color: var(--text-dim); font-weight: 500; transition: all var(--transition);
}
.stack-items span:hover { border-color: var(--accent); color: var(--accent); background: rgba(91,141,237,0.15); }

/* ═══ PROJECTS ═══ */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: all var(--transition);
}
.project-card:hover { border-color: var(--border-hover); transform: translateY(-4px); }
.project-card.enterprise { border-color: rgba(91, 141, 237, 0.25); background: linear-gradient(135deg, var(--bg-card) 0%, rgba(91, 141, 237, 0.05) 100%); }
.project-badge { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.project-card h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.project-card h3 a { color: var(--text); }
.project-card h3 a:hover { color: var(--accent); }
.project-card > p { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 16px; line-height: 1.5; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tags span { font-size: 11px; padding: 4px 10px; border-radius: 4px; background: rgba(91,141,237,0.1); color: var(--accent); font-family: var(--font-mono); }
.projects-cta { text-align: center; margin-top: 40px; }

/* ═══ EXPERIENCE ═══ */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--accent), var(--border)); }
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-dot {
  position: absolute; left: -32px; top: 6px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--bg-deep); border: 3px solid var(--accent);
}
.timeline-content {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: all var(--transition);
}
.timeline-content:hover { border-color: var(--border-hover); }
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.timeline-content h3 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.timeline-company { font-size: 0.85rem; color: var(--accent); font-weight: 500; }
.timeline-date { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); white-space: nowrap; }
.timeline-content ul { padding-left: 0; margin-bottom: 12px; }
.timeline-content li { font-size: 0.85rem; color: var(--text-dim); padding: 4px 0; padding-left: 16px; position: relative; }
.timeline-content li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline-tags span { font-size: 11px; padding: 3px 10px; border-radius: 4px; background: rgba(91,141,237,0.1); color: var(--accent); font-family: var(--font-mono); }
.education-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.edu-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: all var(--transition);
}
.edu-card:hover { border-color: var(--border-hover); }
.edu-card h4 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.edu-card p { font-size: 0.85rem; color: var(--text-dim); margin-top: 8px; }


/* ═══ CONTACT ═══ */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.contact-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; text-align: center; transition: all var(--transition); display: block; color: var(--text);
}
.contact-card:hover { border-color: var(--border-hover); transform: translateY(-4px); color: var(--text); }
.contact-icon { font-size: 1.6rem; margin-bottom: 10px; }
.contact-card h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
.contact-card span { font-size: 0.75rem; color: var(--text-muted); word-break: break-all; }

/* ═══ FOOTER ═══ */
footer {
  padding: 40px 0; text-align: center; border-top: 1px solid var(--border);
  background: var(--bg-deep);
}
footer p { font-size: 0.85rem; color: var(--text-dim); }
.footer-sub { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

/* ═══ ANIMATIONS ═══ */
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes scroll-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-cards { grid-template-columns: repeat(3, 1fr); }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: rgba(7,16,31,0.98); flex-direction: column; padding: 20px; gap: 16px; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .section { padding: 60px 0; }
  #hero { padding: 100px 16px 40px; }
  #hero h1 { font-size: 2.2rem; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .about-cards { grid-template-columns: 1fr; }
  .pipeline-flow { flex-direction: column; align-items: center; }
  .pipe-arrow { transform: rotate(90deg); }
  .projects-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .timeline-header { flex-direction: column; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-pills { gap: 6px; }
  .hero-pills span { font-size: 11px; padding: 4px 10px; }
  .stat-num { font-size: 1.4rem; }
}