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

:root {
  --bg: #07070f;
  --bg-alt: #0a0a16;
  --card: rgba(255, 255, 255, 0.03);
  --card-border: rgba(139, 92, 246, 0.12);
  --p1: #7c3aed;
  --p2: #a855f7;
  --p3: #c084fc;
  --pglow: rgba(139, 92, 246, 0.25);
  --text: #e2e8f0;
  --text-muted: #64748b;
  --text-sub: #94a3b8;
  --font: 'Inter', system-ui, sans-serif;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

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

strong { color: var(--text); font-weight: 600; }

/* ===== NAV ===== */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: background 0.35s, backdrop-filter 0.35s, padding 0.35s, box-shadow 0.35s;
}

#nav.scrolled {
  background: rgba(7, 7, 15, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 0.875rem 0;
  box-shadow: 0 1px 0 rgba(139, 92, 246, 0.18);
}

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

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.nav-logo:hover { opacity: 0.85; }

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(168, 85, 247, 0.5);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nav-logo:hover .nav-avatar {
  border-color: var(--p2);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-sub);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1.5px;
  background: linear-gradient(90deg, var(--p2), var(--p3));
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* Mobile menu button */
.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-menu-btn span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-sub);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s, background 0.2s;
}

.nav-menu-btn:hover span { background: var(--p3); }
.nav-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-menu-btn.open span:nth-child(2) { opacity: 0; }
.nav-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(7, 7, 15, 0.97);
  backdrop-filter: blur(20px);
  z-index: 90;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-link {
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-sub);
  transition: color 0.2s;
}

.mobile-link:hover { color: var(--p3); }

/* ===== HERO ===== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Glow offset to right for asymmetric composition */
.hero-glow {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.14) 0%, transparent 70%);
  top: 50%; left: 65%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: glowPulse 4s ease-in-out infinite;
}

/* Container for left-aligned hero content */
.hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-content {
  text-align: left;
  max-width: 640px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--p3);
  margin-bottom: 0.875rem;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-name {
  font-family: var(--display);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 0%, #d8b4fe 40%, var(--p2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.35s;
  opacity: 0;
}

.hero-title-wrap {
  font-family: var(--mono);
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--p2);
  margin-bottom: 1.5rem;
  min-height: 2em;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.5s;
  opacity: 0;
}

.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--p3);
  font-weight: 300;
  margin-left: 1px;
}

.hero-summary {
  font-size: 1.05rem;
  color: var(--text-sub);
  max-width: 500px;
  margin: 0 0 2.5rem;
  line-height: 1.75;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.65s;
  opacity: 0;
}

.brand {
  color: var(--p3);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  animation: fadeUp 0.8s ease both;
  animation-delay: 0.8s;
  opacity: 0;
}

.btn-primary {
  padding: 0.875rem 2.125rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  background: linear-gradient(135deg, var(--p1), var(--p2));
  color: #fff;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.4);
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(139, 92, 246, 0.55);
}

.btn-secondary {
  padding: 0.875rem 2.125rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(139, 92, 246, 0.38);
  color: var(--p3);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
  letter-spacing: 0.01em;
}

.btn-secondary:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--p2);
  transform: translateY(-3px);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  animation: fadeIn 1s ease both;
  animation-delay: 1.3s;
  opacity: 0;
  text-decoration: none;
}

.scroll-mouse {
  width: 22px; height: 36px;
  border: 2px solid rgba(139, 92, 246, 0.4);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  transition: border-color 0.2s;
}

.scroll-indicator:hover .scroll-mouse { border-color: var(--p2); }

.scroll-dot {
  width: 4px; height: 8px;
  border-radius: 2px;
  background: var(--p2);
  animation: scrollBounce 2s ease-in-out infinite;
}

/* ===== SECTIONS ===== */
.section { padding: 6rem 0; }
.section--alt { background: var(--bg-alt); }

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

/* Section title with animated underline on scroll */
.section-title {
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px; left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--p1), var(--p3), transparent);
  border-radius: 2px;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s;
}

.section-title.visible::after {
  width: 60%;
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.glass-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 8px 48px rgba(124, 58, 237, 0.1);
  transform: translateY(-3px);
}

/* ===== CAREER HIGHLIGHTS ===== */
.highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.highlight-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

.highlight-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--p3);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}

.highlight-body { flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }

.highlight-title {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.highlight-company {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--p3);
  margin-bottom: 0.5rem;
}

.highlight-desc {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.7;
}

.highlight-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--p3);
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.07);
  align-self: flex-start;
  transition: background 0.22s, border-color 0.22s, transform 0.22s, box-shadow 0.22s;
}

.highlight-link:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: var(--p2);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}

