:root {
  --bg: #f4f1ea;
  --surface: #fffcf8;
  --ink: #1a1916;
  --muted: #5e584e;
  --faint: #8a8276;
  --line: #e3dcd0;
  --accent: #1b4332;
  --accent-ink: #f7f4ee;
  --shadow: 0 16px 40px rgba(40, 32, 20, 0.06);
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --page: 72rem;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #12110f;
  --surface: #1c1b18;
  --ink: #f3efe6;
  --muted: #c4bbae;
  --faint: #9a9184;
  --line: #312e29;
  --accent: #d5ebe1;
  --accent-ink: #13211b;
  --shadow: none;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12110f;
    --surface: #1c1b18;
    --ink: #f3efe6;
    --muted: #c4bbae;
    --faint: #9a9184;
    --line: #312e29;
    --accent: #d5ebe1;
    --accent-ink: #13211b;
    --shadow: none;
    color-scheme: dark;
  }
}

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

[hidden] { display: none !important; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 420px at 10% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  transition: background-color 0.45s ease, color 0.45s ease;
}

.site-header,
.section,
.job {
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease;
}

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

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

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 0.8rem;
  z-index: 30;
}
.skip:focus { top: 0.75rem; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.15rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0.35rem 0;
}

.nav a { position: relative; transition: color 0.2s ease; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav a:hover,
.nav a[aria-current] { color: var(--ink); }
.nav a[aria-current]::after { transform: scaleX(1); }

.theme-toggle {
  position: relative;
  width: 4.15rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 10%, var(--bg));
  color: var(--ink);
  cursor: pointer;
  outline: none;
  overflow: hidden;
}

.theme-toggle:focus,
.theme-toggle:focus-visible { outline: none; }

