/* Self-hosted variable fonts (SIL Open Font License), one file per subset. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #FAF9F6;
  --text: #1A1A1A;
  --text-muted: #555555;
  --border: #E5E5E0;
  --accent: #1B4332;
  --on-accent: #FAF9F6;
  --surface: #F1EFE9;
  --chip: #FFFFFF;
  --chip-tint: #DCE9E1;
  --chip-ink: #1B4332;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;

  --rail: 200px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211;
    --text: #F2F0EB;
    --text-muted: #A3A39E;
    --border: #2A2A27;
    --accent: #95D5B2;
    --on-accent: #121211;
  --surface: #1B1B19;
  --chip: #ECEAE4;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #121211;
  --text: #F2F0EB;
  --text-muted: #A3A39E;
  --border: #2A2A27;
  --accent: #95D5B2;
  --on-accent: #121211;
  --surface: #1B1B19;
  --chip: #ECEAE4;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 200ms ease, color 200ms ease;
}

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

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

main:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0;
  transform: translateY(-120%);
  padding: var(--space-sm) var(--space-md);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  z-index: 10;
}

.skip-link:focus {
  transform: translateY(var(--space-sm));
}

.print-only {
  display: none;
}

/* Masthead */

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  column-gap: var(--space-xl);
  align-items: end;
  padding-top: clamp(2.5rem, 8vw, 5.5rem);
  padding-bottom: var(--space-xl);
}

.name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.25rem, 9vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-left: -0.04em;
}

.role-line {
  margin-top: var(--space-lg);
  color: var(--text-muted);
  font-weight: 500;
}

