/* danielvecera.com — one stylesheet, no build step. */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-text.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader Display";
  src: url("/fonts/newsreader-display.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 620;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: oklch(98.2% 0.006 85);
  --surface: oklch(96.2% 0.008 82);
  --ink: oklch(23.5% 0.012 60);
  --muted: oklch(47% 0.014 65);
  --rule: oklch(88.5% 0.01 80);
  --accent: oklch(50.5% 0.155 35);

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --display: "Newsreader Display", "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Schibsted Grotesk", ui-sans-serif, "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --rail: 12rem;
  --measure: 37rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: oklch(18.5% 0.008 65);
    --surface: oklch(21.5% 0.009 65);
    --ink: oklch(92.5% 0.012 85);
    --muted: oklch(74% 0.014 80);
    --rule: oklch(32% 0.01 70);
    --accent: oklch(74% 0.125 42);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-synthesis: none;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

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

p,
li,
dd {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: color-mix(in oklch, var(--accent) 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

@media (prefers-reduced-motion: no-preference) {
  a {
    transition: color 120ms ease, text-decoration-color 120ms ease;
  }
}

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

strong {
  font-family: var(--display);
  font-weight: 500;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.9375rem;
  text-decoration: none;
  z-index: 1;
}

.skip-link:focus {
  top: 1rem;
}

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

/* Shared small-type voice: navigation, dates, labels, link rows. */
.masthead,
.kicker,
.social,
.date,
.role,
.links,
.label-note,
.site-footer,
.print-contact {
  font-family: var(--sans);
  font-feature-settings: "tnum" 1;
  word-spacing: 0.06em;
}

.arrow {
  font-family: var(--sans);
  font-weight: 400;
  margin-left: 0.15em;
}

/* Masthead */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
  font-size: 0.9375rem;
}

.wordmark {
  font-weight: 560;
  text-decoration: none;
}

.masthead nav ul {
  display: flex;
  gap: 1.5rem;
}

.masthead nav a {
  color: var(--muted);
  text-decoration: none;
}

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

/* Intro */

.intro {
  padding-block: clamp(3.5rem, 11vw, 8.5rem) clamp(3.5rem, 8vw, 6rem);
}

.kicker {
  color: var(--muted);
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
}

h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3.1rem, 1.6rem + 7.4vw, 7.25rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin-left: -0.04em;
}

.lede {
  max-width: 36rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(1.3rem, 1.05rem + 0.9vw, 1.625rem);
  line-height: 1.4;
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
  font-size: 1.0625rem;
  font-weight: 520;
}

.social a {
  display: inline-block;
  padding-block: 0.25rem;
}

/* Sections: a label rail beside the content on wide screens, stacked on narrow ones. */

.section {
  border-top: 1px solid var(--ink);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.row {
  display: grid;
  gap: 1rem 2.5rem;
}

.row + .row {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

@media (min-width: 52rem) {
  .row {
    grid-template-columns: var(--rail) minmax(0, 1fr);
  }
}

.label h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.label-note {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.label-note a {
  font-weight: 520;
  color: var(--ink);
}

.body {
  min-width: 0;
  max-width: 42rem;
}

.body p {
  max-width: var(--measure);
}

.body p + p {
  margin-top: 0.75rem;
}

/* Work entries */

.entries > li + li {
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  padding-top: clamp(1.75rem, 3.5vw, 2.5rem);
  border-top: 1px solid var(--rule);
}

.date {
  display: block;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}

.entry-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: 0.25rem;
}

.entry-title a {
  text-decoration: none;
}

.entry-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.role {
  margin-top: 0.4rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.role .award {
  color: var(--accent);
  font-weight: 560;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 520;
}

.links a {
  display: inline-block;
  padding-block: 0.2rem;
}

/* Compact list: open source and similar */

.compact > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem 1.5rem;
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
}

.compact > li:first-child {
  border-top: 0;
  padding-top: 0;
}

.compact .name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1875rem;
  line-height: 1.3;
}

.compact .date {
  align-self: baseline;
  text-align: right;
}

.compact p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.5;
}

/* CV timeline */

.timeline > li {
  display: grid;
  gap: 0.1rem 1.75rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
}

.timeline > li:first-child {
  border-top: 0;
  padding-top: 0;
}

@media (min-width: 40rem) {
  .timeline > li {
    grid-template-columns: 7.5rem minmax(0, 1fr);
  }

  .timeline .date {
    padding-top: 0.3rem;
  }
}

.timeline h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.3;
}

