:root {
  color-scheme: light;
  --bg: #f8f7f2;
  --surface: #ffffff;
  --ink: #171715;
  --muted: #68675f;
  --line: #d9d4c8;
  --accent: #0f6d6c;
  --accent-2: #9f4b2f;
  --shadow: 0 22px 70px rgba(34, 31, 25, 0.14);
  --max: 1160px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151715;
  --surface: #20231f;
  --ink: #f3f0e8;
  --muted: #b7b2a8;
  --line: #3b3d36;
  --accent: #62b8ae;
  --accent-2: #d07a55;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  display: grid;
  gap: 16px;
  grid-template-columns: auto 1fr auto;
  left: 0;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 48px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 750;
  gap: 10px;
  letter-spacing: 0;
  min-width: max-content;
}

.brand-photo {
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  display: block;
  height: 38px;
  object-fit: cover;
  object-position: 50% 34%;
  width: 38px;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  justify-content: center;
}

.nav-links a,
.site-footer a,
.cv-sidebar a {
  color: var(--muted);
}

.nav-links a:hover,
.site-footer a:hover,
.cv-sidebar a:hover {
  color: var(--ink);
}

.theme-button,
.button {
  align-items: center;
  border: 1px solid var(--line);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  justify-content: center;
  min-height: 42px;
}

.theme-button {
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  min-width: 104px;
  padding: 10px 14px;
  white-space: nowrap;
}

.button {
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  min-width: 116px;
  padding: 10px 18px;
}

.button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.button.secondary {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

.button:hover,
.theme-button:hover {
  border-color: var(--ink);
}

.hero {
  display: grid;
  min-height: 92svh;
  overflow: hidden;
  place-items: end start;
  position: relative;
}

.hero-image,
.hero-overlay {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(248, 247, 242, 0.96) 0%, rgba(248, 247, 242, 0.76) 38%, rgba(248, 247, 242, 0.12) 72%),
    linear-gradient(0deg, rgba(248, 247, 242, 0.7) 0%, rgba(248, 247, 242, 0) 42%);
}

:root[data-theme="dark"] .hero-overlay {
  background:
    linear-gradient(90deg, rgba(21, 23, 21, 0.96) 0%, rgba(21, 23, 21, 0.78) 40%, rgba(21, 23, 21, 0.16) 76%),
    linear-gradient(0deg, rgba(21, 23, 21, 0.82) 0%, rgba(21, 23, 21, 0) 46%);
}

.hero-content {
  max-width: 760px;
  padding: 128px clamp(20px, 5vw, 70px) 72px;
  position: relative;
  z-index: 1;
}

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

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

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 13vw, 10.4rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.9;
  margin-bottom: 28px;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4.5rem);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 0;
}

h3 {
  font-size: 1.03rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.intro {
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  max-width: 620px;
}

.role-line {
  color: var(--accent);
  font-size: clamp(1.05rem, 2vw, 1.38rem);
  font-weight: 800;
  margin-bottom: 18px;
}

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

.overview,
.content-band,
.learning,
.progression,
.metrics,
.site-footer {
  margin-inline: auto;
  max-width: var(--max);
  padding-inline: clamp(20px, 5vw, 48px);
}

.overview {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  padding-bottom: 64px;
  padding-top: 78px;
}

.overview > p {
  color: var(--muted);
  font-size: 1.12rem;
  margin-bottom: 0;
}

.metrics {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: 88px;
}

.metrics article {
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 190px;
  padding: 24px;
}

.metrics span {
  color: var(--accent);
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 30px;
}

.metrics strong {
  display: block;
  margin-bottom: 8px;
}

.metrics p,
.work-card p,
.timeline p,
.learning-list strong,
.progression p,
.section-summary {
  color: var(--muted);
}

.content-band {
  padding-bottom: 92px;
  padding-top: 92px;
}

.section-heading {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr auto;
  margin-bottom: 38px;
}

.section-heading .section-kicker {
  grid-column: 1 / -1;
  margin-bottom: -10px;
}

.cv-grid {
  align-items: start;
  display: grid;
  gap: 34px;
  grid-template-columns: 280px minmax(0, 1fr);
}

.cv-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 34px;
  padding: 24px;
  position: sticky;
  top: 92px;
}

.cv-sidebar a {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.contact-name {
  font-weight: 800;
  margin-bottom: 4px;
}

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

.tag-list li {
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 7px 10px;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  gap: 28px;
  grid-template-columns: 140px minmax(0, 1fr);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  color: var(--accent);
  font-weight: 800;
}

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

.work-band {
  border-top: 1px solid var(--line);
}

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

.work-card {
  background: var(--surface);
  border: 1px solid var(--line);
  min-height: 290px;
  padding: 24px;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.work-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.training-band {
  border-top: 1px solid var(--line);
}

.section-summary {
  font-size: 1.08rem;
  margin-bottom: 28px;
  max-width: 760px;
}

.training-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.training-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  min-height: 58px;
  padding: 14px;
}

.progression {
  border-top: 1px solid var(--line);
  padding-bottom: 88px;
  padding-top: 88px;
}

.progression p {
  font-size: clamp(1.1rem, 2vw, 1.38rem);
  max-width: 880px;
}

.learning {
  padding-bottom: 96px;
  padding-top: 44px;
}

.learning-list {
  border-top: 1px solid var(--line);
}

.learning-list article {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: 140px minmax(0, 1fr);
  min-height: 86px;
}

.learning-list span {
  color: var(--accent);
  font-weight: 800;
}

.learning-list strong {
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 500;
}

.site-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 94px;
}

.site-footer p {
  font-weight: 800;
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 88svh;
  }

  .hero-overlay,
  :root[data-theme="dark"] .hero-overlay {
    background:
      linear-gradient(180deg, rgba(248, 247, 242, 0.88) 0%, rgba(248, 247, 242, 0.82) 58%, rgba(248, 247, 242, 0.7) 100%),
      linear-gradient(90deg, rgba(248, 247, 242, 0.96), rgba(248, 247, 242, 0.24));
  }

  :root[data-theme="dark"] .hero-overlay {
    background:
      linear-gradient(180deg, rgba(21, 23, 21, 0.92) 0%, rgba(21, 23, 21, 0.84) 58%, rgba(21, 23, 21, 0.76) 100%),
      linear-gradient(90deg, rgba(21, 23, 21, 0.97), rgba(21, 23, 21, 0.32));
  }

  .overview,
  .metrics,
  .cv-grid,
  .work-grid,
  .training-list {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .cv-sidebar {
    position: static;
  }

  .timeline-item,
  .learning-list article {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .site-header {
    min-height: 62px;
    padding-inline: 14px;
  }

  .brand span:last-child {
    display: none;
  }

  .hero-content {
    padding: 112px 20px 54px;
  }

  h1 {
    font-size: clamp(3.4rem, 22vw, 5.5rem);
  }

  .button {
    flex: 1;
    min-width: 0;
  }

  .theme-button {
    font-size: 0.78rem;
    min-width: 92px;
    padding-inline: 10px;
  }

  .metrics article,
  .work-card {
    min-height: auto;
  }
}

@media print {
  .site-header,
  .hero,
  .work-band,
  .learning,
  .progression,
  .site-footer,
  .print-button {
    display: none;
  }

  :root,
  :root[data-theme="dark"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --ink: #000000;
    --muted: #444444;
    --line: #bbbbbb;
    --accent: #000000;
    --accent-2: #000000;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .overview,
  .content-band {
    max-width: none;
    padding: 24px 0;
  }

  .cv-grid {
    grid-template-columns: 220px 1fr;
  }

  .cv-sidebar {
    position: static;
  }
}
