:root {
  --bg: #0b1020;
  --bg-elev: rgba(17, 24, 39, 0.72);
  --bg-card: rgba(15, 23, 42, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --heading: #f8fafc;
  --accent: #7c9cff;
  --accent-2: #5eead4;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --container: 1120px;
  --radius: 24px;
}

body.light {
  --bg: #f5f7fb;
  --bg-elev: rgba(255, 255, 255, 0.82);
  --bg-card: rgba(255, 255, 255, 0.9);
  --border: rgba(15, 23, 42, 0.08);
  --text: #18212f;
  --muted: #5f6b7a;
  --heading: #0f172a;
  --accent: #315efb;
  --accent-2: #0f766e;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 78%);
  pointer-events: none;
  z-index: -3;
}

body.light .bg-grid {
  background-image:
    linear-gradient(rgba(15,23,42,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.05) 1px, transparent 1px);
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.24;
  pointer-events: none;
  z-index: -2;
}

.orb-1 {
  width: 360px;
  height: 360px;
  background: var(--accent);
  top: -80px;
  right: -80px;
}

.orb-2 {
  width: 320px;
  height: 320px;
  background: var(--accent-2);
  bottom: 6%;
  left: -80px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(11, 16, 32, 0.55);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

body.light .site-header {
  background: rgba(245, 247, 251, 0.78);
  border-bottom: 1px solid rgba(15,23,42,0.06);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.top-nav a:hover {
  color: var(--heading);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--heading);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.section {
  padding: 5.5rem 0;
}

.hero {
  padding-top: 4.5rem;
  padding-bottom: 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.95rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--heading);
  max-width: 11ch;
}

.hero-text {
  max-width: 62ch;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5b7cff);
  color: white;
}

.btn-secondary {
  border-color: var(--border);
  background: var(--bg-card);
  color: var(--heading);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.15rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.meta-row i {
  margin-right: 0.45rem;
  color: var(--accent);
}

.hero-card {
  display: grid;
  gap: 1rem;
}

.card,
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
}

.stat-card {
  padding: 1.2rem 1.2rem 1.05rem;
}

.stat-card strong {
  display: block;
  color: var(--heading);
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}

.stat-card p,
.summary-card p,
.project-card p,
.contact-card p,
.edu-grid p,
.timeline-item li {
  color: var(--muted);
}

.stat-label {
  display: inline-block;
  margin-bottom: 0.6rem;
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head h2,
.contact-card h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.035em;
  color: var(--heading);
}

.summary-card,
.contact-card {
  padding: 1.5rem;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  padding: 1.4rem;
}

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

.timeline-top h3,
.project-card h3,
.edu-grid h3,
.card h3 {
  margin: 0 0 0.22rem;
  color: var(--heading);
  font-size: 1.05rem;
}

.company,
.muted {
  margin: 0;
  color: var(--muted);
}

.timeline-meta {
  text-align: right;
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.timeline-item ul,
.project-card ul {
  margin: 0;
  padding-left: 1.15rem;
}

.timeline-item li + li {
  margin-top: 0.45rem;
}

.project-grid,
.skills-layout,
.edu-grid {
  display: grid;
  gap: 1rem;
}

.project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
  padding: 1.35rem;
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  background: rgba(124, 156, 255, 0.14);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
}

.stack,
.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.stack span,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--heading);
  font-size: 0.88rem;
}

body.light .stack span,
body.light .pill {
  background: rgba(15, 23, 42, 0.03);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 600;
}

.skills-layout,
.edu-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skills-layout .card,
.edu-grid .card {
  padding: 1.3rem;
}

.edu-date,
.edu-score {
  display: block;
  margin-top: 0.6rem;
  color: var(--muted);
}

.section-last {
  padding-bottom: 8rem;
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  padding: 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  z-index: 60;
}

body.light .dock {
  background: rgba(255,255,255,0.88);
  border-color: rgba(15,23,42,0.08);
}

.dock-item {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  transition: all 0.2s ease;
}

.dock-item.active,
.dock-item:hover {
  background: var(--heading);
  color: var(--bg);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.12s;
}

@media (max-width: 980px) {
  .hero-grid,
  .project-grid,
  .skills-layout,
  .edu-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 100%;
  }

  .timeline-top {
    flex-direction: column;
  }

  .timeline-meta {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .top-nav {
    display: none;
  }

  .section {
    padding: 4.25rem 0;
  }

  .hero {
    padding-top: 3.25rem;
  }

  .dock {
    bottom: 0.8rem;
    padding: 0.45rem;
  }

  .dock-item {
    width: 38px;
    height: 38px;
  }

  .container {
    width: min(var(--container), calc(100% - 1.1rem));
  }
}