/* michaelb.at
   Layout: a margin column (dates, clients, labels) beside a text column,
   inside full-width tinted bands, one per section.
   Colour: dark ink on soft tints, one accent hue in two strengths:
     --accent       fill behind ink text (link hover, the hero bar)
     --accent-line  underlines, rules, list markers (>= 3:1 on every band)
   No text is set in the accent, so every text colour is ink or muted.
   Fonts: Bricolage Grotesque (display) and Instrument Sans (text), both
   SIL Open Font License 1.1, Latin + German subsets. See fonts/LICENSE.md.
   No external requests. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-display.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Bands */
  --paper: #eff1ec;
  --mint: #e1f1e8;
  --sky: #e2ecf8;
  --lilac: #ebe7f7;

  --ink: #14201b;
  --muted: #47554e;
  --rule: rgb(20 32 27 / 16%);
  --accent: #ff5c39;
  --accent-line: #e8441f;
  --on-accent: #14201b;
  --select: #ffd3c6;

  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --display: "Bricolage Grotesque", "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Page grid: a margin column and a text column. */
  --side: 12rem;
  --gap: 3rem;
  --measure: 38rem;
  --page: calc(var(--side) + var(--gap) + var(--measure));
  --gutter: clamp(1.125rem, 5vw, 2.5rem);
  --band-pad: clamp(3.5rem, 2.25rem + 4.5vw, 6.5rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  font-kerning: normal;
  font-synthesis: none;
}

::selection { background: var(--select); color: var(--ink); }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--accent-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-color 0.12s ease-out, color 0.12s ease-out;
}
a:hover {
  background: var(--accent);
  color: var(--on-accent);
  text-decoration-color: var(--on-accent);
}

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

h1, h2, h3 {
  margin: 0;
  text-wrap: balance;
}
h1, h2 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 620;
}
h1 {
  font-size: clamp(2.25rem, 1.5rem + 3.7vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
}
h2 {
  font-size: clamp(1.875rem, 1.45rem + 1.7vw, 2.75rem);
  line-height: 1.06;
  letter-spacing: -0.016em;
}
h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

p { margin: 0 0 0.8em; }
p, li { text-wrap: pretty; }
strong { font-weight: 600; }
ul, ol, dl, dd { margin: 0; padding: 0; }
address { font-style: normal; }

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

.skip {
  position: absolute;
  top: -10rem;
  left: var(--gutter);
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 0.75rem; }

/* Page grid. Mobile: one column at a reading measure. Wider: margin column
   + text column, with h1/h2 spanning both. */

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

.side { margin: 0 0 0.4rem; }
.body > :last-child { margin-bottom: 0; }

@media (max-width: 49.99em) {
  p, li { hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 7 3 3; }
}

@media (min-width: 50em) {
  .wrap {
    width: min(100% - 2 * var(--gutter), var(--page));
    display: grid;
    grid-template-columns: var(--side) minmax(0, 1fr);
    column-gap: var(--gap);
    align-content: start;
  }
  .wrap > * { grid-column: 2; }
  .wrap > h1,
  .wrap > h2,
  .wrap > .entry,
  .wrap > .timeline,
  .wrap > .legal-grid { grid-column: 1 / -1; }

  .entry,
  .timeline {
    display: grid;
    grid-template-columns: var(--side) minmax(0, 1fr);
    grid-template-columns: subgrid;
    column-gap: var(--gap);
  }
  .entry { align-items: baseline; }
  .entry > .side { grid-column: 1; margin: 0; }
  .entry > .body { grid-column: 2; }
  .entry > .ledger,
  .timeline > li { grid-column: 1 / -1; }
}

/* Bands: one soft tint per section, set on the section element so the
   colour runs full width while the content stays on the grid. */

.site-header,
.hero,
.section.experience { background: var(--mint); }
.section.services,
.section.authmon { background: var(--sky); }
.section.results,
.section.contact { background: var(--lilac); }
.section { padding-block: var(--band-pad); }

/* Masthead */

.site-header .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.35rem 1.5rem;
  padding-block: 1.25rem 0.8rem;
  border-bottom: 1px solid var(--ink);
}
.site-header .nav { grid-column: 1 / -1; grid-row: 2; }
.brand {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
}
.brand:hover { background: none; color: inherit; }
.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
}
.nav a,
.lang {
  display: inline-block;
  padding-block: 0.2rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.lang { font-weight: 600; letter-spacing: 0.02em; }
@media (max-width: 26em) {
  .nav ul { column-gap: 0.95rem; }
  .nav a { font-size: 0.9rem; }
}
@media (min-width: 50em) {
  .site-header .wrap {
    grid-template-columns: var(--side) minmax(0, 1fr) auto;
    column-gap: var(--gap);
    padding-block: 1.5rem 0.9rem;
  }
  .site-header .brand { grid-column: 1; }
  .site-header .nav { grid-column: 2; grid-row: 1; }
  .site-header .lang { grid-column: 3; }
  .nav ul { column-gap: 1.75rem; }
}

/* Hero */

.hero { padding-block: clamp(3rem, 1.5rem + 6vw, 7rem) clamp(3.5rem, 1.5rem + 7vw, 8.5rem); }
.hero h1::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 0.375rem;
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  background: var(--accent);
}
.hero h1 { margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.75rem); }
.hero .entry {
  margin: 0;
  padding: 0;
  border: 0;
}
.hero .meta { margin-bottom: 0.9rem; }
.lede {
  font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4rem);
  line-height: 1.5;
  margin-bottom: 0;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: 1.75rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
}
.cta a { text-underline-offset: 0.28em; }
.cta a:first-child { text-decoration-thickness: 3px; }
.portrait {
  display: block;
  width: 5rem;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}
