* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: light;
  --bg: #f6f1ea;
  --bg-alt: #eef5ff;
  --ink: #111827;
  --ink-soft: #1f2937;
  --muted: #526070;
  --accent: #0ea5e9;
  --accent-2: #f59e0b;
  --accent-3: #22c55e;
  --stroke: rgba(17, 24, 39, 0.14);
  --card: rgba(255, 255, 255, 0.92);
  --surface: rgba(255, 255, 255, 0.88);
  --header-bg: rgba(246, 241, 234, 0.86);
  --footer-bg: rgba(255, 255, 255, 0.6);
  --chip-bg: #ffffff;
  --ghost-bg: #ffffff;
  --btn-primary-bg: #111827;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #0b1320;
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  --grid: rgba(17, 24, 39, 0.05);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-alt: #101826;
  --ink: #f8fafc;
  --ink-soft: #d7dee7;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #fbbf24;
  --accent-3: #4ade80;
  --stroke: rgba(148, 163, 184, 0.2);
  --card: rgba(15, 23, 42, 0.92);
  --surface: rgba(15, 23, 42, 0.8);
  --header-bg: rgba(9, 13, 18, 0.9);
  --footer-bg: rgba(9, 13, 18, 0.82);
  --chip-bg: rgba(15, 23, 42, 0.8);
  --ghost-bg: rgba(15, 23, 42, 0.85);
  --btn-primary-bg: #38bdf8;
  --btn-primary-text: #0b0f14;
  --btn-primary-hover: #0ea5e9;
  --glass-bg: rgba(15, 23, 42, 0.82);
  --glass-border: rgba(148, 163, 184, 0.2);
  --glass-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --grid: rgba(148, 163, 184, 0.1);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: radial-gradient(1200px 600px at 12% 18%, rgba(14, 165, 233, 0.18), transparent 60%),
    radial-gradient(1100px 600px at 82% 8%, rgba(245, 158, 11, 0.18), transparent 55%),
    radial-gradient(1200px 700px at 60% 75%, rgba(34, 197, 94, 0.16), transparent 60%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 58%, var(--bg) 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 1rem;
  background: var(--ink);
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  z-index: 10;
}

.skip-link:focus {
  left: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}

.site-nav {
  display: flex;
  gap: 1.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.site-nav a {
  position: relative;
  padding-bottom: 0.3rem;
}

.site-nav a.active {
  color: var(--ink);
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.header-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4.5rem 5vw 0;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  color: var(--ink-soft);
  margin: 1rem 0 1.5rem;
  line-height: 1.6;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3.5rem;
  align-items: center;
  padding-top: 6.5rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 4vw, 4.6rem);
  letter-spacing: -0.03em;
}

.hero-tags,
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--chip-bg);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.hero-meta {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  display: grid;
  gap: 0.4rem;
}

.hero-panel {
  display: grid;
  gap: 1.6rem;
}

.signal-card {
  background: linear-gradient(130deg, rgba(14, 165, 233, 0.18), rgba(34, 197, 94, 0.2)),
    var(--glass-bg);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.signal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.signal-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.signal-pill {
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  border: 1px solid var(--stroke);
}

.signal-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
}

.signal-card p {
  color: var(--ink-soft);
  line-height: 1.6;
}

.signal-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.impact-card {
  background: var(--glass-bg);
  border-radius: 18px;
  padding: 1.6rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: grid;
  gap: 1.2rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.impact-title {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 600;
}

.impact-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.impact-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.impact-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.impact-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.section-header {
  max-width: 720px;
  margin-bottom: 2.4rem;
}

.section-header h2 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin-bottom: 0.6rem;
  letter-spacing: -0.02em;
}

.section-lead {
  color: var(--muted);
  line-height: 1.6;
}

.stat-grid,
.card-grid,
.skill-grid,
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
}

.stat-card,
.info-card,
.skill-card,
.edu-card,
.project-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.stat-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.info-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
}

.card-tag {
  display: inline-flex;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-buttons button {
  border: 1px solid var(--stroke);
  background: var(--surface);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-buttons button.active {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.filter-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.project-card h3 {
  font-size: 1.3rem;
}

.project-desc {
  color: var(--ink-soft);
  line-height: 1.5;
}

.project-highlights {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
  padding-left: 1rem;
}

.project-highlights li {
  list-style: disc;
}

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

.project-tags span {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
}

.project-stack {
  font-size: 0.85rem;
  color: var(--muted);
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-links a {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 2rem;
  border-left: 1px solid var(--stroke);
  padding-left: 2rem;
}

.timeline-item {
  position: relative;
  background: var(--glass-bg);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  padding: 1.6rem;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.55rem;
  top: 2rem;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(14, 165, 233, 0.2);
}

.timeline-time {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.timeline-item ul {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.8rem;
  padding-left: 1rem;
  color: var(--ink-soft);
}

.timeline-item li {
  list-style: disc;
}

.contact-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(245, 158, 11, 0.18)),
    var(--glass-bg);
  border-radius: 28px;
  padding: 2.4rem;
  display: grid;
  gap: 2rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.4rem;
}

.contact-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--stroke);
  background: var(--footer-bg);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 5vw 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-note {
  color: var(--muted);
  margin-top: 0.6rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  color: var(--muted);
}

.footer-bottom {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn.primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.btn.primary:hover {
  background: var(--btn-primary-hover);
}

.btn.ghost {
  border-color: var(--stroke);
  background: var(--ghost-bg);
  color: var(--ink);
}

.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

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

@media (max-width: 1024px) {
  .header-inner {
    flex-direction: column;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .impact-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .timeline {
    padding-left: 1rem;
  }

  .timeline-item::before {
    left: -1.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
