/* ericeckhardt.com
   Restraint with intent: the type scale, measure, and spacing carry the page. */

/* Ronzino — Collletttivo, SIL OFL 1.1. A deliberate reimagining of Arial:
   "improving on its (many) drawbacks while retaining a similar
   information-driven feeling." Arial is the metric-matched fallback, so the
   swap costs almost no layout shift. License travels in fonts/OFL.txt. */

@font-face {
  font-family: "Ronzino";
  src: url("./fonts/Ronzino-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ronzino";
  src: url("./fonts/Ronzino-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Ronzino";
  src: url("./fonts/Ronzino-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --bg: #ffffff;
  --ink: #17171a;
  --muted: #5c5c66;
  --rule: #e4e4e7;

  /* Committed brand colour. Carries the whole top of every page. */
  --brand: oklch(0.52 0.19 35);          /* #bd2900 — white on it: 6.03:1 */
  --on-brand: #ffffff;
  --on-brand-dim: rgba(255, 255, 255, 0.72);

  /* Same hue as --brand, dark enough to carry text on white. */
  --accent: oklch(0.47 0.18 35);         /* #a81b00 — on white: 7.44:1 */
  --accent-hover: oklch(0.40 0.15 35);   /* #861600 — on white: 9.87:1 */

  --sans: "Ronzino", Arial, Helvetica, sans-serif;

  /* Three weights, three jobs. Nothing else. */
  --w-body: 400;
  --w-label: 500;
  --w-display: 700;

  /* Fluid type with a visible but controlled response from phone to desktop. */
  --step--1: clamp(0.875rem, 0.8rem + 0.3vw, 1.0625rem);
  --step-0:  clamp(1rem, 0.9rem + 0.45vw, 1.25rem);
  --step-1:  clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  --step-2:  clamp(2rem, 1.35rem + 2.9vw, 4.25rem);

  /* Shared display size for the opening statement and the section headlines,
     so the two read at the same scale. */
  --display: clamp(1.5625rem, 0.98rem + 2.75vw, 3.25rem);

  /* The frame and reading measure grow independently: the composition opens
     up on larger windows while prose remains comfortable to scan. */
  --page-width: clamp(58rem, 88vw, 86rem);
  --measure: clamp(48ch, 62vw, 70ch);
  --gutter: clamp(1.25rem, 3.5vw, 4.5rem);

  --space-xs: 0.5rem;
  --space-s:  1rem;
  --space-m:  2rem;
  --space-l:  clamp(3rem, 6vw, 4.5rem);
  --space-xl: clamp(4rem, 9vw, 7rem);
}

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

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

body {
  margin: 0;
  padding: 0 0 var(--gutter);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-synthesis: none;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

/* Wider than the prose needs, so the display intro has room to breathe.
   The frame grows with the window; body copy follows the narrower measure. */
.page {
  width: min(100%, var(--page-width));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The one committed colour field. Both pages open with it, which is what
   makes them read as the same site. Flat colour, no gradient, shadow, or
   motion; the oversized triangular edge gives the field a decisive finish. */
.band {
  /* Fixed tooth width so the triangles are the same size at every viewport
     (fewer teeth on mobile, more on desktop) rather than scaling to fit a
     fixed count. Depth is half the width to match the SVG's 24:12 shape. */
  --tooth-w: 1.75rem;
  --tooth-depth: calc(var(--tooth-w) / 2);
  position: relative;
  background: var(--brand);
  color: var(--on-brand);
  padding-block: var(--space-m) var(--space-l);
  margin-bottom: calc(var(--space-xl) + var(--tooth-depth));
}

/* Triangles of a fixed width repeat along the lower edge, so the count adapts
   to the window but each tooth keeps the same size. The SVG is a mask rather
   than a fixed colour, so it follows the brand token. */
.band::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 100%;
  height: var(--tooth-depth);
  background: var(--brand);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0H24L12 12Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0H24L12 12Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-size: var(--tooth-w) 100%;
  mask-size: var(--tooth-w) 100%;
}

.band a { color: var(--on-brand); }
.band a:hover { color: var(--on-brand); text-decoration-thickness: 2px; }
.band a:focus-visible { outline-color: var(--on-brand); }
.band .masthead nav a { color: var(--on-brand-dim); }
.band .masthead nav a:hover,
.band .masthead nav a[aria-current="page"] { color: var(--on-brand); }

/* ---- Links -------------------------------------------------------------- */

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 120ms ease-out, text-decoration-color 120ms ease-out;
}

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

main a, .colophon a { color: var(--accent); }

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

/* ---- Header ------------------------------------------------------------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-s);
  padding-bottom: var(--space-s);
  margin-bottom: var(--space-xl);
}

.site-name {
  /* inline-block so the padding below actually grows the hit area — as a bare
     inline it renders the padding but keeps a 38px box. */
  display: inline-block;
  font-size: var(--step-0);
  font-weight: var(--w-label);
  letter-spacing: -0.011em;
  text-decoration: none;
  /* 44px touch target without visually inflating the link */
  padding-block: 0.6875rem;
  margin-block: -0.6875rem;
}

.masthead nav { display: flex; gap: var(--space-m); }

.masthead nav a {
  font-size: var(--step--1);
  color: var(--muted);
  text-decoration: none;
  /* 44px touch target without visually inflating the link */
  padding-block: 0.75rem;
  margin-block: -0.75rem;
}

.masthead nav a:hover { color: var(--accent-hover); }
.masthead nav a[aria-current="page"] { color: var(--ink); font-weight: var(--w-label); }

/* ---- Lead --------------------------------------------------------------- */

.band-home { padding-bottom: calc(var(--space-l) + var(--space-m)); }
.band-home .masthead { margin-bottom: var(--space-m); }

.lead { margin: 0; }

.band h1 {
  margin: 0;
  font-size: var(--step-2);
  font-weight: var(--w-display);
  line-height: 1.15;
  letter-spacing: -0.021em;
  text-wrap: balance;
  max-width: 20ch;
}

/* On the homepage the subject of the page is the person, so the name in the
   masthead carries the h1. It should look identical to the link it replaces. */
.masthead h1 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.lead p {
  margin: var(--space-s) 0 0;
  max-width: var(--measure);
  color: var(--on-brand-dim);
  font-size: var(--step-1);
  text-wrap: pretty;
}

/* The whole opening statement, set as display type. This is the page's one
   loud moment — everything below it is quiet on purpose. */
.intro {
  margin: 0;
  /* Size tracks the viewport continuously; the guardrails are generous so it
     stays fluid across the whole window range rather than locking early. */
  font-size: var(--display);
  line-height: 1.3;
  letter-spacing: -0.023em;
  text-wrap: balance;
}

/* ---- Sections ----------------------------------------------------------- */

section { margin-bottom: var(--space-xl); }

/* Sentence case, not a tracked all-caps kicker. These are quiet signposts
   for a reader who is scanning, not a decorative label system. */
h2 {
  margin: 0 0 var(--space-m);
  font-size: var(--display);
  line-height: 1.15;
  font-weight: var(--w-label);
  letter-spacing: -0.011em;
  color: var(--muted);
}

section > p {
  margin: 0 0 var(--space-s);
  max-width: var(--measure);
  text-wrap: pretty;
}

section > p:last-child { margin-bottom: 0; }

/* ---- Not work ----------------------------------------------------------- */

/* The personal work is always visible but remains grouped as a distinct story. */
.not-work {
  margin-bottom: var(--space-xl);
}

.not-work-content { padding-bottom: var(--space-m); }

.not-work-header {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  margin-bottom: var(--space-m);
}

.not-work-heading { margin: 0; }

.slider-controls {
  display: flex;
  flex: none;
  gap: var(--space-s);
}

.slider-controls button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--on-brand);
  font: inherit;
  font-size: var(--step-1);
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.slider-controls [data-slider-previous]:hover { transform: translateX(-0.125rem); }
.slider-controls [data-slider-next]:hover { transform: translateX(0.125rem); }
.slider-controls button:active { transform: scale(0.92); }

.slider-controls button:focus-visible {
  outline: 2px solid oklch(0.9 0.18 100);
  outline-offset: 3px;
}

.slider-controls button:disabled {
  color: rgba(255, 255, 255, 0.38);
  cursor: default;
  transform: none;
}

.not-work-slider {
  --slider-gutter: max(var(--gutter), calc((100vw - var(--page-width)) / 2 + var(--gutter)));
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(82vw, 31rem);
  gap: clamp(var(--space-m), 3vw, var(--space-l));
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0 var(--slider-gutter) var(--space-m);
  cursor: grab;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  touch-action: auto;
}

.not-work-slider::-webkit-scrollbar { display: none; }

.not-work-slider.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.not-work-slider:focus-visible {
  outline: 2px solid oklch(0.9 0.18 100);
  outline-offset: 4px;
}

.not-work-slide {
  display: grid;
  align-content: start;
  grid-template-rows: auto minmax(5.5rem, auto) auto;
  gap: var(--space-s);
  margin: 0;
}

.not-work-slide h2 {
  margin: 0;
  font-size: var(--step-1);
  font-weight: var(--w-display);
  line-height: 1.15;
  letter-spacing: -0.018em;
}

.not-work-slide p { margin: 0; text-wrap: pretty; }
.not-work-slide .fpo { width: 100%; margin-top: var(--space-xs); }

.slide-photo {
  display: block;
  width: 100%;
  margin-top: var(--space-xs);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: rgba(23, 23, 26, 0.18);
}

.slide-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-photo-learning img { object-position: 50% 60%; }

/* ---- Other stuff -------------------------------------------------------- */

.other-stuff {
  --tooth-w: 1.75rem;
  --other-tooth-depth: calc(var(--tooth-w) / 2);
  position: relative;
  margin-top: var(--other-tooth-depth);
  margin-bottom: calc(-1 * var(--gutter));
  padding-block: var(--space-l) var(--space-xl);
  background: var(--brand);
  color: var(--on-brand);
}

.other-stuff::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 100%;
  height: var(--other-tooth-depth);
  background: var(--brand);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12H24L12 0Z' fill='black'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12H24L12 0Z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-size: var(--tooth-w) 100%;
  mask-size: var(--tooth-w) 100%;
}