@media (max-width: 768px) {
  .highlights-grid { grid-template-columns: 1fr; }
  .highlights-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.about-text p {
  color: var(--text-sub);
  margin-bottom: 1rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-text p:last-child { margin-bottom: 0; }

.highlight {
  color: var(--p3);
  font-weight: 600;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--card-border);
  border-radius: 0.875rem;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.stat-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.14);
  transform: translateY(-4px);
}

.stat-number {
  display: block;
  font-family: var(--display);
  font-size: 2.25rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--p2), var(--p3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.stat-card--wide {
  grid-column: 1 / -1;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 24px; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--p1) 0%, var(--p3) 60%, transparent 100%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

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

.timeline-marker {
  position: absolute;
  left: calc(-2.5rem - 6px);
  top: 1.75rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--p1), var(--p3));
  border: 2.5px solid var(--bg-alt);
  box-shadow: 0 0 16px var(--pglow);
  z-index: 1;
}

/* Pulsing ring on the current/active role */
.timeline-item--current .timeline-marker::before,
.timeline-item--current .timeline-marker::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid var(--p2);
  animation: markerPulse 2.4s ease-out infinite;
}

.timeline-item--current .timeline-marker::after {
  inset: -3px;
  animation-delay: 1.2s;
}

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

.job-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
}

.job-company {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--p3);
}

.job-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}

.job-date {
  font-family: var(--mono);
  font-size: 0.775rem;
  color: var(--p2);
  font-weight: 500;
}

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

.job-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.job-bullets li {
  color: var(--text-sub);
  font-size: 0.9rem;
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.65;
}

.job-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--p2);
  font-size: 0.7rem;
  top: 0.18em;
}

.mono-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.22);
  color: var(--p3);
  display: inline-block;
  margin: 0 1px;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.skill-category {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.75rem;
  transition: border-color 0.3s, transform 0.3s;
}

.skill-category:hover {
  border-color: rgba(139, 92, 246, 0.28);
  transform: translateY(-2px);
}

.skill-cat-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--p3);
  margin-bottom: 1rem;
}

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

.tag {
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  background: rgba(139, 92, 246, 0.07);
  border: 1px solid rgba(139, 92, 246, 0.18);
  font-size: 0.815rem;
  font-weight: 500;
  color: var(--text-sub);
  transition: background 0.22s, border-color 0.22s, color 0.22s, transform 0.22s, box-shadow 0.22s;
  cursor: default;
  user-select: none;
}

.tag:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(168, 85, 247, 0.5);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
}

/* ===== EDUCATION ===== */
.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.edu-degree {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.edu-major {
  font-size: 1rem;
  color: var(--p3);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.edu-school {
  font-size: 0.875rem;
  color: var(--text-sub);
}

.edu-year {
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--p2);
  flex-shrink: 0;
}

.edu-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  padding: 0.35rem 0.875rem;
  border-radius: 100px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.28);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--p3);
}

/* ===== CONTACT ===== */
/* Gradient backdrop for the contact section */
#contact {
  position: relative;
  background: radial-gradient(ellipse 900px 500px at 50% 0%, rgba(124, 58, 237, 0.13) 0%, transparent 100%),
              var(--bg);
}

.contact-card { text-align: center; }

.contact-text {
  font-size: 1.05rem;
  color: var(--text-sub);
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-sub);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.22s, border-color 0.22s, background 0.22s, transform 0.22s;
}

.contact-link:hover {
  color: var(--p3);
  border-color: rgba(139, 92, 246, 0.38);
  background: rgba(139, 92, 246, 0.08);
  transform: translateY(-3px);
}

.contact-link svg { flex-shrink: 0; }

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2.25rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(9px); opacity: 0.4; }
}

@keyframes glowPulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50%       { opacity: 0.6; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes markerPulse {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* ===== SCROLL REVEAL ===== */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal       { transform: translateY(32px); }
.reveal-left  { transform: translateX(-44px); }
.reveal-right { transform: translateX(44px); }

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }
  .mobile-nav { display: flex; }

  .about-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }

  .timeline { padding-left: 1.75rem; }
  .timeline-marker { left: calc(-1.75rem - 6px); }

  .job-header { flex-direction: column; gap: 0.5rem; }
  .job-meta { align-items: flex-start; }

  .hero-content { max-width: 100%; }
  .hero-name { font-size: clamp(3rem, 12vw, 5rem); }

  .hero-cta { flex-direction: column; align-items: flex-start; }
  .btn-primary, .btn-secondary { width: 100%; max-width: 280px; text-align: center; }

  .section { padding: 4rem 0; }
  .section-title { margin-bottom: 2rem; }
}

@media (max-width: 480px) {
  .about-stats { grid-template-columns: 1fr; }
  .contact-links { flex-direction: column; align-items: center; }
  .contact-link { width: 100%; max-width: 300px; justify-content: center; }
  .hero-cta { align-items: stretch; }
  .btn-primary, .btn-secondary { max-width: 100%; }
}
