:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-elevated: rgba(11, 16, 32, 0.72);
  --surface: rgba(15, 23, 42, 0.75);
  --surface-strong: rgba(15, 23, 42, 0.92);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.18);
  --accent: #60a5fa;
  --accent-strong: #38bdf8;
  --shadow: 0 30px 80px rgba(2, 6, 23, 0.35);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-elevated: rgba(255, 255, 255, 0.82);
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --text: #0f172a;
  --muted: #475569;
  --border: rgba(15, 23, 42, 0.1);
  --accent: #2563eb;
  --accent-strong: #0f766e;
  --shadow: 0 30px 80px rgba(148, 163, 184, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 28%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
}

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

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

button,
a {
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(96, 165, 250, 0.5);
  outline-offset: 3px;
}

.site-shell {
  position: relative;
}

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

.section {
  padding: 3.5rem 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--surface-strong);
  color: var(--text);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  z-index: 100;
}

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

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

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

.brand {
  font-weight: 700;
  letter-spacing: -0.03em;
}

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

.nav-menu a,
.theme-toggle {
  color: var(--muted);
  font-weight: 500;
}

.nav-menu a:hover,
.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 999px;
  padding: 0.6rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  width: 1rem;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.nav-toggle span:first-child {
  transform: translateY(-4px);
}

.nav-toggle span:last-child {
  transform: translateY(4px);
}

.hero {
  padding: 3.5rem 0 2.5rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

.eyebrow {
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

h1,
h2,
h3,
p,
ul,
dl {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -0.04em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 1rem;
}

.hero__heading {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.hero__lede,
.section-heading p,
.surface p,
.contact-card p,
.profile-card__details,
/* .hero__meta span, */
.article-card__meta {
  color: var(--muted);
}

.hero__lede {
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 38rem;
}

.hero__cta,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.8rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
}

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

.button--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
}

.button--secondary,
.button--ghost {
  background: transparent;
  border-color: var(--border);
}

/* .hero__meta {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
} */

/* .hero__meta li, */
.surface,
.contact-card,
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 1.25rem;
}

/* .hero__meta li {
  padding: 0.85rem 1rem;
} */

/* .hero__meta strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
} */

/* .hero__meta span {
  font-size: 0.8rem;
} */

.profile-card {
  overflow: hidden;
  max-width: 420px;
  margin-left: auto;
  aspect-ratio: 2 / 1.9;
}

.profile-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: inherit;
}

.section-heading {
  max-width: 48rem;
  margin-bottom: 2rem;
}

.about-grid,
.capability-grid,
.project-grid,
.article-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

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

.surface,
.contact-card {
  padding: 1.6rem;
}

.stack-list,
.project-card ul {
  padding-left: 1.1rem;
  margin-bottom: 0;
  color: var(--muted);
}

.capability-card__header,
.footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.capability-card__header span,
.project-card__tag {
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 0.9rem;
}

.article-card a {
  color: var(--accent);
  font-weight: 600;
}

.contact-card {
  align-items: center;
  gap: 2rem;
}

.site-footer {
  padding: 0 0 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms ease, transform 500ms ease;
}

.nav-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-left: 1.2rem;
}

.nav-social a {
  color: var(--accent-strong);
  padding: 0.2rem 0.4rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
}

.nav-social a:hover {
  background: var(--accent-strong);
  color: #fff;
}

.nav-social svg {
  display: block;
  width: 22px;
  height: 22px;
}

.nav-menu a svg {
  display: block;
  width: 1.35em;
  height: 1.35em;
  vertical-align: middle;
  margin-top: -2px;
}

.nav-menu a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--muted);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.nav-menu a:hover {
  color: var(--text);
  background: none;
}

@media (max-width: 1200px) {
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
  }

  .profile-card {
    max-width: 380px;
  }
}

@media (max-width: 960px) {
  .hero {
    padding-top: 2.5rem;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .profile-card {
    max-width: 340px;
    margin-left: 0;
  }

  .hero__panel {
    order: -1;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    position: relative;
  }

  .nav-menu {
    position: absolute;
    inset: calc(100% + 0.75rem) 1rem auto;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-radius: 1.25rem;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .hero,
  /* .hero__meta, */
  .about-grid,
  .contact-card,
  .project-grid,
  .article-grid,
  .capability-grid,
  .site-footer {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero {
    gap: 1.5rem;
  }

  .hero__heading {
    font-size: clamp(1.5rem, 5.5vw, 1.95rem);
  }

  .profile-card {
    max-width: 300px;
  }

  .section {
    padding: 2.5rem 0;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .site-footer {
    gap: 0.25rem;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

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