:root {
  --bg: #0f172a;
  --bg-gradient-top: #0b1220;
  --bg-gradient-bottom: #111827;
  --panel: rgba(17, 24, 39, 0.88);
  --panel-2: #1f2937;
  --text: #e5e7eb;
  --muted: #cbd5e1;
  --accent: #38bdf8;
  --accent-2: #7dd3fc;
  --border: #334155;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  --button-text: #062033;
  --tag-bg: rgba(56, 189, 248, 0.12);
  --tag-border: rgba(56, 189, 248, 0.28);
  --tag-text: #dff6ff;
  --callout-bg: rgba(56, 189, 248, 0.08);
  --metric-bg: rgba(255, 255, 255, 0.04);
  --max: 1120px;
}

body.light-mode {
  --bg: #f8fafc;
  --bg-gradient-top: #f8fafc;
  --bg-gradient-bottom: #e2e8f0;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-2: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0ea5e9;
  --accent-2: #0369a1;
  --border: #cbd5e1;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  --button-text: #ffffff;
  --tag-bg: rgba(14, 165, 233, 0.1);
  --tag-border: rgba(14, 165, 233, 0.25);
  --tag-text: #075985;
  --callout-bg: rgba(14, 165, 233, 0.08);
  --metric-bg: rgba(15, 23, 42, 0.03);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  background: linear-gradient(180deg, var(--bg-gradient-top) 0%, var(--bg-gradient-bottom) 100%);
  color: var(--text);
  transition: background 0.25s ease, color 0.25s ease;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 14px;
}

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

a:hover {
  text-decoration: underline;
}

header,
main,
footer {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto;
}

header {
  padding: 1.25rem 0 1rem;
}

main {
  padding: 0 0 2rem;
}

footer {
  padding: 1rem 0 2.5rem;
  color: var(--muted);
  text-align: center;
}

nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: center;
}

.pill {
  display: inline-block;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

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

.pill[aria-current="page"] {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent);
}

.theme-toggle {
  margin-left: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  color: #000;
  padding: 0.5rem 0.75rem;
  z-index: 1000;
}

.hero-card,
.section-card,
.stat-card,
.info-block,
.project-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.hero-card,
.section-card,
.stat-card,
.info-block {
  padding: 1.5rem;
}

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

.hero-copy h1,
.page-hero h1 {
  margin: 0.2rem 0 0.8rem;
  line-height: 1.15;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.page-hero {
  margin-bottom: 1.5rem;
}

.page-hero.split {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.84rem;
  margin: 0 0 0.25rem;
}

.lede,
.inline-meta {
  color: var(--muted);
}

.inline-meta {
  margin: 0 0 1rem;
}

.headshot {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--border);
}

.actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--button-text);
  font-weight: 700;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.04);
}

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

.feature-grid,
.project-grid,
.grid-2,
.grid-3,
.info-grid,
.gallery-grid {
  display: grid;
  gap: 1.25rem;
}

.feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 2rem;
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 1.5rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 2rem 0;
}

.info-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 2rem;
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 1rem;
}

.project-card {
  overflow: hidden;
}

.card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
}

.card-body {
  padding: 1.25rem;
}

.card-body h3,
.section-card h2,
.stat-card h3,
.info-block h3 {
  margin-top: 0;
}

.tag-list,
.clean-list,
.quick-list {
  padding-left: 1.2rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-left: 0;
  list-style: none;
  margin: 1rem 0 0;
}

.tag-list li {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  color: var(--tag-text);
  font-size: 0.92rem;
}

.clean-list li,
.quick-list li {
  margin-bottom: 0.55rem;
}

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

.metric {
  background: var(--metric-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}

.metric strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.callout {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--accent);
  background: var(--callout-bg);
  border-radius: 12px;
}

.no-top-margin {
  margin-top: 0;
}

section {
  margin-bottom: 2rem;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .hero,
  .page-hero.split {
    grid-template-columns: 1fr;
  }

  .headshot {
    width: 200px;
    height: 200px;
  }

  .theme-toggle {
    margin-left: 0;
  }
}