.theme-thumb {
  position: absolute;
  top: 0.16rem;
  left: 0.16rem;
  width: 1.93rem;
  height: 1.93rem;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-glyph {
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
}

.theme-glyph svg {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: none;
  color: var(--accent-ink);
  transform-origin: center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-sun { opacity: 1; transform: rotate(0deg); }
.theme-moon { opacity: 0; transform: rotate(-28deg); }

[data-theme="dark"] .theme-sun { opacity: 0; transform: rotate(28deg); }
[data-theme="dark"] .theme-moon { opacity: 1; transform: rotate(0deg); }
[data-theme="dark"] .theme-thumb { transform: translateX(1.9rem); }

@media (prefers-reduced-motion: reduce) {
  .theme-glyph svg,
  .theme-thumb,
  .card,
  body,
  .site-header { transition: none; }
}

.hero {
  padding: 4.5rem 0 2.5rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.role {
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.lede {
  max-width: 40rem;
  margin: 1.1rem 0 0;
  font-size: 1.12rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 1.45rem 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.button.quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

a.button:hover,
a.button:focus-visible {
  color: var(--accent-ink);
  filter: brightness(1.12);
}

.button.quiet:hover,
.button.quiet:focus-visible {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border-color: color-mix(in srgb, var(--ink) 30%, var(--line));
  filter: none;
}

.icon-btn {
  width: 2.85rem;
  height: 2.85rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--ink);
  line-height: 0;
  text-decoration: none;
  outline: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.icon-btn svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  fill: currentColor;
}

.icon-btn:focus,
.icon-btn:focus-visible { outline: none; }

a.icon-btn:hover,
a.icon-btn:focus-visible {
  color: var(--accent-ink);
  background: var(--accent);
}

.section {
  padding: 2.6rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 5rem;
}

.section:focus { outline: none; }

.lines { margin: 0; }
.lines div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
}
.lines div:last-child { border-bottom: 1px solid var(--line); }
.lines dt { margin: 0; font-weight: 600; }
.lines dd { margin: 0; color: var(--muted); }
.more { margin: 0.9rem 0 0; }
.more a { color: var(--accent); font-weight: 600; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.facts h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 600;
}
.quiet {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}
.quiet li + li { margin-top: 0.3rem; }

.contact-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 55%),
    var(--surface);
}

.contact-note {
  margin: 0;
  max-width: 28rem;
  color: var(--muted);
}

.contact-panel .button {
  border: 0;
  cursor: pointer;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin: 0;
  width: 100%;
}

.contact-line a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.contact-line a:hover { text-decoration: underline; }

.show-inline {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.site-footer .foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  align-items: baseline;
}

.site-footer p { margin: 0; }


.when { margin: 0.15rem 0 0.45rem; color: var(--muted); }

.section h2 {
  margin: 0 0 1.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.15rem 1.2rem 1.2rem;
  box-shadow: var(--shadow);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card h3,
.job h3 {
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.card h3 a,
.job h3 a { text-decoration: none; }

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card p:last-child,
.job li { color: var(--muted); }
.card p.body { margin: 0.55rem 0 0; color: var(--ink); }

.jobs { display: grid; gap: 1.4rem; }


.job ul { margin: 0.45rem 0 0; padding-left: 1.1rem; }
.job li + li { margin-top: 0.28rem; }

.skill-grid,
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.skill,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
}

.skill h3,
.panel h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.skill p,
.panel p { margin: 0.25rem 0; color: var(--muted); }

.contact-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.contact-list a { color: var(--accent); font-weight: 650; }

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  align-items: center;
  margin: 0 0 1rem;
}

button.print,
.button {
  font: inherit;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  text-decoration: none;
  cursor: pointer;
}

.site-footer {
  padding: 0.85rem 0;
  color: var(--faint);
  font-size: 0.86rem;
  line-height: 1.45;
  border-top: 1px solid var(--line);
}

.resume-top { padding: 2.4rem 0 0.4rem; }
.resume h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
.resume .role { font-size: 1.35rem; }
.resume .job { grid-template-columns: 1fr; }

/* Brand, hero accents */
.brand {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
a.brand:hover { color: var(--accent-ink); }
.bar .nav { margin-right: auto; margin-left: 0.6rem; }

.eyebrow .dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: #2d9d6a;
  box-shadow: 0 0 0 0.22rem color-mix(in srgb, #2d9d6a 22%, transparent);
  vertical-align: 0.08em;
}

.lede strong { font-weight: 600; color: var(--ink); }
.hero .lede { max-width: 44rem; color: var(--muted); }

/* Hero portrait: two aligned images crossfade with the theme */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 3rem;
}
.hero .stats { grid-column: 1 / -1; }

.portrait {
  position: relative;
  display: grid;
  width: clamp(15rem, 26vw, 21rem);
  aspect-ratio: 1;
  margin: 0;
  border-radius: 50%;
}
.portrait::before {
  content: "";
  position: absolute;
  inset: -0.6rem;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
  transition: border-color 0.7s ease, background 0.7s ease;
}
.portrait img {
  grid-area: 1 / 1;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.7s ease;
}
.portrait-light { opacity: 1; transform: none; filter: none; }
.portrait-dark { opacity: 0; transform: scale(0.98); filter: brightness(0.85); }

[data-theme="dark"] .portrait-light { opacity: 0; transform: scale(0.98); filter: brightness(0.7); }
[data-theme="dark"] .portrait-dark { opacity: 1; transform: none; filter: none; }

/* Circular theme reveal (view transitions): the new theme is drawn final,
   then uncovered by a growing circle, so nothing fades through grey. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) { z-index: 2; }
html.theme-reveal *:not(.theme-thumb):not(.theme-glyph svg),
html.theme-reveal *::before,
html.theme-reveal *::after { transition: none !important; }

/* Fallback: while the theme flips, every surface fades on the same clock */
html.theming *:not(.portrait img),
html.theming *::before,
html.theming *::after {
  transition:
    background-color 0.6s ease,
    background 0.6s ease,
    color 0.6s ease,
    border-color 0.6s ease,
    fill 0.6s ease,
    box-shadow 0.6s ease !important;
}
html.theming .theme-thumb,
html.theming .theme-glyph svg {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease, background-color 0.6s ease, color 0.6s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  .portrait img, .portrait::before { transition: opacity 0.2s linear; }
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .portrait {
    grid-row: 1;
    width: 8.5rem;
    margin: 0 0 1.4rem 0.6rem;
  }
  .portrait::before { inset: -0.4rem; }
}
.hero .lede strong { color: var(--ink); }

.socials { display: inline-flex; gap: 0.55rem; margin-left: 0.35rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 2.6rem 0 0;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  overflow: hidden;
  background: var(--line);
}
.stats div {
  padding: 1.1rem 1.2rem 1.15rem;
  background: var(--surface);
}
.stats dt {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--accent);
}
.stats dd {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Cards */
.card { transition: transform 0.25s ease, border-color 0.25s ease; }
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.card-tag {
  display: inline-block;
  margin-bottom: 0.55rem;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.card h3 a:hover { text-decoration: underline; }
.card { display: flex; flex-direction: column; }
.card .stack {
  margin: auto 0 0;
  padding-top: 0.85rem;
  color: var(--faint);
  font-size: 0.82rem;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.timeline .job {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.5rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}
.timeline .job:first-child { border-top: 0; padding-top: 0; }
.timeline .when {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
}
.timeline .job li strong { font-weight: 600; color: var(--ink); }
.timeline .job:first-child .when::before {
  content: "Now";
  display: block;
  width: max-content;
  margin-bottom: 0.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

/* Contact */
.contact-head {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.contact-panel { padding: 1.6rem 1.7rem; }
.contact-panel > div:first-child { flex: 1 1 22rem; }
.contact-note { max-width: 34rem; }

/* Resume helpers */
.meta-line { margin: 0.35rem 0 0; color: var(--muted); }
.plain-list { margin: 0; padding-left: 1.1rem; }
.plain-list li + li { margin-top: 0.3rem; }

@media (max-width: 800px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .timeline .job { grid-template-columns: 1fr; gap: 0.2rem; }
  .timeline .when { margin: 0; }
  .socials { margin-left: 0; }
}

@media (max-width: 520px) {
  .nav a:nth-child(1), .nav a:nth-child(3) { display: none; }
  .contact-panel { padding: 1.25rem; }
}

@media (max-width: 800px) {
  .hero,
  .cards,
  .skill-grid,
  .split,
  .facts,
  .lines div,
  .job { grid-template-columns: 1fr; }
  .hero { padding-top: 2rem; }
}

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

/* Resume document */
.cv {
  max-width: 52rem;
  padding: 2rem 0 4rem;
}
.cv-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  color: var(--faint);
  font-size: 0.88rem;
}
.cv-tools span { margin-right: auto; }
.cv-head { padding-bottom: 0.4rem; }
.cv h1 { font-size: clamp(2.4rem, 5vw, 3.2rem); line-height: 1; }
.cv-title {
  margin: 0.45rem 0 0.6rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.cv-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}
.cv-contact a { color: var(--ink); text-decoration: none; }
.cv-contact a:hover { color: var(--accent); text-decoration: underline; }
.cv-section { padding: 1.25rem 0 0.25rem; }
.cv-section h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.cv-section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.cv-section > p { margin: 0; }
.cv-skills, .cv-list { margin: 0; padding-left: 1.1rem; }
.cv-skills li + li, .cv-list li + li { margin-top: 0.2rem; }
.cv-skills strong { color: var(--ink); }
.cv-job + .cv-job { margin-top: 1rem; }
.cv-job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 1rem;
}
.cv-job-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
}
.cv-date {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cv-org { margin: 0.05rem 0 0; color: var(--muted); font-size: 0.93rem; }
.cv-job ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }
.cv-job li + li { margin-top: 0.18rem; }
.cv li a, .cv-org a, .cv-ctx a { color: var(--accent); }
.cv-ctx { font-weight: 400; color: var(--muted); }
.cv-proj + .cv-proj { margin-top: 0.6rem; }
.cv-proj ul { margin-top: 0.15rem; }

@page { size: A4; margin: 9mm 13mm; }

@media print {
  html, body { background: #fff !important; }
  body.resume {
    font-family: Arial, "Liberation Sans", Helvetica, sans-serif;
    font-size: 9.6pt;
    line-height: 1.3;
    color: #111;
  }
  body.resume * { letter-spacing: 0 !important; color: #111 !important; }
  body.resume a {
    color: #1849a9 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 0.5pt;
    text-underline-offset: 1.5pt;
  }
  .cv { max-width: none; width: auto; padding: 0; margin: 0; }
  .cv h1, .cv-title { font-family: Arial, "Liberation Sans", Helvetica, sans-serif; }
  .cv h1 { font-size: 20pt; font-weight: 700; }
  .cv-title { font-size: 11.5pt; margin: 2pt 0 4pt; font-weight: 700; }
  .cv-head { border-bottom: 0; padding-bottom: 2pt; }
  .cv h1 { color: #1b4332 !important; }
  .cv-title { color: #2d6a4f !important; }
  .cv-contact { font-size: 9.3pt; gap: 0 10pt; }
  .cv-section { padding: 5pt 0 0; }
  .cv-section h2 {
    display: flex;
    align-items: center;
    gap: 6pt;
    font-size: 10.5pt;
    margin: 0 0 4pt;
    padding: 0;
    border: 0;
    color: #1b4332 !important;
  }
  .cv-section h2::after {
    content: "";
    flex: 1;
    height: 0.8pt;
    background: #95b8a6;
  }
  .cv-job + .cv-job { margin-top: 5pt; }
  .cv-proj + .cv-proj { margin-top: 2pt; }
  .cv-proj ul { margin-top: 0; }
  .cv-job-head h3 { font-size: 10pt; }
  .cv-date, .cv-org { font-size: 9.3pt; }
  .cv-job ul { margin-top: 2pt; }
  .cv-job li + li, .cv-skills li + li, .cv-list li + li { margin-top: 1pt; }
  .cv-job-head, .cv-org, .cv-proj { break-inside: avoid; }
  .cv-job-head, .cv-org { break-after: avoid; }
  .cv-section h2 { break-after: avoid; }
}

@media print {
  .site-header, .no-print, .site-footer, .skip, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .skill, .panel { box-shadow: none; }
  a { text-decoration: none; color: #000; }
}

/* Footer link to the site's source */
.source-link {
  display: inline;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.source-link svg {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.3em;
  vertical-align: -0.12em;
  fill: currentColor;
}
.source-link:hover { color: var(--accent); text-decoration: underline; }

.flag {
  display: inline-block;
  width: 1.35em;
  height: 0.9em;
  margin: 0 0.1em;
  vertical-align: -0.1em;
  border-radius: 2px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 15%, transparent);
}
@media (min-width: 801px) {
  .site-footer .foot { flex-wrap: nowrap; }
  .site-footer p { white-space: nowrap; }
}

/* Centred footer: one line on wide screens, stacked on phones */
.site-footer .foot {
  justify-content: center;
  text-align: center;
  column-gap: 0.6rem;
}
@media (min-width: 801px) {
  .site-footer p + p::before {
    content: "·";
    margin-right: 0.6rem;
    color: var(--faint);
  }
}

/* Easter egg: the footer flag */
.flag-egg {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  line-height: 0;
  vertical-align: -0.1em;
  cursor: pointer;
}
.flag-egg .flag { vertical-align: 0; transform-origin: left center; }
.flag-egg:hover .flag,
.flag-egg:focus-visible .flag { animation: flag-wave 1.1s ease-in-out infinite; }
@keyframes flag-wave {
  0%, 100% { transform: skewY(0deg) scaleX(1); }
  25% { transform: skewY(-4deg) scaleX(0.97); }
  75% { transform: skewY(3deg) scaleX(1.02); }
}

.egg-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}
.egg-bit {
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 10px;
  will-change: transform, opacity;
}
.egg-bit.star { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.egg-bit.dot { border-radius: 50%; }
.egg-bit.strip { width: 6px; height: 12px; border-radius: 1px; }
.egg-bit.white { background: #fff; box-shadow: 0 0 0 1px rgba(1, 65, 28, 0.25); }
.egg-bit.green { background: #01411c; }
.egg-bit.leaf { background: #13a14b; }

.egg-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 61;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  max-width: calc(100% - 2rem);
  padding: 0.85rem 1.2rem 0.85rem 0.95rem;
  border-radius: 1rem;
  background: #01411c;
  color: #fff;
  box-shadow: 0 18px 40px rgba(1, 40, 18, 0.35);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.egg-toast.show { transform: translate(-50%, 0); opacity: 1; }
.egg-toast svg { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; }
.egg-toast strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.egg-toast span { display: block; font-size: 0.85rem; opacity: 0.85; }
[data-theme="dark"] .egg-toast { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 40px rgba(0, 0, 0, 0.5); }
