/* ─── Custom Properties ─────────────────────────────── */
:root {
  --bg: #0a0a0f;
  --bg-alt: #0f0f1a;
  --surface: #14141f;
  --surface-hover: #1c1c2e;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text: #e8e8f0;
  --text-muted: #7a7a9a;
  --text-dim: #4a4a6a;
  --accent: #6c63ff;
  --accent-glow: rgba(108, 99, 255, 0.25);
  --accent-light: #a89fff;
  --green: #22c55e;
  --green-glow: rgba(34, 197, 94, 0.15);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --nav-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

strong { color: #fff; font-weight: 600; }

.mono { font-family: 'JetBrains Mono', monospace; font-size: 0.92em; color: var(--accent-light); }

/* ─── Nav ────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: background 200ms var(--ease-out);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent-light);
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 160ms var(--ease-out), background 160ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover {
    color: var(--text);
    background: var(--surface);
  }
}

.nav-link.cta-link {
  background: var(--accent);
  color: #fff;
  font-weight: 500;
}

@media (hover: hover) and (pointer: fine) {
  .nav-link.cta-link:hover {
    background: var(--accent-light);
    color: var(--bg);
  }
}

.nav-link:active {
  transform: scale(0.97);
  transition: transform 100ms var(--ease-out);
}

/* ─── Hero ───────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding-inline: 24px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--green-glow);
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--green);
  letter-spacing: 0.01em;
}

.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
}

.hero-role {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hero-bio {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    box-shadow: 0 0 24px var(--accent-glow);
  }
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover {
    border-color: var(--border-hover);
    background: var(--surface-hover);
  }
}

/* ─── Icon Links ─────────────────────────────────────── */
.hero-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 160ms var(--ease-out), transform 160ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .icon-link:hover {
    color: var(--text);
    transform: translateY(-1px);
  }
}

.icon-link:active { transform: scale(0.97); }

/* ─── Orbit Visual ───────────────────────────────────── */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 420px;
}

.orbit-scene {
  position: relative;
  width: 360px;
  height: 360px;
  perspective: 800px;
}

.orbit-stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(18deg) rotateZ(-6deg);
}

/* Radar ping rings */
.orbit-ping {
  position: absolute;
  top: 50%; left: 50%;
  width: 80px; height: 80px;
  margin: -40px 0 0 -40px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: ping 3s var(--ease-out) infinite;
}
.orbit-ping:nth-child(2) { animation-delay: 1s; }
.orbit-ping:nth-child(3) { animation-delay: 2s; }

@keyframes ping {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(4.2); opacity: 0; }
}

/* Orbit rings */
.orbit-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);
  transform-origin: center center;
}

.orbit-ring-1 {
  width: 200px; height: 200px;
  margin: -100px 0 0 -100px;
}

.orbit-ring-2 {
  width: 320px; height: 320px;
  margin: -160px 0 0 -160px;
}

/* Center node */
.orbit-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 76px; height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c72ff 0%, #9333ea 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: 0.05em;
  box-shadow:
    0 0 0 8px rgba(108,99,255,0.15),
    0 0 40px rgba(108,99,255,0.5),
    0 0 80px rgba(108,99,255,0.25);
  z-index: 10;
  animation: centerPulse 4s ease-in-out infinite;
}

@keyframes centerPulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(108,99,255,0.15), 0 0 40px rgba(108,99,255,0.5), 0 0 80px rgba(108,99,255,0.25); }
  50%       { box-shadow: 0 0 0 14px rgba(108,99,255,0.08), 0 0 60px rgba(108,99,255,0.7), 0 0 120px rgba(108,99,255,0.3); }
}

/* Chip nodes — positioned by JS */
.orbit-node {
  position: absolute;
  top: 50%; left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(20, 20, 31, 0.9);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  cursor: default;
  transition: border-color 200ms var(--ease-out), color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
  /* will be translated by JS */
  transform: translate(-50%, -50%);
  z-index: 5;
}

.orbit-node .node-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--accent);
}

.orbit-node.ring-2 .node-dot { background: #22c55e; box-shadow: 0 0 6px #22c55e; }

@media (hover: hover) and (pointer: fine) {
  .orbit-node:hover {
    border-color: rgba(108,99,255,0.5);
    color: #fff;
    box-shadow: 0 0 20px rgba(108,99,255,0.2);
  }
}

/* Connector lines drawn on canvas */
#orbit-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.tech-chip {
  display: inline-block;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-muted);
}

