/* IBM Plex, SIL Open Font License 1.1 (see fonts/OFL.txt) */
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/ibm-plex-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --paper: #f7f7f5;
  --raised: #ffffff;
  --ink: #15181d;
  --muted: #535a65;
  --rule: #d9dbdf;
  --rule-strong: #b9bdc4;
  --accent: #c43c12;
  --accent-ink: #ffffff;
  --link: var(--ink);
  --focus: var(--accent);
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: 1rem;
  --when-col: 10.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121418;
    --raised: #1a1d22;
    --ink: #e8e9eb;
    --muted: #9da3ad;
    --rule: #2b2f36;
    --rule-strong: #434852;
    --accent: #ff7d4f;
    --accent-ink: #121418;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--rule-strong) var(--paper); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 400 1.0625rem/1.6 var(--sans);
  caret-color: var(--accent);
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3, h4 { text-wrap: balance; }

a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: text-decoration-color 150ms ease-out, color 150ms ease-out;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.container { width: min(100% - 2 * var(--gutter), 60rem); margin-inline: auto; }

/* Fallback notice */
.status-note {
  margin: 0;
  padding: .55rem var(--gutter);
  display: flex;
  gap: .6rem;
  align-items: center;
  justify-content: center;
  font: 400 .8125rem/1.4 var(--mono);
  color: var(--ink);
  background: var(--raised);
  border-bottom: 1px solid var(--rule);
}
.status-dot { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }

/* Masthead */
.masthead { padding: 4.5rem 0 3rem; border-bottom: 1px solid var(--rule-strong); }
.masthead h1 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 4.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
/* Accent square, the same mark as the favicon */
.masthead h1::after { content: ""; display: inline-block; width: .16em; height: .16em; margin-left: .07em; background: var(--accent); }
.headline { margin: 1rem 0 0; font-size: clamp(1.15rem, 2.6vw, 1.5rem); font-weight: 500; line-height: 1.3; letter-spacing: -.01em; max-width: 34ch; }
.summary { max-width: 62ch; margin: .9rem 0 0; color: var(--muted); }

.masthead-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: stretch; }
.contact-row, .contact-list, .entry-list, .credential-list, .skill-list { margin: 0; padding: 0; list-style: none; }
.contact-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.contact-chip, .print-button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .9rem;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--raised);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}
.contact-chip:hover, .print-button:hover { border-color: var(--ink); }
.contact-label { font-weight: 500; }
.contact-url { font: 400 .8125rem/1 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.print-button { font: 500 1rem/1 var(--sans); cursor: pointer; }
.print-button svg { color: var(--accent); }
.print-button[hidden] { display: none; }

/* Sections */
.sheet-section { padding: 3.25rem 0; border-bottom: 1px solid var(--rule); }
.sheet-section h2 { margin: 0 0 1.75rem; font-size: 1.5rem; font-weight: 600; line-height: 1.2; letter-spacing: -.015em; }

.entry, .credential { margin: 0; }
.entry h3, .credential h4 { margin: 0; font-size: 1.1875rem; font-weight: 600; line-height: 1.3; }
.entry-org { margin: .15rem 0 0; font-weight: 500; }
.entry-summary { margin: .6rem 0 0; max-width: 65ch; }
.entry-dates, .entry-span {
  font: 400 .875rem/1.5 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.entry-dates { color: var(--ink); }
.entry-span { color: var(--muted); }

/* Experience: dates sit in their own column on wide screens */
.entry {
  display: grid;
  grid-template-areas: "title" "org" "when" "summary";
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule);
}
.entry:first-child { padding-top: 0; border-top: 0; }
.entry:last-child { padding-bottom: 0; }
.entry h3 { grid-area: title; }
.entry .entry-org { grid-area: org; }
.entry .entry-summary { grid-area: summary; }
.entry-when { grid-area: when; margin: .35rem 0 0; display: flex; flex-wrap: wrap; column-gap: .9rem; }

/* Skills */
.skill-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.skill-list li {
  padding: .3rem .7rem;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--raised);
  font-weight: 500;
  font-size: .9375rem;
}

/* Credentials */
.credential-groups { display: grid; gap: 2.25rem; }
.group-heading { margin: 0 0 1rem; font-size: 1rem; font-weight: 600; color: var(--muted); }
.credential + .credential { margin-top: 1.5rem; }
.credential .entry-dates { display: block; margin: .3rem 0 0; }

/* Closing contact */
.contact { border-bottom: 0; padding-bottom: 5rem; }
.contact-list { display: grid; gap: .25rem; }
.contact-line {
  min-height: 2.75rem;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1rem;
  padding-block: .4rem;
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 500;
  letter-spacing: -.01em;
}
.contact-line { text-decoration: none; }
.contact-line .contact-label { text-decoration: underline 1px var(--accent); text-underline-offset: .2em; }
.contact-line:hover .contact-label { text-decoration-thickness: 2px; }
.contact-line .contact-url { font-size: .875rem; letter-spacing: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding-block: 1.5rem 2.5rem; font-size: .875rem; color: var(--muted); }
.site-footer a { color: inherit; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: baseline; }
.footer-button { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

/* Consent banner */
.consent-banner {
  position: fixed;
  inset: auto var(--gutter) var(--gutter);
  z-index: 2;
  max-width: 34rem;
  margin-inline: auto;
  padding: 1.25rem;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--raised);
  color: var(--ink);
  box-shadow: 0 8px 24px rgb(0 0 0 / .14);
}
.consent-banner[hidden] { display: none; }
.consent-banner h2 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 600; }
.consent-banner p { margin: 0 0 1rem; font-size: .9375rem; }
.consent-actions { display: flex; gap: .75rem; }
.consent-actions button {
  flex: 1;
  min-height: 2.75rem;
  padding: .5rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Privacy */
.privacy { padding-block: 3rem 1rem; }
.privacy h1 { margin: 1.5rem 0 .25rem; font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.privacy-back, .privacy-updated { margin: 0; font-size: .875rem; color: var(--muted); }
.privacy-updated { margin-bottom: 1.5rem; }
.privacy p, .privacy li { max-width: 68ch; }
.privacy ul { padding-left: 1.25rem; }
.privacy li + li { margin-top: .5rem; }
.privacy .sheet-section { padding-block: 2rem; }
.privacy .sheet-section:last-child { border-bottom: 0; }
.privacy code { font-family: var(--mono); font-size: .9em; }

.skip-link { position: absolute; left: 1rem; top: -4rem; padding: .5rem .75rem; background: var(--raised); color: var(--ink); }
.skip-link:focus { top: 1rem; z-index: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
  .masthead { padding-block: 6.5rem 3.75rem; }
  .sheet-section { padding-block: 4rem; }
  .entry {
    grid-template-columns: var(--when-col) minmax(0, 1fr);
    grid-template-areas: "when title" "when org" "when summary";
    column-gap: 2.5rem;
  }
  .entry-when { margin: .3rem 0 0; flex-direction: column; align-self: start; }
  .credential-groups:has(.credential-group + .credential-group) { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
}

@media print {
  :root { --paper: #fff; --raised: #fff; --ink: #000; --muted: #333; --rule: #bbb; --rule-strong: #888; }
  body { font-size: 10.5pt; }
  .masthead { padding: 0 0 1rem; }
  .masthead h1::after { display: none; }
  .sheet-section { padding: 1rem 0; }
  .entry, .credential { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .contact-chip { border: 0; padding: 0; min-height: 0; background: none; }
  .skip-link, .visually-hidden, .print-button, .status-note, .contact, .site-footer, .consent-banner { display: none; }
}