@media (max-width: 49.99em) {
  .hero-side {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
  }
  .hero .hero-side .meta { margin: 0; }
}
@media (min-width: 50em) {
  .hero .entry { align-items: start; }
  .hero .meta { margin: 0; padding-top: 0.25em; }
  .portrait {
    width: 100%;
    max-width: 10rem;
    margin: 0.35rem 0 1rem;
  }
}

/* Technologies: group in the margin column, names in the text column. */

.stack {
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.stack > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  column-gap: 1rem;
  padding-block: 0.55rem;
  border-top: 1px solid var(--rule);
}
.stack > div:last-child { border-bottom: 1px solid var(--rule); }
.stack dt { font-weight: 600; }
@media (min-width: 50em) {
  .wrap > .stack { grid-column: 1 / -1; }
  .stack {
    display: grid;
    grid-template-columns: var(--side) minmax(0, 1fr);
    grid-template-columns: subgrid;
    column-gap: var(--gap);
  }
  .stack > div {
    grid-column: 1 / -1;
    grid-template-columns: var(--side) minmax(0, 1fr);
    grid-template-columns: subgrid;
    column-gap: var(--gap);
  }
}

/* Shared pieces */

.section h2 { margin-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.5rem); }
.intro {
  color: var(--muted);
  margin-bottom: 0;
}

.entry {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
h2 + .entry,
.intro + .entry {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.entry h3 { margin-bottom: 0.4em; }
h3.side { text-wrap: pretty; }

.meta,
.years {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.years {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.org {
  color: var(--muted);
  margin-bottom: 0.45em;
}
.note {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}
.body > p + .note { margin-top: 1em; }

.list {
  margin: 0.25em 0 0;
  padding-left: 1.3em;
  list-style: "–\2002" outside;
}
.list li { margin-bottom: 0.3em; }
.list li::marker { color: var(--accent-line); font-weight: 600; }
@media (min-width: 50em) {
  .list { padding-left: 0; }
}

/* Key figures: number in the margin column, label in the text column. */

.ledger {
  margin-top: 2rem;
  border-top: 3px solid var(--accent-line);
}
.ledger > div:first-child { border-top: 0; }
.ledger {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 1rem;
}
.ledger > div {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  grid-template-columns: subgrid;
  column-gap: 1rem;
  align-items: baseline;
  padding-block: 0.6rem 0.55rem;
  border-top: 1px solid var(--rule);
}
.ledger dd {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 620;
  letter-spacing: -0.015em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.ledger dt {
  grid-column: 2;
  grid-row: 1;
  color: var(--muted);
  font-size: 0.9375em;
}
@media (min-width: 50em) {
  .ledger,
  .ledger > div {
    display: grid;
    grid-template-columns: var(--side) minmax(0, 1fr);
    grid-template-columns: subgrid;
    column-gap: var(--gap);
  }
  .ledger > div { grid-column: 1 / -1; }
  .ledger dd { font-size: 2rem; }
  .ledger dt { font-size: 1em; }
}

/* Results */

.case-featured h3 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
  font-weight: 620;
  letter-spacing: -0.012em;
  line-height: 1.12;
  margin-bottom: 0.6em;
}

/* Experience */

.timeline { list-style: none; }
.timeline > li:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Contact */

.contact-email {
  margin: 1.75rem 0 0.75rem;
  font-family: var(--display);
  font-optical-sizing: auto;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.75rem);
  font-weight: 620;
  letter-spacing: -0.02em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.contact-email a {
  text-decoration-thickness: 0.075em;
  text-underline-offset: 0.14em;
}
.contact-more {
  margin-bottom: 1.5rem;
  font-weight: 600;
}

/* Legal */

.legal {
  color: var(--muted);
  font-size: 0.9375rem;
}
.legal h2 {
  font-size: clamp(1.5rem, 1.3rem + 0.7vw, 1.875rem);
  color: var(--ink);
}
.legal h3 {
  margin: 1.5em 0 0.35em;
  color: var(--ink);
  font-size: 1rem;
}
.legal-grid {
  display: grid;
  gap: 2rem var(--gap);
}
.legal-grid > div > h3:first-child { margin-top: 0; }
.legal strong { color: var(--ink); }
.legal address { margin-bottom: 1.2em; }
.legal dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.3rem 1.25rem;
}
.legal dt { color: var(--ink); }
.legal dd { overflow-wrap: anywhere; }
@media (min-width: 50em) {
  .legal-grid,
  .legal-grid > div,
  .legal dl {
    grid-column: 1 / -1;
    grid-template-columns: var(--side) minmax(0, 1fr);
    grid-template-columns: subgrid;
    column-gap: var(--gap);
    align-items: baseline;
  }
  .legal-grid { row-gap: 2.5rem; }
  .legal-grid > div { display: grid; row-gap: 0.75rem; }
  .legal-grid > div > * { grid-column: 2; margin: 0; }
  .legal-grid > div > h3 { grid-column: 1; }
  .legal-grid > div > dl { grid-column: 1 / -1; row-gap: 0.3rem; }
  .legal dt { grid-column: 1; }
  .legal dd { grid-column: 2; }
}
@media (max-width: 30em) {
  .legal dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .legal dd { margin-bottom: 0.6rem; }
}

/* Footer */

.site-footer {
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
}
.site-footer p { margin: 0; }
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
}

@media print {
  :root {
    --paper: #fff; --mint: #fff; --sky: #fff; --lilac: #fff;
    --ink: #000; --muted: #333;
  }
  .site-header nav, .site-header .lang, .cta, .skip, .hero h1::after { display: none; }
  .section, .hero { padding-block: 1.5rem; }
  a { text-decoration: none; }
}
