/* Newsreader and Source Sans 3 are licensed under the SIL Open Font License.
   License texts: assets/fonts/OFL-Newsreader.txt and assets/fonts/OFL-SourceSans3.txt. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/newsreader.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/source-sans-3.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #f3f0e7;
  --bg-elev: #faf8f2;
  --ink: #1c1916;
  --ink-soft: #3c3832;
  --muted: #514c45;
  --line: #ddd6c8;
  --line-strong: #c9c0b0;
  --accent: #0e4c48;
  --accent-hover: #0a3a37;
  --on-accent: #f7f4ee;
  --chip: #e6e0d2;
  --rule: #8f4630;
  --header: rgba(243, 240, 231, 0.92);
  --focus: #8f4630;
  --serif: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(28, 25, 22, 0.05);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131513;
  --bg-elev: #1c1f1c;
  --ink: #f3efe6;
  --ink-soft: #ddd6c8;
  --muted: #c4bbae;
  --line: #2e332e;
  --line-strong: #4a524c;
  --accent: #8fd9cc;
  --accent-hover: #b7eee4;
  --on-accent: #10211f;
  --chip: #242824;
  --rule: #d08968;
  --header: rgba(19, 21, 19, 0.92);
  --focus: #f3efe6;
  --shadow: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131513;
    --bg-elev: #1c1f1c;
    --ink: #f3efe6;
    --ink-soft: #ddd6c8;
    --muted: #c4bbae;
    --line: #2e332e;
    --line-strong: #4a524c;
    --accent: #8fd9cc;
    --accent-hover: #b7eee4;
    --on-accent: #10211f;
    --chip: #242824;
    --rule: #d08968;
    --header: rgba(19, 21, 19, 0.92);
    --focus: #f3efe6;
    --shadow: none;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.25rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

body,
.site-header {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  margin: 0.35rem 0 0.7rem;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
}

h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

h4 {
  margin: 1.35rem 0 0.4rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

p, ul, ol {
  margin: 0 0 0.9rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:visited {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  border-radius: 999px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.shell {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(10px)) {
  .site-header {
    background: var(--header);
    backdrop-filter: blur(12px);
  }
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  min-height: 4rem;
  padding: 0.4rem 0;
}

.brand,
.brand:visited {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 620;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.header-inner > nav {
  display: flex;
  min-width: 0;
  max-width: 100%;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.1rem 0.95rem;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
  max-width: 100%;
}

.nav-links a,
.nav-links a:visited {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1rem;
}

.nav-links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.theme-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

html.js .theme-toggle {
  display: inline-flex;
}

.theme-toggle .when-dark {
  display: none;
}

html[data-theme="dark"] .theme-toggle .when-light {
  display: none;
}

html[data-theme="dark"] .theme-toggle .when-dark {
  display: inline;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .when-light {
    display: none;
  }

  html:not([data-theme="light"]) .theme-toggle .when-dark {
    display: inline;
  }
}

.hero {
  padding: 3.2rem 0 3.5rem;
}

.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.headline {
  max-width: 18em;
  margin: 0 0 1.15rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 520;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.rule {
  width: 4.5rem;
  height: 3px;
  margin: 0 0 1.25rem;
  background: var(--rule);
  border: 0;
}

.measure {
  max-width: 66ch;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  margin: 0;
  padding: 0.35rem 0.7rem;
  background: var(--chip);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.95rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.button,
.button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  font-weight: 650;
  line-height: 1.2;
}

.button.primary,
.button.primary:visited {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.button.secondary,
.button.secondary:visited {
  background: transparent;
  color: var(--ink);
}

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

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.9rem;
  align-items: start;
  padding: 2.75rem 0;
  border-top: 1px solid var(--line);
}

.index {
  margin: 0.45rem 0 0;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.timeline {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2.1rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  bottom: 0.4rem;
  width: 1px;
  background: var(--line-strong);
}

.role {
  position: relative;
  margin: 0;
  padding: 0 0 0 1.35rem;
}

.role::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.where {
  margin: 0.3rem 0 0.55rem;
  color: var(--ink-soft);
}

.where .dates {
  white-space: nowrap;
}

.role ul,
.project ul,
.skill-group ul,
.certs {
  padding-left: 1.15rem;
}

.role li,
.project li,
.skill-group li,
.certs li {
  margin: 0.35rem 0;
  padding-left: 0.15rem;
}

.role li {
  max-width: 68ch;
}

.project + .project,
.earlier {
  margin-top: 2.6rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
}

.status {
  display: inline-block;
  margin: 0 0 0.55rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project h3 {
  margin-bottom: 0.45rem;
}

.project h3 + p,
.subhead {
  color: var(--ink-soft);
}

.shots,
.radar {
  margin: 1.4rem 0 0.4rem;
}

.shot-grid,
.radar-grid {
  display: grid;
  gap: 0.75rem;
}

.shot-grid picture,
.radar-grid picture {
  display: block;
  min-width: 0;
}

.shots img,
.radar img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.radar figcaption {
  margin: 0 0 0.75rem;
  font-weight: 650;
  color: var(--ink);
}

.shots figcaption {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
}

.phone {
  max-width: 20rem;
  margin-inline: auto;
  width: 100%;
}

.earlier-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.earlier-list h4 {
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 560;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
}

.earlier-list a,
.earlier-list a:visited {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.18em;
}

.skill-groups {
  display: grid;
  gap: 1.1rem;
}

.skill-group {
  padding: 0.95rem 1rem 0.7rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.skill-group h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
  margin-bottom: 0.35rem;
}

.skill-group ul {
  margin-bottom: 0.3rem;
}

.certs {
  margin-top: 0.35rem;
}

.contact-email {
  margin: 0.4rem 0 0.8rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 0 0 0.8rem;
  padding: 0;
  list-style: none;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
}

.place {
  color: var(--ink-soft);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.footer-inner a,
.footer-inner a:visited {
  color: var(--ink);
}

@media (max-width: 780px) {
  .header-inner > nav {
    flex: 1 0 100%;
    order: 3;
  }

  .nav-links {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
    width: 100%;
  }

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

  html {
    scroll-padding-top: 10.5rem;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .block {
    padding: 2.2rem 0;
  }
}

@media (min-width: 781px) {
  .header-inner > nav {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .shell {
    width: min(1080px, calc(100% - 3rem));
  }

  .block {
    grid-template-columns: 6.5rem 1fr;
    gap: 1.5rem 2rem;
    padding: 3.4rem 0;
  }
}

@media (min-width: 760px) {
  .shot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .shot-grid picture.wide,
  .radar-grid .wide {
    grid-column: 1 / -1;
  }

  .skill-group:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .radar-grid {
    grid-template-columns: 1fr 1fr;
  }

  .skill-groups {
    grid-template-columns: 1fr 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  .site-header,
  .skip-link,
  .theme-toggle,
  .actions {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  a {
    color: #000;
  }

  .block,
  .project,
  .role {
    break-inside: avoid;
  }
}