.other-stuff .not-work-heading {
  color: var(--on-brand);
  font-size: var(--step-2);
  font-weight: var(--w-display);
  line-height: 1.15;
  letter-spacing: -0.021em;
}

.other-stuff h2 { color: var(--on-brand); }
.other-stuff a,
.other-stuff a:hover { color: var(--on-brand); }
.other-stuff a:focus-visible { outline-color: var(--on-brand); }

.other-stuff .fpo {
  border-color: rgba(255, 255, 255, 0.52);
  color: rgba(255, 255, 255, 0.86);
}

.other-stuff .contact-section { margin-bottom: 0; }

/* ---- Roles -------------------------------------------------------------- */

.section-heading {
  margin-bottom: var(--space-m);
  color: var(--ink);
  font-size: var(--step-2);
  font-weight: var(--w-display);
  line-height: 1.15;
  letter-spacing: -0.021em;
}

.experience-intro {
  margin-bottom: var(--space-l);
  color: var(--muted);
  font-size: var(--step-1);
}

.role { margin-bottom: var(--space-l); max-width: var(--measure); }
.role:last-child { margin-bottom: 0; }

.role-current {
  padding-top: 2.5rem;
}

.current-title-tail { position: relative; display: inline-block; }

.now-badge {
  position: absolute;
  top: -2.75rem;
  right: -0.25rem;
  display: grid;
  place-items: center;
  width: clamp(2.75rem, 4vw, 3.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: oklch(0.9 0.18 100);
  color: var(--ink);
  box-shadow: 0 0.1875rem 0 rgba(23, 23, 26, 0.22);
  font-size: var(--step--1);
  font-weight: var(--w-display);
  line-height: 1;
  letter-spacing: 0.04em;
  animation: now-spin 8s linear infinite;
  will-change: transform;
}

@keyframes now-spin {
  to { transform: rotate(1turn); }
}

@media (min-width: 48rem) {
  .role-current { padding-top: 1rem; }

  .now-badge {
    top: -2.25rem;
    right: -2.75rem;
  }
}

.role :is(h2, h3) {
  color: var(--ink);
  margin: 0;
  font-size: var(--step-1);
  font-weight: var(--w-label);
  line-height: 1.25;
  letter-spacing: -0.014em;
  text-wrap: balance;
}

.role .org { margin: 0.15rem 0 0; color: var(--ink); }

.role .meta {
  margin: 0 0 var(--space-xs);
  font-size: var(--step--1);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.role p:last-child { margin: var(--space-s) 0 0; }

/* ---- FPO placeholders --------------------------------------------------- */

/* Position markers for photography still to come. Deliberately plain so they
   never get mistaken for a design decision. Remove with the real images. */
.fpo {
  display: grid;
  place-items: center;
  margin-top: var(--space-m);
  aspect-ratio: 3 / 2;
  max-width: var(--measure);
  border: 1px dashed #b4b4bc;
  border-radius: 2px;
  color: var(--muted);
  font-size: var(--step--1);
}

/* ---- Contact ------------------------------------------------------------ */

.contact-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--space-s);
  margin: 0;
}

