:root {
  --bg: #f7f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e5e7eb;
  --primary: #6d28d9;
  --secondary: #00b4d8;
  --grad: linear-gradient(135deg, var(--primary), var(--secondary));
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --ring: rgba(109, 40, 217, 0.2);
  --nav-bg: rgba(255,255,255,0.7);
  --glass: blur(10px);
}

.dark {
  --bg: #0b1020;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9aa4b2;
  --border: #1f2937;
  --primary: #a78bfa;
  --secondary: #22d3ee;
  --grad: linear-gradient(135deg, var(--primary), var(--secondary));
  --shadow: 0 10px 30px rgba(0,0,0,0.4);
  --ring: rgba(167, 139, 250, 0.25);
  --nav-bg: rgba(17,24,39,0.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, 'Helvetica Neue', Arial;
  color: var(--text);
  background: radial-gradient(1200px 800px at 80% -10%, rgba(109,40,217,0.08), transparent 60%),
              radial-gradient(1000px 700px at -10% 10%, rgba(34,211,238,0.08), transparent 60%),
              var(--bg);
}

section { padding: 140px 20px; }
@media (max-width: 768px) {
  section { padding: 100px 16px; }
}
section + section { margin-top: 40px; }
#contact { padding-bottom: 180px; }
.container { max-width: 1100px; margin: 0 auto; }
.navbar { position: fixed; inset-inline: 0; top: 0; z-index: 50; transform: translateY(-100%); transition: transform 700ms ease; backdrop-filter: var(--glass); background: var(--nav-bg); border-bottom: 1px solid var(--border); }
.navbar.visible { transform: translateY(0); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0px; }
.brand { font-weight: 700; }
.brand .pill { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.3em; }
.nav-links { display: flex; gap: 16px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text); opacity: 0.9; font-weight: 500; }
.nav-links a:hover { opacity: 1; }
.btn { border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow); text-decoration: none; font-weight: 600; }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.btn-primary { background: var(--grad); color: white; border: none; }
.toggle { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  cursor: pointer; 
  border-radius: 999px; 
  padding: 8px; 
  border: 1px solid var(--border); 
  background: var(--card); 
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  width: 40px;
  height: 40px;
  overflow: hidden;
}

.toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--grad);
  transition: left 0.3s ease;
  z-index: -1;
}

.toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(17, 24, 39, 0.15);
  border-color: transparent;
}

.toggle:hover::before {
  left: 0;
}

.sun-icon, .moon-icon {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
  color: var(--text);
  z-index: 1;
}

.toggle:hover .sun-icon,
.toggle:hover .moon-icon {
  color: white;
}

.sun-icon {
  opacity: 1;
  transform: rotate(0deg);
}

.moon-icon {
  opacity: 0;
  transform: rotate(180deg);
}

.dark .sun-icon {
  opacity: 0;
  transform: rotate(180deg);
}

.dark .moon-icon {
  opacity: 1;
  transform: rotate(0deg);
}
.hero { min-height: 100vh; display: grid; place-items: center; overflow: hidden; }
.intro { text-align: center; }
.intro h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin: 0 0 10px; }
.intro p { font-size: clamp(1rem, 2.5vw, 1.25rem); color: var(--muted); margin: 0 0 24px; }
.tagline { 
  display: inline-block; 
  padding: 12px 20px; 
  border-radius: 999px; 
  border: 1px solid var(--border); 
  background: var(--card); 
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.tagline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--grad);
  transition: left 0.3s ease;
  z-index: -1;
}

.tagline:hover {
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(17, 24, 39, 0.15);
}

.tagline:hover::before {
  left: 0;
}
.reveal-up { opacity: 0; transform: translateY(14px); animation: rise 900ms ease forwards; }
.reveal-up:nth-child(1) { animation-delay: 200ms; }
.reveal-up:nth-child(2) { animation-delay: 450ms; }
.reveal-up:nth-child(3) { animation-delay: 700ms; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
.scroll-cue { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 0.9rem; opacity: 0; animation: cue 2s ease 1.4s forwards; }
@keyframes cue { to { opacity: 1; } }
.section-title { font-size: clamp(1.4rem, 2.5vw, 2rem); margin-bottom: 18px; }
.section-sub { color: var(--muted); margin-bottom: 30px; }

.scroll-cue a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px dashed var(--border);
  border-radius: 999px;
  background: var(--card);
}
.scroll-cue a:hover { opacity: 0.9; }


.about-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.1rem;
}
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.card { 
  grid-column: span 6; 
  background: var(--card); 
  border: 1px solid var(--border); 
  border-radius: 18px; 
  padding: 24px; 
  box-shadow: var(--shadow); 
  position: relative; 
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
  border-color: var(--primary);
}

.card h3 {
  margin: 0 0 12px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.card p {
  margin: 0 0 16px 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

.chip {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

@media (max-width: 900px) { .card { grid-column: span 12; } }
.chip { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: 0.85rem; color: var(--muted); }
.chip .icon { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 6px var(--ring); }
.accent-bar { position: absolute; inset-inline: auto 0; top: 0; height: 3px; width: 100%; background: var(--grad); }
.reveal { opacity: 0; transform: translateY(16px) scale(0.98); transition: all 700ms cubic-bezier(.2,.65,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0) scale(1); }
footer { padding: 48px 20px; color: var(--muted); text-align: center; border-top: 1px solid var(--border); background: linear-gradient(180deg, transparent, rgba(0,0,0,0.02)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { height: 8px; }
.cta { display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; text-decoration: none; background: var(--grad); color: white; font-weight: 700; box-shadow: var(--shadow); }

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 14px;
}

/* Timeline Styles */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--grad);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
  padding-left: 32px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--grad);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 4px var(--ring);
  z-index: 2;
}

.timeline-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(17, 24, 39, 0.12);
  border-color: var(--primary);
}

.timeline-date {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-content h3 {
  margin: 0 0 12px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.timeline-content p {
  margin: 0 0 16px 0;
  color: var(--muted);
  line-height: 1.6;
}

.timeline-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: color-mix(in oklab, var(--primary) 10%, var(--card));
  border: 1px solid color-mix(in oklab, var(--primary) 20%, var(--border));
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  transition: all 0.2s ease;
}

.tag:hover {
  background: color-mix(in oklab, var(--primary) 15%, var(--card));
  transform: translateY(-1px);
}

/* Responsive Timeline */
@media (max-width: 768px) {
  .timeline {
    padding-left: 30px;
  }
  
  .timeline::before {
    left: 15px;
  }
  
  .timeline-item {
    padding-left: 24px;
  }
  
  .timeline-dot {
    left: -3px;
    width: 10px;
    height: 10px;
  }
  
  .timeline-content {
    padding: 20px;
  }
  
  .timeline-content h3 {
    font-size: 1.1rem;
  }
}
