/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}
:root {
  --bg-primary:   #0a0a0f;
  --bg-secondary: #111118;
  --bg-card:      #16161f;
  --bg-card-hover:#1c1c28;
  --accent:       #3b82f6;
  --accent-glow:  rgba(59,130,246,0.35);
  --accent-light: #60a5fa;
  --accent-dark:  #1d4ed8;
  --text-primary: #e2e8f0;
  --text-secondary:#94a3b8;
  --text-muted:   #64748b;
  --border:       rgba(59,130,246,0.18);
  --border-subtle:rgba(255,255,255,0.06);
  --success:      #10b981;
  --warning:      #f59e0b;
  --purple:       #8b5cf6;
  --pink:         #ec4899;
}
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible keyboard focus */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 3px; }

/* ===== CANVAS PARTICLES ===== */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ===== AURORA BACKGROUND (signature hero element) ===== */
.aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora::before, .aurora::after {
  content: '';
  position: absolute;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.22;
}
.aurora::before {
  top: -20%; left: -10%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  animation: auroraDrift 16s ease-in-out infinite;
}
.aurora::after {
  bottom: -25%; right: -10%;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
  animation: auroraDrift 20s ease-in-out infinite reverse;
}
@keyframes auroraDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(4%, 6%) scale(1.08); }
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Fira Code', monospace;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.05em;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  z-index: 1;
}
.hero-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dark), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem; font-weight: 800;
  color: #fff;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--accent);
  box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(59,130,246,0.15);
  animation: avatarPulse 3s ease-in-out infinite, fadeInDown 0.8s ease both;
  position: relative;
}
.hero-avatar::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.4;
  animation: avatarRing 3s ease-in-out infinite;
}
@keyframes avatarPulse {
  0%,100% { box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(59,130,246,0.15); }
  50%      { box-shadow: 0 0 60px var(--accent-glow), 0 0 120px rgba(59,130,246,0.25); }
}
@keyframes avatarRing {
  0%,100% { transform: scale(1); opacity: 0.4; }
  50%      { transform: scale(1.08); opacity: 0.1; }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(59,130,246,0.12);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  color: var(--accent-light);
  margin-bottom: 1.2rem;
  animation: fadeInDown 0.8s 0.1s ease both;
  font-family: 'Fira Code', monospace;
}
.hero-badge::before { content: '▶'; font-size: 0.6rem; }
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  animation: fadeInDown 0.8s 0.2s ease both;
}
.hero h1 span {
  background: linear-gradient(90deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  animation: fadeInDown 0.8s 0.3s ease both;
}
.hero-stack {
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.8s 0.4s ease both;
}
.hero-cta {
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
  animation: fadeInDown 0.8s 0.5s ease both;
}
.btn-primary {
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 30px var(--accent-glow);
  transform: translateY(-2px);
}
.btn-outline {
  padding: 0.75rem 2rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59,130,246,0.08);
  transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
main { position: relative; z-index: 1; }
section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}
.section-label {
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}
h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.section-line {
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  border-radius: 2px;
  margin-bottom: 3rem;
}

/* ===== EXPERIENCE TIMELINE ===== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--purple), transparent);
}
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s ease;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}
.timeline-dot {
  position: absolute;
  left: -2.45rem;
  top: 0.35rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}
.timeline-dot.current {
  background: var(--success);
  box-shadow: 0 0 12px rgba(16,185,129,0.5);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%,100% { box-shadow: 0 0 12px rgba(16,185,129,0.5); }
  50%      { box-shadow: 0 0 20px rgba(16,185,129,0.8); }
}
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.3s;
}
.timeline-card:hover { border-color: var(--border); }
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.timeline-role {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.timeline-date {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(59,130,246,0.1);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.15rem 0.6rem;
  white-space: nowrap;
}
.timeline-company {
  font-size: 0.85rem;
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.timeline-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-top: 0.75rem;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.skills-category h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-family: 'Fira Code', monospace;
}
.skill-item { margin-bottom: 1rem; }
.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.skill-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.skill-pct {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--accent);
}
.skill-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.fill-blue   { background: linear-gradient(90deg, var(--accent-dark), var(--accent)); }
.fill-purple { background: linear-gradient(90deg, var(--purple), #a78bfa); }
.fill-green  { background: linear-gradient(90deg, #059669, var(--success)); }
.fill-orange { background: linear-gradient(90deg, #d97706, var(--warning)); }

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 1.75rem;
  transition: all 0.35s ease;
  opacity: 0;
  transform: translateY(24px);
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  transform: scaleX(0);
  transition: transform 0.35s ease;
}
.project-card:hover::before { transform: scaleX(1); }
.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.project-card:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px var(--border);
}
.project-card.in-progress {
  border-color: rgba(16,185,129,0.3);
}
.project-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(59,130,246,0.12);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
.project-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.project-card p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}
.tag {
  display: inline-block;
  background: rgba(59,130,246,0.1);
  color: var(--accent-light);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 20px;
  padding: 0.15rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: 'Fira Code', monospace;
}
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.project-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: gap 0.2s, color 0.2s;
}
.project-link:hover { color: var(--accent-light); gap: 0.6rem; }

.progress-note {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--success);
  font-weight: 600;
}
.progress-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(16,185,129,0.6);
  animation: pulseDot 2s infinite;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } }
.about-text { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.8; }
.about-text strong { color: var(--text-primary); }
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}
.stat-card:hover { border-color: var(--border); transform: translateY(-2px); }
.stat-number {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== CONTACT ===== */
.contact-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-wrapper::before {
  content: '';
  position: absolute;
  top: -40%; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.contact-wrapper h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.contact-wrapper p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.contact-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.65rem 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.3s;
}
.contact-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59,130,246,0.08);
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.82rem;
  position: relative;
  z-index: 1;
}
footer span { color: var(--accent); }

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s, border-color 0.3s;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.scroll-top:hover { border-color: var(--accent); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
