/* =============================================
   ROOT & RESET
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0d0f14;
  --bg-2:      #12151d;
  --bg-3:      #1a1e2a;
  --border:    #232838;
  --text:      #e2e8f0;
  --text-muted:#8892a4;
  --accent:    #6366f1;
  --accent-2:  #818cf8;
  --accent-glow: rgba(99,102,241,0.25);
  --green:     #34d399;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius:    12px;
  --transition: 0.25s ease;
  --max-w:     1100px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* =============================================
   UTILITIES
   ============================================= */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.highlight {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  transform: translateY(-2px);
}
.btn-sm { padding: 0.45rem 1rem; font-size: 0.875rem; }

/* =============================================
   SECTION LAYOUT
   ============================================= */
.section { padding: 6rem 0; }
.section:nth-child(even) { background: var(--bg-2); }

.section-header { text-align: center; margin-bottom: 3.5rem; }

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.section-desc {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================
   HEADER / NAV
   ============================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.75rem 0;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}
.header.scrolled {
  background: rgba(13,15,20,0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav { display: flex; align-items: center; justify-content: space-between; }

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  width: 40px; height: 40px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.nav-logo:hover { background: var(--accent); color: #fff; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: var(--accent-2);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem 0 4rem;
  position: relative;
  background:
    radial-gradient(ellipse 70% 60% at 70% 50%, rgba(99,102,241,0.08) 0%, transparent 70%),
    var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: center;
}

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.hero-bio {
  max-width: 520px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }

.hero-socials {
  display: flex;
  gap: 1rem;
}
.hero-socials a {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.hero-socials a svg { width: 18px; height: 18px; }
.hero-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Code Orbit */
.hero-visual {
  position: relative;
  width: 360px;
  height: 360px;
  flex-shrink: 0;
  align-self: center;
}

.code-orbit {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(99,102,241,0.18);
}
.orbit-ring.ring-outer {
  inset: 0;
  animation: spinSlow 30s linear infinite;
}
.orbit-ring.ring-inner {
  inset: 50px;
  border-style: dashed;
  border-color: rgba(99,102,241,0.1);
  animation: spinSlow 20s linear infinite reverse;
}

.orbit-core {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(129,140,248,0.06));
  border: 1.5px solid rgba(99,102,241,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-2);
  box-shadow: 0 0 60px rgba(99,102,241,0.12), inset 0 0 30px rgba(99,102,241,0.04);
  position: relative;
  z-index: 2;
}
.orbit-core svg {
  width: 56px;
  height: 56px;
}

/* Orbiting nodes — 5 nodes rotating around the center */
.orbit-node {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  background: var(--bg-2);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 100px;
  color: var(--accent-2);
  white-space: nowrap;
  z-index: 3;
  top: 50%;
  left: 50%;
  animation: orbitCircle 20s linear infinite;
}

/* Each node starts at a different point (72° apart for 5 nodes) */
.orbit-node.node-1 { animation-delay: 0s; }
.orbit-node.node-2 { animation-delay: -4s; }
.orbit-node.node-3 { animation-delay: -8s; }
.orbit-node.node-4 { animation-delay: -12s; }
.orbit-node.node-5 { animation-delay: -16s; }

@keyframes orbitCircle {
  from {
    transform: rotate(0deg) translateX(170px) rotate(0deg) translate(-50%, -50%);
  }
  to {
    transform: rotate(360deg) translateX(170px) rotate(-360deg) translate(-50%, -50%);
  }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* =============================================
   ABOUT
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
  line-height: 1.8;
}
.about-text p strong { color: var(--text); }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(20px);
}
.stat-card.visible { opacity: 1; transform: translateY(0); }
.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =============================================
   SKILLS
   ============================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.skill-group {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(20px);
}
.skill-group.visible { opacity: 1; transform: translateY(0); }
.skill-group:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.skill-group-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.skill-group-title svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag {
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  font-weight: 500;
  transition: all var(--transition);
}
.tag-primary  { background: rgba(99,102,241,0.15); color: var(--accent-2); border: 1px solid rgba(99,102,241,0.3); }
.tag-secondary{ background: rgba(52,211,153,0.1);  color: #34d399;         border: 1px solid rgba(52,211,153,0.25); }
.tag-accent   { background: rgba(251,191,36,0.1);  color: #fbbf24;         border: 1px solid rgba(251,191,36,0.25); }
.tag-muted    { background: var(--bg);             color: var(--text-muted);border: 1px solid var(--border); }
.tag-sm       { padding: 0.2rem 0.6rem; font-size: 0.75rem; background: rgba(99,102,241,0.12); color: var(--accent-2); border: 1px solid rgba(99,102,241,0.2); border-radius: 4px; }

.tag:hover { transform: translateY(-2px); }

/* =============================================
   EXPERIENCE TIMELINE
   ============================================= */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.4s ease;
}
.timeline-item.visible { opacity: 1; transform: translateX(0); }

.timeline-marker {
  position: absolute;
  left: -2.4rem;
  top: 0.4rem;
  width: 12px; height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.timeline-content {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.timeline-content:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.timeline-role {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.timeline-company {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 0.2rem;
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
}

.timeline-list { padding-left: 1.25rem; list-style: disc; }
.timeline-list li {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  line-height: 1.7;
}
.timeline-list li strong { color: var(--text); }

/* =============================================
   PROJECTS
   ============================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(24px);
}
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 32px var(--accent-glow);
}

.project-icon {
  padding: 1.75rem 1.75rem 0;
}
.project-icon svg {
  width: 36px; height: 36px;
  color: var(--accent);
  stroke-width: 1.5;
}

.project-body { padding: 1.25rem 1.75rem 1.75rem; flex: 1; display: flex; flex-direction: column; }
.project-title  { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.project-subtitle { font-size: 0.8rem; color: var(--accent); font-family: var(--font-mono); margin-bottom: 1rem; }
.project-desc {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.75;
  flex: 1;
  margin-bottom: 1.25rem;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }

/* =============================================
   EDUCATION
   ============================================= */
.edu-card {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 600px;
  margin: 0 auto;
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(20px);
}
.edu-card.visible { opacity: 1; transform: translateY(0); }
.edu-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.edu-icon {
  width: 64px; height: 64px;
  border-radius: 12px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.edu-icon svg { width: 28px; height: 28px; color: var(--accent); }
.edu-degree { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.edu-school  { color: var(--accent); font-family: var(--font-mono); font-size: 0.9rem; margin-bottom: 0.5rem; }
.edu-year    {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  display: inline-block;
}

/* =============================================
   CONTACT
   ============================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all var(--transition);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
}
.contact-card.visible { opacity: 1; transform: translateY(0); }
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.contact-location { cursor: default; }

.contact-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 20px; height: 20px; color: var(--accent); }
.contact-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.2rem; }
.contact-value { font-size: 0.9rem; color: var(--text); font-weight: 500; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy { font-size: 0.85rem; color: var(--text-muted); }
.footer-links a {
  font-size: 0.85rem;
  color: var(--accent);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent-2); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; align-items: center; }
  .hero-visual { width: 280px; height: 280px; margin: 0 auto; align-self: auto; order: -1; }
  .orbit-core { width: 90px; height: 90px; }
  .orbit-core svg { width: 42px; height: 42px; }
  .orbit-ring.ring-inner { inset: 36px; }
  .orbit-node { font-size: 0.65rem; padding: 0.25rem 0.65rem; animation-name: orbitCircleMobile; }
  .hero-actions { justify-content: center; }
  .hero-socials { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}

@keyframes orbitCircleMobile {
  from {
    transform: rotate(0deg) translateX(120px) rotate(0deg) translate(-50%, -50%);
  }
  to {
    transform: rotate(360deg) translateX(120px) rotate(-360deg) translate(-50%, -50%);
  }
}

@media (max-width: 700px) {
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(13,15,20,0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform var(--transition);
    pointer-events: none;
  }
  .nav-links.open { transform: translateY(0); pointer-events: all; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
  }
  .nav-toggle { display: flex; }

  .timeline { padding-left: 1.5rem; }
  .timeline-marker { left: -1.9rem; }
  .timeline-header { flex-direction: column; align-items: flex-start; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .edu-card { flex-direction: column; text-align: center; }
}