.statement {
  margin-top: var(--space-lg);
  max-width: 34em;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

html:not(.js) [data-needs-js] {
  display: none;
}

.noscript-note {
  margin-top: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 2.75rem;
  padding: 0 var(--space-md);
  border: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: 500 0.9375rem/1 var(--font-body);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

a.btn {
  text-decoration: none;
}

.btn:hover {
  border-color: var(--text);
}

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

.btn-primary:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

/* Sections */

.section {
  scroll-margin-top: 3.5rem;
  padding-block: var(--space-xl);
  border-top: 1px solid var(--text);
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.entry {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  column-gap: var(--space-xl);
  padding-block: var(--space-lg);
  border-top: 1px solid var(--border);
}

.entry-meta {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.dates {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.85;
  color: var(--text);
}

.org {
  margin-top: var(--space-xs);
}

.entry-body {
  max-width: 64ch;
}

.entry-body h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}

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

/* Bullets read like additions in a terraform plan */
.plan {
  margin-top: var(--space-sm);
}

.plan li {
  position: relative;
  padding-left: 1.5rem;
  margin-top: var(--space-sm);
  text-wrap: pretty;
}

.plan li::before {
  content: "+";
  content: "+" / "";
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  margin-top: var(--space-md);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.skills dt {
  font-weight: 500;
  color: var(--text);
}

/* Footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
  padding-block: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--text);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-lg);
  max-width: calc(100vw - 2rem);
  padding: var(--space-sm) var(--space-md);
  background: var(--text);
  color: var(--bg);
  font-size: 0.9375rem;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 0.5rem);
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background-color 200ms ease;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  min-height: 3rem;
}

.topbar-name {
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.topbar-links {
  display: flex;
  gap: var(--space-lg);
  margin-left: auto;
  font-size: 0.9375rem;
}

.topbar-links a {
  display: block;
  white-space: nowrap;
  padding-block: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) left calc(100% - 0.5rem) / 0 1px no-repeat;
  transition: color 150ms ease, background-size 200ms var(--ease-out);
}

.topbar-links a:hover,
.topbar-links a[aria-current="true"] {
  color: var(--text);
  background-size: 100% 1px;
}

.btn-quiet {
  flex: none;
  white-space: nowrap;
  border-color: transparent;
  padding-inline: var(--space-sm);
  color: var(--text-muted);
}

.btn-quiet:hover {
  border-color: var(--border);
  color: var(--text);
}

.switch {
  position: relative;
  flex: none;
  width: 1.75rem;
  height: 1rem;
  border: 1px solid currentColor;
  border-radius: 1rem;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1rem - 6px);
  height: calc(1rem - 6px);
  border-radius: 50%;
  background: currentColor;
  transition: transform 200ms var(--ease-out), background-color 150ms ease;
}

[aria-checked="true"] .switch {
  border-color: var(--accent);
  background: var(--accent);
}

[aria-checked="true"] .switch::after {
  background: var(--on-accent);
  transform: translateX(0.75rem);
}
/* Credo beside the name */

.credo {
  margin: 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--text);
  animation: credo-in 700ms var(--ease-out) 200ms backwards;
}

.credo blockquote {
  margin: 0;
}

.credo p {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.credo figcaption {
  margin-top: var(--space-md);
  color: var(--text-muted);
  font-size: 0.875rem;
}

@keyframes credo-in {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

/* Logo chips */

.chip {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--chip);
  box-shadow: 0 0 0 1px var(--border);
}

.chip img {
  display: block;
  object-fit: contain;
}

.chip-text {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--chip-ink);
  background: var(--chip-tint);
}

/* Timeline */

.timeline .entry {
  position: relative;
}

.timeline .entry::before {
  content: "";
  position: absolute;
  left: calc(var(--rail) + var(--space-xl) / 2 - 0.5px);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline .entry::after {
  content: "";
  position: absolute;
  left: calc(var(--rail) + var(--space-xl) / 2 - 4.5px);
  top: calc(var(--space-lg) + 0.55rem);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--text-muted);
  transition: background-color 150ms ease, border-color 150ms ease;
}

.timeline .entry:hover::after {
  border-color: var(--accent);
  background: var(--accent);
}

.timeline .is-current::after {
  border-color: var(--accent);
  background: var(--accent);
  animation: live 2.4s ease-out infinite;
}

@keyframes live {
  from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70%, to { box-shadow: 0 0 0 9px transparent; }
}

/* Tools */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-lg);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.group-title {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  padding: 0 1px 1px 0;
}

.tool {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: center;
  margin: 0 -1px -1px 0;
  padding: 0.75rem;
  border: 1px solid var(--border);
  transition: background-color 150ms ease;
}

.tool:hover {
  background: var(--surface);
}

.tool .chip {
  grid-row: span 2;
  transition: transform 200ms var(--ease-out);
}

.tool:hover .chip {
  transform: scale(1.08);
}

.tool-name {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
}

.tool-level {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
  white-space: nowrap;
}

.meter {
  display: inline-flex;
  gap: 2px;
  flex: none;
}

.meter i {
  width: 0.625rem;
  height: 0.3125rem;
  background: var(--border);
  transition: background-color 350ms ease;
}

.meter i:nth-child(2) { transition-delay: 120ms; }
.meter i:nth-child(3) { transition-delay: 240ms; }

[data-level="1"] .meter i:nth-child(-n+1),
[data-level="2"] .meter i:nth-child(-n+2),
[data-level="3"] .meter i:nth-child(-n+3) {
  background: var(--accent);
}

/* Meters fill once their group scrolls into view (script adds .is-inview). */
html.js .tool-grid:not(.is-inview) .meter i {
  background: var(--border);
}

.skills {
  margin-top: var(--space-lg);
}

@media (max-width: 999px) {
  .topbar-links {
    gap: var(--space-md);
  }

  .btn-quiet .btn-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .btn-quiet {
    min-width: 2.75rem;
  }
}

@media (max-width: 799px) {
  .wide-only {
    display: none;
  }
}

@media (max-width: 899px) {
  .masthead {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-xl);
  }
}

@media (max-width: 359px) {
  .roomy-only {
    display: none;
  }
}

@media (max-width: 699px) {
  .topbar-name {
    display: none;
  }

  .topbar-links {
    gap: 0.75rem;
    margin-left: 0;
  }

  .topbar-inner {
    gap: var(--space-sm);
  }

  .timeline .entry::before,
  .timeline .entry::after {
    display: none;
  }

  .tool-grid {
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  }

  .tool {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-xs);
  }

  .tool .chip {
    grid-row: auto;
    margin-bottom: var(--space-xs);
  }

  .entry {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-sm);
  }

  .org {
    margin-top: 0;
  }

  .actions .btn {
    flex: 1 1 auto;
    white-space: nowrap;
  }

  .tool-level {
    flex-wrap: wrap;
    row-gap: 0;
    white-space: normal;
  }
}

