:root {
  --bg: #edf2f8;
  --surface: rgba(249, 251, 255, 0.84);
  --surface-strong: #f8fbff;
  --text: #162033;
  --muted: #66748a;
  --line: rgba(22, 32, 51, 0.12);
  --accent: #274c77;
  --accent-deep: #1b365d;
  --shadow: 0 24px 60px rgba(27, 54, 93, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: rgba(16, 24, 38, 0.92);
    --surface-strong: #f2f6ff;
    --text: #f2f6ff;
    --muted: #b3bfd3;
    --line: rgba(242, 246, 255, 0.12);
    --accent: #7ea2d6;
    --accent-deep: #4c6f9f;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  }

  body {
    background: var(--bg);
  }

  body::before {
    background-image:
      linear-gradient(rgba(232, 238, 248, 0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(232, 238, 248, 0.035) 1px, transparent 1px);
  }

  .hero::after {
    background: none;
  }

  .button-secondary {
    background: rgba(255, 255, 255, 0.06);
  }

  .hero-stats li,
  .card,
  .project-card,
  .timeline-item,
  .card.accent {
    background: var(--surface);
  }

  .tag-list span {
    background: rgba(255, 255, 255, 0.06);
  }

  .contact-section {
    background: linear-gradient(135deg, rgba(16, 24, 38, 0.98), rgba(19, 29, 45, 0.96));
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(39, 76, 119, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(27, 54, 93, 0.12), transparent 24%),
    linear-gradient(180deg, #f5f8fd 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(27, 54, 93, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 54, 93, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 85%);
}

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--surface-strong);
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.hero,
.content-section,
.grid-section {
  margin-bottom: 2rem;
}

.hero {
  position: relative;
  padding: clamp(2rem, 5vw, 5rem);
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 18rem;
  height: 18rem;
  right: -5rem;
  top: -5rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(39, 76, 119, 0.18), transparent 70%);
}

.hero-layout-simple {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 320px);
  gap: 2rem;
  align-items: center;
}

.hero-copy-wrap,
.hero-image-wrap {
  position: relative;
  z-index: 1;
}

.hero-image-wrap {
  display: flex;
  justify-content: center;
}

.headshot {
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.eyebrow,
.project-kicker,
.timeline-date,
.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  margin-top: 0.5rem;
  max-width: none;
  font-size: clamp(2rem, 5vw, 3.8rem);
}

h2 {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  max-width: 12ch;
}

#about h2 {
  max-width: none;
}

.about-statement {
  color: var(--muted);
  font-weight: 500;
}

.about-statement span {
  color: var(--text);
  font-weight: 700;
}

.hero-copy,
.card p,
.project-card p,
.timeline-item p,
.contact-section p {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.hero-copy {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.05;
  max-width: 11ch;
  font-family: "Manrope", sans-serif;
  font-weight: 500;
}

.hero-copy-wrap h1 {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 2rem 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

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

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.hero-stats,
.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.hero-stats li,
.card,
.project-card,
.timeline-item {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(10px);
}

.hero-stats li {
  padding: 1rem;
  border-radius: 1.25rem;
}

.hero-stats strong {
  display: block;
  margin-top: 0.45rem;
  line-height: 1.5;
}

.grid-section,
.project-grid {
  display: grid;
  gap: 1.5rem;
}

.grid-section {
  grid-template-columns: 1.4fr 1fr;
}

.card,
.project-card,
.contact-section,
.timeline-item {
  border-radius: 1.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card.accent {
  background: var(--surface);
  color: var(--text);
}

.card.accent li {
  color: var(--muted);
}

.detail-list {
  display: grid;
  gap: 0.85rem;
  line-height: 1.6;
  margin-top: 0;
}

.neutral-list {
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.section-heading {
  display: block;
  margin-bottom: 1rem;
}

.section-heading h2 {
  max-width: none;
}

.subtle-card-heading {
  color: var(--muted);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
}

.contact-heading {
  white-space: nowrap;
}

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

.project-card h3,
.timeline-item h3 {
  margin: 0.35rem 0 0.75rem;
  font-size: 1.4rem;
}

.timeline-org {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  align-items: start;
}

.contact-section {
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.95), rgba(238, 247, 244, 0.95));
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@media (max-width: 900px) {
  .hero-layout-simple,
  .hero-stats,
  .grid-section,
  .project-grid,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 12ch;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 1120px);
  }

  .site-header {
    display: none;
  }

  .hero-layout-simple {
    gap: 1.25rem;
  }

  .hero,
  .card,
  .project-card,
  .contact-section,
  .timeline-item {
    padding: 1.2rem;
  }

  h1 {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
    max-width: none;
    white-space: normal;
    line-height: 0.95;
  }

  .hero-copy {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
    max-width: none;
  }

  .headshot {
    width: min(100%, 260px);
  }

  .hero-actions,
  .contact-actions {
    gap: 0.75rem;
  }

  .button {
    padding: 0.8rem 1rem;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background: var(--bg);
  }

  body::before {
    background-image: none;
  }

  .hero {
    background: var(--surface);
  }

  .hero::after {
    background: none;
  }

  .hero-stats li,
  .card,
  .project-card,
  .timeline-item,
  .card.accent,
  .contact-section,
  .tag-list span {
    background: var(--surface);
  }

  .button-secondary {
    background: rgba(255, 255, 255, 0.06);
  }
}