.contact-line a {
  display: inline-block;
  padding-block: 0.6875rem;   /* 44px target */
  margin-block: -0.6875rem;
}

.external::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-left: 0.35em;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-0.1em) rotate(45deg);
}

/* ---- Footer ------------------------------------------------------------- */

.colophon {
  margin-top: var(--space-xl);
  padding-top: var(--space-s);
  border-top: 1px solid var(--rule);
  font-size: var(--step--1);
  color: var(--muted);
}

.colophon a {
  display: inline-block;
  padding-block: 0.8125rem;   /* 44px target */
  margin-block: -0.8125rem;
}

/* ---- Skip link ---------------------------------------------------------- */

/* Clip-based hiding rather than an off-screen offset, and revealed only on
   :focus-visible — plain :focus can fire on click in some browsers, which is
   how a skip link ends up appearing when nobody asked for it. */
.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1rem;
  text-decoration: none;
  z-index: 10;
}

.skip:focus-visible {
  top: var(--gutter);
  left: var(--gutter);
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}

/* ---- Preferences -------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .now-badge { animation: none; transform: rotate(-8deg); }
  .not-work-slider { scroll-behavior: auto; }
}

@media print {
  :root { --rule: #bbb; --muted: #333; --accent: #000; }
  body { padding: 0; font-size: 11pt; }
  .band { background: none; color: #000; padding: 0; margin-bottom: 1.5rem; }
  .band::after { display: none; }
  .other-stuff { margin: 0; padding: 0; background: none; color: #000; }
  .other-stuff::before { display: none; }
  .other-stuff h2,
  .other-stuff a,
  .other-stuff .not-work-heading { color: #000; }
  .band a, .band .masthead nav a, .lead p, .intro { color: #000; }
  .masthead nav, .skip, .fpo, .now-badge, .slider-controls { display: none; }
  .not-work { border: 0; }
  .not-work-slider { display: block; width: auto; margin: 0; padding: 0; overflow: visible; }
  .not-work-slide { display: block; margin-bottom: 1.5rem; }
  .external::after { display: none; }
  a { text-decoration: none; }
  section { margin-bottom: 1.5rem; break-inside: avoid; }
  .experience { break-inside: auto; }
  .experience .role { break-inside: avoid; }
}