.timeline .role {
  margin-block: 0.15rem 0.5rem;
}

.timeline p {
  font-size: 1.0625rem;
  line-height: 1.55;
}

.facts {
  display: grid;
  gap: 0.6rem;
  max-width: var(--measure);
}

.facts > div {
  display: grid;
  gap: 0 1.75rem;
}

@media (min-width: 40rem) {
  .facts > div {
    grid-template-columns: 7.5rem minmax(0, 1fr);
  }
}

.facts dt {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
  padding-top: 0.25rem;
}

.facts dd {
  font-size: 1.0625rem;
  line-height: 1.55;
}

.plain-list > li + li {
  margin-top: 0.5rem;
}

.plain-list > li {
  max-width: var(--measure);
  font-size: 1.0625rem;
  line-height: 1.55;
}

/* Contact */

.contact-lede {
  font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.5rem);
  line-height: 1.4;
  max-width: 34rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 1.5rem 2.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

/* Not-found page */

.notfound {
  padding-block: clamp(4rem, 14vw, 10rem);
}

.notfound h1 {
  font-size: clamp(2.6rem, 1.6rem + 5vw, 5rem);
}

.notfound p {
  margin-top: 1.5rem;
  font-size: 1.3rem;
  max-width: 34rem;
}

.print-only {
  display: none;
}

/* Print: the page becomes a two-page CV. */

@media print {
  @page {
    size: A4;
    margin: 11mm 15mm 11mm;
  }

  :root {
    --paper: #fff;
    --surface: #fff;
    --ink: oklch(20% 0.01 60);
    --muted: oklch(42% 0.012 65);
    --rule: oklch(86% 0.008 80);
    --accent: oklch(45% 0.14 35);
    --rail: 30mm;
    --measure: none;
  }

  html {
    font-size: 8.6pt;
  }

  body {
    background: #fff;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .wrap {
    width: auto;
  }

  .body {
    max-width: none;
  }

  .skip-link,
  .masthead,
  .social,
  .links,
  .screen-only,
  #contact,
  .site-footer {
    display: none !important;
  }

  .print-only {
    display: block;
  }

  a {
    text-decoration: none;
  }

  main {
    display: flex;
    flex-direction: column;
  }

  #cv {
    order: 1;
  }

  #work {
    order: 2;
  }

  .intro {
    padding-block: 0 4mm;
  }

  .kicker {
    margin-bottom: 2mm;
  }

  h1 {
    font-size: 30pt;
    letter-spacing: -0.015em;
  }

  .body .lede,
  .lede {
    max-width: 150mm;
    margin-top: 3mm;
    font-size: 10.5pt;
    line-height: 1.4;
  }

  .print-contact {
    margin-top: 3mm;
    font-family: var(--sans);
    font-size: 8.5pt;
    color: var(--muted);
  }

  .print-contact a {
    color: var(--ink);
  }

  .section {
    padding-block: 4mm 1mm;
    border-top-width: 0.6pt;
  }

  .row {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    gap: 0 6mm;
  }

  .row + .row {
    margin-top: 5mm;
  }

  .label h2 {
    font-size: 12pt;
  }

  .entries > li + li,
  .timeline > li,
  .compact > li {
    margin-top: 0;
    padding-block: 2.2mm;
    border-top-width: 0.5pt;
  }

  .entries > li + li {
    padding-top: 3mm;
    margin-top: 1mm;
  }

  .entries > li,
  .timeline > li,
  .compact > li,
  .facts > div {
    break-inside: avoid;
  }

  .entry-title {
    font-size: 12.5pt;
    margin-top: 0;
  }

  .role {
    margin-bottom: 1mm;
  }

  .timeline > li {
    grid-template-columns: 22mm minmax(0, 1fr);
    gap: 0 4mm;
  }

  .timeline h3 {
    font-size: 10.5pt;
  }

  .timeline .date {
    padding-top: 0.6mm;
  }

  .body p,
  .timeline p,
  .facts dd,
  .plain-list > li,
  .compact p {
    font-size: 9pt;
    line-height: 1.42;
  }

  .body p + p {
    margin-top: 1mm;
  }

  .facts > div {
    grid-template-columns: 22mm minmax(0, 1fr);
    gap: 0 4mm;
  }

  .facts {
    gap: 1.2mm;
  }

  .plain-list > li + li {
    margin-top: 1mm;
  }
}
