:root {
  color-scheme: light;
  --ink: #16202a;
  --muted: #5f6f7c;
  --surface: #ffffff;
  --soft: #f3f6f7;
  --line: #dbe3e6;
  --accent: #0f766e;
  --accent-dark: #0b4f4a;
  --gold: #c38b32;
  --shadow: 0 24px 70px rgba(22, 32, 42, 0.12);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(219, 227, 230, 0.82);
  backdrop-filter: blur(16px);
}

.brand,
.site-nav,
.hero-actions,
.social-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: var(--ink);
  border-radius: 50%;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.site-nav {
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a,
.site-footer a,
.social-links a {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.social-links a:hover,
.site-footer a:hover {
  color: var(--accent-dark);
}

.nav-toggle {
  display: none;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
}

.hero,
.section,
.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: 72px;
  align-items: center;
  padding: 52px 0 58px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 24px;
  font-size: 4.35rem;
  line-height: 1;
}

h2 {
  margin-bottom: 18px;
  font-size: 3.2rem;
  line-height: 1.05;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.22rem;
}

.hero-text {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.2rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
}

.button.primary {
  color: #ffffff;
  background: var(--ink);
}

.button.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.button.secondary {
  color: var(--ink);
  background: #ffffff;
}

.hero-media {
  margin: 0;
}

.hero-media img {
  width: 100%;
  max-height: 520px;
  aspect-ratio: 4 / 4.4;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media.portrait {
  max-width: 460px;
  justify-self: end;
}

.hero-media.portrait img {
  background: var(--soft);
  object-fit: cover;
}

.hero-media figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  padding: 94px 0;
  border-top: 1px solid var(--line);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 28px;
}

.metrics article {
  min-height: 146px;
  padding: 20px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 2.3rem;
  line-height: 1;
}

.metrics span {
  color: var(--muted);
  font-weight: 700;
}

.split,
.credentials,
.contact,
.lab-consent {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: 64px;
}

.section-body,
.contact-panel,
.card p,
.timeline p {
  color: var(--muted);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

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

.card {
  min-height: 220px;
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.project-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(22, 32, 42, 0.08);
}

.project-label {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-card p,
.project-card li {
  color: var(--muted);
}

.project-card ul {
  display: grid;
  gap: 10px;
  padding-left: 20px;
  margin: 22px 0 0;
}

.work-band {
  width: 100%;
  max-width: none;
  padding-right: max(20px, calc((100vw - var(--max)) / 2));
  padding-left: max(20px, calc((100vw - var(--max)) / 2));
  background: #18232d;
  border-top: 0;
}

.work-band h2,
.work-band h3 {
  color: #ffffff;
}

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

.experience-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
}

.experience-list article {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.experience-list span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--gold);
  font-weight: 900;
}

.experience-list p {
  color: rgba(255, 255, 255, 0.74);
}

.timeline article {
  padding: 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.timeline span {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--gold);
  font-weight: 900;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pill-list li {
  padding: 10px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 800;
}

.contact-panel {
  padding: 30px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lab-consent {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 72px;
  padding: 28px;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lab-consent h2 {
  margin-bottom: 12px;
  font-size: 2rem;
}

.lab-consent p {
  color: var(--muted);
}

.lab-consent-actions {
  align-self: center;
}

.lab-status {
  min-height: 24px;
  margin: 16px 0 0;
  font-weight: 800;
}

.dashboard-shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.dashboard-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.dashboard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.dashboard-controls input {
  min-height: 48px;
  min-width: 280px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.dashboard-user {
  color: var(--muted);
  font-weight: 800;
}

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

.dashboard-summary article {
  padding: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-summary strong {
  display: block;
  color: var(--accent-dark);
  font-size: 2rem;
  line-height: 1;
}

.dashboard-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dashboard-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.dashboard-table th {
  color: var(--ink);
  background: var(--soft);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-table td {
  color: var(--muted);
  font-size: 0.94rem;
}

.dashboard-empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
  background: var(--soft);
}

.login-panel {
  width: min(540px, 100%);
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-panel .brand {
  margin-bottom: 34px;
}

.login-panel h1 {
  font-size: 2.7rem;
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.login-form label {
  color: var(--ink);
  font-weight: 850;
}

.login-form input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.social-links {
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 0 46px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

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

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 20px;
    left: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .hero,
  .split,
  .credentials,
  .contact,
  .lab-consent,
  .timeline,
  .experience-list {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 36px;
    padding-top: 56px;
  }

  h1 {
    font-size: 4.1rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  .hero-media {
    max-width: 520px;
    justify-self: start;
  }

  .card-grid,
  .project-grid,
  .metrics,
  .dashboard-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-header {
    grid-template-columns: 1fr;
  }

  .dashboard-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 14px 20px;
  }

  .brand {
    font-size: 0.95rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.1rem;
  }

  .hero-text {
    font-size: 1.05rem;
  }

  .card-grid,
  .project-grid,
  .metrics,
  .dashboard-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-controls input {
    min-width: 0;
    width: 100%;
  }

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