:root {
  --bg: #0b1424;
  --surface: #142033;
  --ink: #f4f1e8;
  --muted: #c5cedd;
  --accent: #e8c872;
  --line: rgba(232, 200, 114, 0.38);
  --hover: rgba(232, 200, 114, 0.08);
  --serif: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", sans-serif;
  --gutter: 4.5rem;
  --gap: 1.5rem;
  --inset: calc(var(--gutter) + var(--gap));
  --measure: 38rem;
  --header-offset: 5.5rem;
  color-scheme: dark;
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/newsreader-latin-italic.woff2") format("woff2");
}

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

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

html {
  scroll-behavior: smooth;
}

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

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

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
.contact-name,
.deck {
  text-wrap: balance;
}

a {
  color: inherit;
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 0.9rem;
  z-index: 50;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

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

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

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand print"
    "nav nav";
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.1rem;
  padding: 0.45rem 0 0.35rem;
}

.brand {
  grid-area: brand;
}

.print-button {
  grid-area: print;
  justify-self: end;
}

.primary-nav {
  grid-area: nav;
}

.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 520;
  letter-spacing: -0.02em;
  text-decoration: none;
  padding: 0.35rem 0;
}

.brand:hover {
  color: var(--accent);
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.15rem 1.15rem;
  margin: 0;
  padding: 0.15rem 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

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

.primary-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

.print-button {
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

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

section[id] {
  scroll-margin-top: 6.5rem;
}

.hero {
  padding: clamp(2.8rem, 6vw, 5.2rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin-top: 0.85rem;
  background: var(--accent);
}

h1 {
  margin: 0.55rem 0 0.85rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.8rem, 8.8vw, 5.28rem);
  letter-spacing: -0.035em;
  line-height: 0.9;
  color: var(--accent);
}

.deck {
  margin: 0;
  max-width: 18em;
  font-family: var(--serif);
  font-weight: 450;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  line-height: 1.32;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(15rem, 0.72fr);
  gap: 2.5rem 4rem;
  align-items: start;
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.prose p,
.section-lead,
.project-body p,
.cap-body p,
.about-copy p,
.contact-lead {
  max-width: var(--measure);
}

.prose p,
.about-copy p {
  margin: 0 0 1rem;
}

.prose p:last-child,
.about-copy p:last-child {
  margin-bottom: 0;
}

.facts {
  margin: 0;
}

.facts div {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.facts div:first-child {
  padding-top: 0;
}

.facts dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.facts dd {
  margin: 0.2rem 0 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 480;
  line-height: 1.25;
}

.section {
  padding: clamp(2.8rem, 6vw, 4.6rem) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.6rem;
}

h2 {
  margin: 0 0 0.55rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--accent);
}

h2::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-bottom: 0.75rem;
  background: var(--accent);
}

.section-lead {
  margin: 0;
  color: var(--muted);
}

.inset {
  margin-left: var(--inset);
}

.ledger {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  column-gap: var(--gap);
  align-items: baseline;
}

.project {
  margin-left: -1rem;
  margin-right: -1rem;
  padding: 1.45rem 1rem 1.55rem;
  border-top: 1px solid var(--line);
}

.project:last-of-type {
  border-bottom: 1px solid var(--line);
}

.project:hover,
.project:focus-within {
  background: var(--hover);
}

.project-index {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 480;
  font-size: 1.35rem;
  color: var(--accent);
}

h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 520;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--accent);
}

h3 a,
h4 a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

h4 {
  color: var(--accent);
}

.stack {
  margin: 0.4rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.98rem;
  letter-spacing: 0.03em;
}

.project-body p {
  margin: 0;
}

.product {
  margin-left: var(--inset);
  padding: 1.35rem 0 0.35rem;
  border-top: 1px solid var(--line);
}

.product-kicker {
  margin: 0.3rem 0 0;
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.product-deck {
  margin: 0.45rem 0 0.9rem;
  max-width: 40rem;
}

.product-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem 2.5rem;
}

.product-cols h4 {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.product-cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-cols li {
  position: relative;
  margin: 0.35rem 0;
  padding-left: 1.05rem;
}

.product-cols li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.55rem;
  height: 1px;
  background: var(--accent);
}

