:root {
  color-scheme: light dark;
  --bg: #05060a;
  --surface: rgba(255, 255, 255, 0.08);
  --card: rgba(9, 11, 17, 0.8);
  --text: #f5f7ff;
  --muted: #9da7c2;
  --accent: #9b6bff;
  --accent-strong: #6a3bff;
  --border: rgba(255, 255, 255, 0.15);
  --shadow: 0 10px 50px rgba(2, 8, 20, 0.35);
}

:root[data-theme='light'] {
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.9);
  --card: #ffffff;
  --text: #0c1127;
  --muted: #5c667d;
  --accent: #6b4bff;
  --accent-strong: #4b27f0;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hero {
  padding: 2.5rem clamp(1rem, 4vw, 4rem) 4rem;
  background: radial-gradient(circle at top right, rgba(155, 107, 255, 0.2), transparent 50%),
    radial-gradient(circle at 20% 20%, rgba(107, 75, 255, 0.2), transparent 45%), var(--bg);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0.5rem 0;
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow);
}

.brand-copy span {
  font-weight: 600;
  display: block;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.75rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
}

.nav-toggle {
  background: none;
  border: none;
  display: none;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text);
  display: block;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.hero-card {
  background: var(--card);
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 1rem;
  line-height: 1.1;
}

.lead {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: 0 14px 30px rgba(107, 75, 255, 0.35);
}

.btn.ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 0;
}

.metrics dt {
  font-size: 2rem;
  font-weight: 700;
}

.metrics dd {
  margin: 0;
  color: var(--muted);
}

.profile-card {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(155, 107, 255, 0.35), transparent 55%);
  opacity: 0.6;
}

.profile-card > * {
  position: relative;
}

.profile-ring {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: grid;
  place-items: center;
  background: conic-gradient(from 120deg, var(--accent), transparent);
  padding: 12px;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.35);
}

.profile-card .subtitle {
  color: var(--muted);
  margin-bottom: 1rem;
}

.profile-summary {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.profile-tags span {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text);
  background: rgba(155, 107, 255, 0.12);
}

.profile-footer {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--muted);
}

.github-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: rgba(155, 107, 255, 0.08);
}

.github-status span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.github-status strong {
  font-size: 1.5rem;
  display: block;
}

.github-status a {
  align-self: center;
  justify-self: end;
  font-weight: 600;
  color: var(--accent);
}

.status {
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  align-self: center;
  border: 1px solid var(--border);
}

.status.online::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
}

.section {
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 5vw, 5rem);
  background: var(--bg);
}

.section.alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent), var(--bg);
}

.section-heading {
  max-width: 700px;
  margin-bottom: 2.5rem;
}

.section-heading.compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

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

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  background: rgba(155, 107, 255, 0.15);
  color: var(--accent);
  font-size: 0.75rem;
}

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

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--border);
}

.timeline li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  left: -7px;
  top: 0.3rem;
}

.timeline span {
  font-size: 0.85rem;
  color: var(--muted);
}

.publication-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.publication-list li {
  padding: 1.25rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}

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

.contact-card {
  border-radius: 18px;
  padding: 1.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-list span {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.note {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(155, 107, 255, 0.08);
  border: 1px dashed var(--accent);
}

.site-footer {
  padding: 2rem clamp(1rem, 4vw, 4rem);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--card);
    flex-direction: column;
    padding: 4rem 2rem;
    transition: right 0.3s ease;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