/* Animations switched off by the visitor (script sets data-motion="off"). Colour and opacity feedback stay. */
:root[data-motion="off"] .toast,
:root[data-motion="off"] .toast.is-visible {
  transform: translate(-50%, 0);
}

:root[data-motion="off"] .skip-link,
:root[data-motion="off"] .switch::after {
  transition: none;
}

:root[data-motion="off"] .credo,
:root[data-motion="off"] .timeline .is-current::after {
  animation: none;
}

:root[data-motion="off"] .meter i {
  transition-delay: 0s;
}

:root[data-motion="off"] .tool:hover .chip,
:root[data-motion="off"] .btn:active {
  transform: none;
}
@page {
  size: A4;
  margin: 14mm 16mm;
}

@media print {
  :root,
  :root[data-theme="dark"],
  :root:not([data-theme="light"]) {
    --bg: #FFFFFF;
    --text: #111111;
    --text-muted: #333333;
    --border: #CCCCCC;
    --accent: #111111;
    --rail: 42mm;
    color-scheme: light;
  }

  body {
    font-size: 9.5pt;
    line-height: 1.4;
  }

  .skip-link,
  .topbar,
  .credo,
  .legend,
  .chip,
  .meter,
  .actions,
  .noscript-note,
  .toast,
  .footer {
    display: none !important;
  }

  .print-only {
    display: block;
  }

  .wrap {
    max-width: none;
    padding-inline: 0;
  }

  .masthead {
    padding-block: 0 5mm;
  }

  .name {
    font-size: 30pt;
    margin-left: 0;
  }

  .role-line {
    margin-top: 1.5mm;
  }

  .statement {
    margin-top: 3mm;
    max-width: none;
    font-size: 11pt;
    line-height: 1.35;
  }

  .print-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0 6mm;
    margin-top: 3mm;
  }

  .print-contact span:empty {
    display: none;
  }

  .section {
    padding-block: 3mm 2mm;
    border-top-width: 0.75pt;
  }

  .section h2 {
    font-size: 14pt;
    margin-bottom: 2mm;
    break-after: avoid;
  }

  .entry {
    column-gap: 6mm;
    padding-block: 2mm;
    break-inside: avoid;
  }

  .entry-meta,
  .dates,
  .tags {
    font-size: 8.5pt;
  }

  .entry-body {
    max-width: none;
  }

  .entry-body h3 {
    font-size: 10pt;
  }

  .plan,
  .tags {
    margin-top: 1mm;
  }

  .plan li {
    margin-top: 0.6mm;
    padding-left: 4mm;
  }

  .masthead {
    display: block;
  }

  .timeline .entry::before,
  .timeline .entry::after {
    display: none;
  }

  /* Tools print as a sentence per group; only levels above working experience are named. */
  .tool-grid {
    display: block;
    padding: 0;
  }

  .tool,
  .tool-name,
  .tool-level {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .tool-level::before {
    content: " (";
  }

  .tool-level::after {
    content: ")";
  }

  [data-level="1"] .tool-level {
    display: none;
  }

  .tool:not(:last-child)::after {
    content: ", ";
  }

  .tool-name,
  .group-title {
    font-size: 8.5pt;
  }

  .tool-level {
    font-size: 7.5pt;
  }

  .skills {
    margin-top: 0;
  }

  .consent {
    margin-top: 4mm;
    padding-top: 2mm;
    border-top: 0.75pt solid var(--border);
    font-size: 7pt;
    line-height: 1.35;
    color: var(--text-muted);
    break-inside: avoid;
  }
}