@media (min-width: 800px) {
  .product-cols {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.also {
  margin-top: 1.8rem;
}

.also h3 {
  font-size: 1.35rem;
}

.also-list {
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
  max-width: var(--measure);
}

.also-list li {
  position: relative;
  margin: 0.45rem 0;
  padding-left: 1.1rem;
}

.also-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.55rem;
  height: 1px;
  background: var(--accent);
}

.employer,
.credential {
  margin-left: var(--inset);
}

.employer {
  padding: 1.2rem 0 0.2rem;
  border-top: 1px solid var(--line);
}

.employer-head .stack {
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.acq {
  margin: 0.35rem 0 0;
  max-width: var(--measure);
  color: var(--muted);
  font-size: 0.98rem;
}

.employer h3,
.credential h3 {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
}

.role {
  margin-top: 0.85rem;
}

.role h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 520;
  font-size: 1.15rem;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.role-dates {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.role p,
.credential p {
  max-width: var(--measure);
}

.role p:not(.role-dates) {
  margin: 0.4rem 0 0;
}

.credential {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.credential .role-dates {
  margin-top: 0.35rem;
}

.plain-list {
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
  max-width: var(--measure);
}

.plain-list li {
  margin: 0.2rem 0;
}

.cap-list {
  border-bottom: 1px solid var(--line);
}

.cap {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr);
  column-gap: var(--gap);
  align-items: start;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.cap h3,
.cap-body {
  grid-column: 2;
}

.cap h3 {
  font-size: 1.55rem;
  padding-top: 0.15rem;
}

.cap-body p:last-child {
  margin: 0;
}

.contact-list {
  border-bottom: 1px solid var(--line);
}

.contact-link {
  display: block;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.contact-name {
  display: inline;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--accent);
  border-bottom: 1px solid transparent;
}

.contact-link:hover .contact-name,
.contact-link:focus-visible .contact-name {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.contact-url,
.contact-note {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.contact-note {
  margin-top: 0.35rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2.4rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  align-items: baseline;
}

.footer-name {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.15rem;
}

.site-footer p {
  margin: 0;
}

.print-only {
  display: none;
}

.missing {
  padding: clamp(4rem, 16vh, 8rem) 0;
}

.missing h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  max-width: 12em;
}

.missing a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
}

@media (min-width: 900px) {
  .cap {
    grid-template-columns: var(--gutter) minmax(8.5rem, 13rem) minmax(0, 1fr);
  }

  .cap h3 {
    grid-column: 2;
  }

  .cap-body {
    grid-column: 3;
  }
}

@media (max-width: 840px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (min-width: 800px) {
  .header-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand nav print";
    padding: 0.1rem 0;
  }

  .primary-nav ul {
    justify-content: flex-end;
    border-top: 0;
    padding-top: 0;
  }
}

@media (max-width: 720px) {
  section[id] {
    scroll-margin-top: 7.25rem;
  }

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

  body {
    font-size: 1.05rem;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 2.4rem;
    --gap: 0.75rem;
  }
}

@media (max-width: 420px) {
  .employer,
  .credential,
  .product,
  .inset {
    margin-left: 0;
  }

  .ledger {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.15rem;
  }

  .project {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

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

  .cap h3,
  .cap-body {
    grid-column: 1;
  }
}

@media (prefers-contrast: more) {
  :root {
    --bg: #000;
    --ink: #fff;
    --muted: #f4f0e7;
    --line: rgba(255, 255, 255, 0.55);
    --accent: #f0d7a8;
  }
}

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

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

@media print {
  :root {
    color-scheme: light;
  }

  @page {
    size: letter;
    margin: 0.42in 0.52in 0.32in;
  }

  html,
  body {
    background: #fff !important;
    color: #161616 !important;
    font-size: 9.5pt;
    line-height: 1.22;
  }

  body,
  body * {
    color: #161616 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-decoration-color: #161616 !important;
  }

  .skip,
  .site-header,
  .screen-only,
  .no-print {
    display: none !important;
  }

  .print-only {
    display: block !important;
    margin: 0 0 0.6rem;
    font-size: 10pt;
    letter-spacing: 0.02em;
  }

  .wrap {
    width: auto;
  }

  .hero,
  .section,
  .missing {
    padding: 0;
    border: 0;
  }

  .section {
    margin-top: 0.12rem;
  }

  #skills {
    break-before: page;
  }

  h1 {
    font-size: 16pt;
    margin: 0 0 0.1rem;
    letter-spacing: 0;
  }

  h2,
  h3,
  h4 {
    break-after: avoid;
  }

  h2 {
    font-size: 12pt;
    margin: 0 0 0.12rem;
  }

  .section-head {
    break-inside: avoid;
    break-after: avoid;
  }

  h2::before,
  .eyebrow::after {
    display: none;
  }

  h3 {
    font-size: 11pt;
  }

  .deck {
    font-size: 10.5pt;
    max-width: none;
    margin-bottom: 0.25rem;
  }

  .eyebrow {
    letter-spacing: 0.08em;
    font-size: 9pt;
  }

  .intro-grid {
    display: block;
    margin-top: 0.6rem;
    padding-top: 0.4rem;
    border-top: 1px solid #bbb;
  }

  .facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 1.25rem;
    margin-top: 0.55rem;
  }

  .facts div {
    border: 0;
    padding: 0;
  }

  .facts dt {
    display: inline;
    font-size: 10pt;
    letter-spacing: 0;
    text-transform: none;
  }

  .facts dt::after {
    content: ": ";
  }

  .facts dd {
    display: inline;
    font-family: var(--sans);
    font-size: 10.5pt;
  }

  .inset,
  .also,
  .employer,
  .credential,
  .product {
    margin-left: 0;
  }

  .product {
    padding: 0.1rem 0 0.05rem;
    border-top: 1px solid #ccc;
    break-inside: avoid;
  }

  .product-deck {
    margin: 0.05rem 0 0.15rem;
  }

  .product-cols {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.15rem 0.7rem;
  }

  .product-cols h4 {
    margin: 0 0 0.08rem;
    font-size: 9pt;
    letter-spacing: 0.04em;
  }

  .product-cols li {
    margin: 0;
  }

  .employer {
    padding: 0.1rem 0 0;
    border-top: 1px solid #ccc;
    break-inside: avoid;
  }

  .employer-head .stack {
    margin: 0;
  }

  .acq {
    margin: 0.04rem 0 0.08rem;
  }

  .role {
    margin-top: 0.12rem;
  }

  .role h4,
  .role-dates {
    display: inline;
    font-size: 10pt;
  }

  .role-dates {
    margin: 0 0 0 0.45rem;
  }

  .role p:not(.role-dates),
  .credential p {
    margin: 0.05rem 0 0;
  }

  .credential {
    margin-top: 0.28rem;
    padding-top: 0.18rem;
    break-inside: avoid;
  }

  .plain-list {
    margin: 0.05rem 0 0;
  }

  .plain-list li {
    margin: 0;
  }

  .section-lead,
  .prose p,
  .project-body p,
  .cap-body p,
  .about-copy p,
  .contact-lead,
  .also-list {
    max-width: none;
  }

  .prose p,
  .about-copy p {
    margin-bottom: 0.18rem;
  }

  .ledger,
  .cap {
    display: block;
  }

  .project {
    display: grid !important;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    column-gap: 0.45rem;
    margin: 0;
    padding: 0.12rem 0;
    border-top: 1px solid #ccc;
    break-inside: avoid;
  }

  .project:last-of-type {
    border-bottom: 1px solid #ccc;
  }

  .project-index {
    display: inline;
    margin-right: 0.35rem;
    font-size: 11pt;
  }

  .project h3 {
    display: inline;
  }

  .stack {
    margin: 0.1rem 0 0.2rem;
    font-size: 10pt;
  }

  .cap {
    padding: 0.04rem 0;
    border-top: 1px solid #ccc;
    break-inside: avoid;
  }

  .cap-list,
  .contact-list {
    border-bottom: 1px solid #ccc;
  }

  .cap h3 {
    font-size: 12pt;
    margin-bottom: 0.1rem;
  }

  .also {
    margin-top: 0.5rem;
  }

  .also-list li {
    margin: 0.15rem 0;
  }

  .contact-link {
    padding: 0.08rem 0;
    break-inside: avoid;
    border-top: 1px solid #ccc;
  }

  .contact-name {
    font-size: 10.5pt;
    border: 0;
  }

  .contact-url {
    display: inline;
    margin: 0 0 0 0.4rem;
    font-size: 9.5pt;
  }

  .contact-note {
    display: none !important;
  }

  .site-footer {
    margin-top: 0.15rem;
    padding: 0.12rem 0 0;
    border-top: 1px solid #ccc;
    font-size: 10pt;
    break-before: avoid;
  }

  a {
    text-decoration: none;
  }
}