.tech-chip.small { font-size: 0.68rem; padding: 3px 8px; }

/* ─── Stats Bar ──────────────────────────────────────── */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.stat {
  flex: 1;
  min-width: 140px;
  text-align: center;
  padding: 12px 24px;
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ─── Sections ───────────────────────────────────────── */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
}

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

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 52px;
}

/* ─── Timeline ───────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .timeline-item:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 40px rgba(108,99,255,0.06);
  }
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

.timeline-company {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-light);
}

.timeline-location {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.timeline-role {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.timeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.timeline-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.65;
}

.timeline-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ─── Chips ──────────────────────────────────────────── */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 140ms, color 140ms;
}

.chip.accent {
  background: var(--accent-glow);
  border-color: rgba(108,99,255,0.3);
  color: var(--accent-light);
}

@media (hover: hover) and (pointer: fine) {
  .chip:hover {
    border-color: var(--border-hover);
    color: var(--text);
  }
}

/* ─── Skills Grid ────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.skill-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 200ms var(--ease-out), transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .skill-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  }
}

.skill-card:active {
  transform: scale(0.98);
  transition: transform 100ms var(--ease-out);
}

.skill-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  border: 1px solid rgba(108,99,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  margin-bottom: 16px;
}

.skill-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 14px;
}

/* ─── Awards ─────────────────────────────────────────── */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.award-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  gap: 18px;
  transition: border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .award-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
  }
}

.award-card:active { transform: scale(0.98); transition: transform 100ms; }

.award-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  color: var(--accent-light);
  margin-top: 2px;
}

.award-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.award-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Education ──────────────────────────────────────── */
.edu-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  max-width: 640px;
  transition: border-color 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .edu-card:hover { border-color: var(--border-hover); }
}

.edu-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  border: 1px solid rgba(108,99,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  flex-shrink: 0;
}

.edu-school {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.edu-degree {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.edu-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

/* ─── Contact ────────────────────────────────────────── */
.contact-section {
  background: linear-gradient(135deg, #0d0b1f 0%, #0a0a0f 50%, #0f0a1f 100%);
  position: relative;
  overflow: hidden;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108,99,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.contact-container {
  text-align: center;
  position: relative;
  z-index: 1;
}

.contact-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 36px;
}

.contact-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}

.contact-btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}

@media (hover: hover) and (pointer: fine) {
  .contact-btn:hover { box-shadow: 0 0 24px var(--accent-glow); transform: translateY(-1px); }
  .contact-btn.outline:hover { border-color: rgba(255,255,255,0.5); color: #fff; transform: translateY(-1px); }
}

.contact-btn:active { transform: scale(0.97); }

.contact-phone {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.3);
  font-family: 'JetBrains Mono', monospace;
}

/* ─── Footer ─────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ─── Stagger Animation ──────────────────────────────── */
.stagger-item {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 500ms var(--ease-out) forwards;
}

.stagger-item:nth-child(1) { animation-delay: 100ms; }
.stagger-item:nth-child(2) { animation-delay: 175ms; }
.stagger-item:nth-child(3) { animation-delay: 250ms; }
.stagger-item:nth-child(4) { animation-delay: 325ms; }
.stagger-item:nth-child(5) { animation-delay: 400ms; }
.stagger-item:nth-child(6) { animation-delay: 475ms; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Reveal on Scroll ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-h) + 32px);
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero-visual { height: 300px; }
  .orbit-scene { width: 280px; height: 280px; }
  .orbit-ring-1 { width: 150px; height: 150px; margin: -75px 0 0 -75px; }
  .orbit-ring-2 { width: 250px; height: 250px; margin: -125px 0 0 -125px; }

  .timeline-item { grid-template-columns: 1fr; gap: 16px; }
  .stats-inner { gap: 16px; }
  .stat-divider { display: none; }

  .nav-links .nav-link:not(.cta-link) { display: none; }
}

/* ─── Reduced Motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .stagger-item { animation: fade 0.2s ease forwards; }
  .reveal { transition: opacity 0.2s ease; transform: none; }
  .orbit, .orbit-item { animation: none; }

  @keyframes fade { to { opacity: 1; } }
}
