:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-muted: #f4f7fb;
  --text: #09090b;
  --muted: #52525b;
  --quiet: #71717a;
  --line: #d4d4d8;
  --line-soft: #e4e4e7;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --accent: #0f766e;
  --shadow: 0 18px 44px rgba(9, 9, 11, 0.08);
  --radius: 8px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Atkinson Hyperlegible", sans-serif;
  background:
    linear-gradient(90deg, rgba(212, 212, 216, 0.28) 1px, transparent 1px),
    linear-gradient(rgba(212, 212, 216, 0.28) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(9, 9, 11, 0.06);
}

a {
  color: inherit;
}

.brand,
.nav a,
.button,
.project-links a,
.contact-links a,
.text-link,
.footer a {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  font-weight: 700;
}

.nav {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.nav a,
.text-link,
.footer a {
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.94rem;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

.nav a {
  padding: 8px 10px;
}

.nav a:hover,
.text-link:hover,
.footer a:hover {
  color: var(--primary);
}

.nav a:hover {
  background: var(--surface-muted);
}

.hero {
  position: relative;
  min-height: 560px;
  display: grid;
  align-items: end;
  overflow: hidden;
  margin-top: 18px;
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--line-soft);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      90deg,
      rgba(250, 250, 250, 0.98) 0%,
      rgba(250, 250, 250, 0.9) 46%,
      rgba(250, 250, 250, 0.24) 100%
    ),
    linear-gradient(180deg, transparent 0%, rgba(250, 250, 250, 0.88) 100%);
}

.hero-portrait {
  position: absolute;
  right: 0;
  bottom: 42px;
  width: min(42vw, 440px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 50%;
  filter: saturate(0.9);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow,
.panel-label,
.card-title,
.project-meta,
.timeline-year {
  margin: 0;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--text);
}

h1,
h2 {
  margin: 10px 0 0;
  font-family: "Crimson Pro", serif;
  font-weight: 600;
  line-height: 0.98;
}

h1 {
  max-width: 9ch;
  font-size: 7.5rem;
}

h2 {
  font-size: 3.25rem;
}

h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.hero-lead,
.about-copy,
.project-copy,
.timeline-copy,
.contact-copy,
.panel-copy {
  color: var(--muted);
  line-height: 1.72;
}

.hero-lead {
  max-width: 60ch;
  margin: 22px 0 0;
  font-size: 1.12rem;
}

.hero-actions,
.contact-links,
.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 30px;
}

.button,
.contact-links a,
.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.button-primary,
.contact-links a:first-child,
.project-links a:first-child {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.button-primary:hover,
.contact-links a:first-child:hover,
.project-links a:first-child:hover {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.button-secondary,
.contact-links a:not(:first-child),
.project-links a:not(:first-child) {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
}

.button-secondary:hover,
.contact-links a:not(:first-child):hover,
.project-links a:not(:first-child):hover {
  border-color: var(--primary);
  color: var(--primary);
}

.link-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.stat-list,
.tag-list,
.panel-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stat-list {
  margin-top: 28px;
}

.stat-list li,
.tag-list li,
.panel-list li {
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 78px 0 0;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.intro-band {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 72px;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 42px;
  align-items: start;
}

.about-copy {
  max-width: 720px;
  margin: 0;
  font-size: 1.18rem;
}

.profile-panel {
  display: grid;
  gap: 24px;
  padding-left: 26px;
  border-left: 3px solid var(--primary);
}

.panel-copy {
  margin: 8px 0 0;
}

.panel-list {
  margin-top: 10px;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.research-grid > div,
.project-card,
.timeline-item {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(9, 9, 11, 0.04);
}

.research-grid > div {
  padding: 18px;
}

.research-grid .tag-list,
.project-card .tag-list {
  margin-top: 14px;
}

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

.project-card {
  position: relative;
  display: flex;
  min-height: 286px;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  overflow: hidden;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 180ms ease;
}

.project-card:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: #fff;
  box-shadow: var(--shadow);
}

.project-card:hover::before {
  opacity: 1;
}

.project-copy {
  margin: 0;
}

.project-links {
  margin-top: auto;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 22px;
  padding: 20px;
}

.timeline-item h3,
.timeline-item p {
  margin: 0;
}

.timeline-copy {
  margin-top: 6px;
}

.contact-section {
  padding-bottom: 40px;
}

.contact-copy {
  max-width: 720px;
  margin: 0;
  font-size: 1.08rem;
}

.contact-links {
  margin-top: 22px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line-soft);
  color: var(--quiet);
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.42);
  outline-offset: 3px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal 620ms ease forwards;
}

.section.reveal {
  animation-delay: 120ms;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 520px;
    padding-top: 70px;
  }

  .hero-portrait {
    right: -48px;
    bottom: 72px;
    width: 360px;
    opacity: 0.34;
  }

  .about-layout,
  .project-grid,
  .research-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 24px, var(--max-width));
    padding-top: 12px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .nav a {
    padding: 8px 9px;
  }

  .hero {
    min-height: 500px;
    margin-top: 0;
    padding: 58px 0 44px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(250, 250, 250, 0.68) 0%, rgba(250, 250, 250, 0.98) 78%),
      linear-gradient(90deg, rgba(250, 250, 250, 0.96), rgba(250, 250, 250, 0.38));
  }

  .hero-portrait {
    top: 30px;
    right: -54px;
    bottom: auto;
    width: 260px;
    opacity: 0.42;
  }

  h1 {
    font-size: 4.75rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .section {
    padding-top: 58px;
  }

  .intro-band {
    padding-bottom: 56px;
  }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-panel {
    padding-left: 18px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 4.1rem;
  }

  .hero-actions,
  .contact-links,
  .project-links {
    align-items: stretch;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
