:root {
  --bg: #020617;
  --bg-elevated: rgba(15, 23, 42, 0.95);
  --bg-soft: rgba(15, 23, 42, 0.82);
  --border-subtle: rgba(148, 163, 184, 0.35);
  --accent: #38bdf8;
  --accent-strong: #f97316;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --shadow-soft: 0 22px 60px rgba(15, 23, 42, 0.9);
  --radius-lg: 18px;
  --transition-fast: 200ms ease-out;
}

/* optional light theme */
[data-theme="light"] {
  --bg: #f3f4f6;
  --bg-elevated: #ffffff;
  --bg-soft: #f9fafb;
  --border-subtle: rgba(148, 163, 184, 0.55);
  --text-main: #111827;
  --text-muted: #6b7280;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.1);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.35), transparent 55%),
    radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.2), transparent 55%),
    var(--bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* NAVBAR */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #fbbf24, #ef4444);
  box-shadow: 0 0 20px rgba(248, 250, 252, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: "Space Grotesk", monospace;
  font-size: 15px;
  color: #0b1120;
}

.nav-logo-text {
  display: flex;
  flex-direction: column;
}

.nav-logo-title {
  font-family: "Space Grotesk", monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-logo-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), transform var(--transition-fast);
}

.nav-link:hover {
  background: var(--bg-soft);
  border-color: var(--border-subtle);
  color: var(--text-main);
  transform: translateY(-1px);
}

.nav-link-pill {
  border-color: rgba(56, 189, 248, 0.7);
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.35),
    rgba(129, 140, 248, 0.2)
  );
  color: #e0f2fe;
}

.nav-link-pill:hover {
  border-color: rgba(56, 189, 248, 0.95);
}

.nav-theme-toggle {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 13px;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast), border-color var(--transition-fast);
}

[data-theme="light"] .nav-theme-toggle {
  background: #f9fafb;
}

.nav-theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.6);
}

/* SECTIONS */

.section {
  margin-bottom: 40px;
}

.section-header {
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 18px;
  margin: 0 0 4px;
}

.section-header p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* HERO */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 36px;
}

.hero-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.hero-title {
  font-family: "Space Grotesk", monospace;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.2;
  margin: 0 0 10px;
}

.accent {
  color: var(--accent);
}

.accent-underline {
  position: relative;
  display: inline-block;
}

.accent-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.hero-subtitle {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 460px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag {
  font-size: 11px;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.78);
  color: var(--text-muted);
}

[data-theme="light"] .tag {
  background: #f9fafb;
}

.tag-strong {
  border-color: rgba(56, 189, 248, 0.9);
  color: #e0f2fe;
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 12px;
}

.hero-roles-label {
  color: var(--text-muted);
}

.hero-roles-value {
  font-family: "Space Grotesk", monospace;
  font-weight: 500;
}

.hero-cursor {
  margin-left: 2px;
  animation: blink 1.1s steps(2, start) infinite;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

/* HERO IMAGE */

.hero-side {
  display: flex;
  justify-content: flex-end;
}

.hero-img {
  width: 100%;
  max-width: 340px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  background: radial-gradient(circle at top, rgba(56,189,248,0.25), var(--bg));
}

.hero-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform: scale(1.02);
  filter: contrast(1.06) saturate(1.05);
}

/* BUTTONS */

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #0b1120;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.7);
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.9);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

[data-theme="light"] .btn-ghost {
  background: #f9fafb;
}

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

/* CARDS */

.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 14px 14px 16px;
  box-shadow: var(--shadow-soft);
}

.card-title {
  margin: 0 0 8px;
  font-size: 14px;
}

/* LABS */

.labs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.lab-card {
  font-size: 12px;
}

.lab-pill {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.lab-title {
  margin: 0 0 6px;
  font-size: 14px;
}

.lab-desc {
  margin: 0;
  font-size: 12px;
}

/* ABOUT */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.about-text p {
  font-size: 13px;
  margin: 0 0 8px;
}

.about-facts {
  font-size: 12px;
}

.facts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.facts-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.35);
  padding: 4px 0;
}

.facts-list li:last-child {
  border-bottom: none;
}

.facts-list span:first-child {
  color: var(--text-muted);
}

/* Snapshot card reused styles */

.hero-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hero-card-metric {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.hero-card-metric-label {
  color: var(--text-muted);
}

.hero-card-metric-value {
  font-weight: 500;
}

.hero-card-divider {
  border-top: 1px dashed var(--border-subtle);
  margin: 8px 0 6px;
}

.hero-card-footnote {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

/* SKILLS */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
}

.pill-list li {
  margin-bottom: 6px;
  padding-left: 12px;
  position: relative;
}

.pill-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
}

/* PROJECTS */

.projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.8);
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), transform var(--transition-fast);
}

[data-theme="light"] .chip {
  background: #f9fafb;
}

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

.chip-active {
  border-color: rgba(56, 189, 248, 0.9);
  color: #e0f2fe;
  background: radial-gradient(
    circle at top left,
    rgba(56, 189, 248, 0.26),
    rgba(15, 23, 42, 0.98)
  );
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.project-pill {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.project-title {
  margin: 0 0 6px;
  font-size: 14px;
}

.project-desc {
  margin: 0 0 8px;
  font-size: 12px;
}

.project-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 11px;
  color: var(--text-muted);
}

.project-meta li + li {
  margin-top: 2px;
}

.project-link {
  color: var(--accent);
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

/* CONTACT & FOOTER */

.contact-card p {
  font-size: 13px;
  margin: 0 0 8px;
}

.contact-note {
  font-size: 11px;
  color: var(--text-muted);
}

.footer {
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  margin-top: 20px;
  padding-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.footer-dot {
  opacity: 0.6;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }

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

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

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

@media (max-width: 720px) {
  .nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .hero-side {
    justify-content: flex-start;
  }

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

  .about-grid {
    gap: 12px;
  }
}
