/* Brand: drafting paper, ink, and one redline accent. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/fonts/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("/fonts/barlow-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("/fonts/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("/fonts/barlow-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/fonts/barlow-condensed-600.woff2") format("woff2"); }

:root {
  --paper: #f5f3ee;
  --ink: #1b1a18;
  --muted: #605e59;
  --rule: #d9d6ce;
  --redline: #b8331b;
  --surface: #ffffff;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-pen: cubic-bezier(0.65, 0, 0.35, 1);
  --heavy: 2px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121211;
    --ink: #ecebe6;
    --muted: #a3a19b;
    --rule: #33322f;
    --redline: #ff6a4d;
    --surface: #1c1c1b;
  }
}

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

body {
  margin: 0 auto;
  max-width: 54rem;
  padding: 1.5rem 1rem 2rem;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 Barlow, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 250ms ease, color 250ms ease; /* soften a system theme switch */
}

::selection { background: color-mix(in srgb, var(--redline) 22%, transparent); }

a {
  color: inherit;
  text-decoration: underline 1px var(--redline);
  text-underline-offset: 0.22em;
}
@media (hover: hover) and (pointer: fine) {
  a { transition: color 150ms ease, text-decoration-thickness 150ms ease; }
  a:hover { color: var(--redline); text-decoration-thickness: 2px; }
}
:focus-visible { outline: 2px solid var(--redline); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-weight: 600; margin: 0; text-wrap: balance; }
h1 {
  font-family: "Barlow Condensed", Barlow, sans-serif;
  font-size: clamp(3rem, 10vw, 5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
h3 { font-size: 1.125rem; line-height: 1.25; }
p, dd, figcaption { text-wrap: pretty; }

.label {
  font-family: "Barlow Condensed", Barlow, sans-serif;
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.lede { font-size: 1.1875rem; max-width: 40rem; }

/* Masthead */
.masthead {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: clamp(3.5rem, 12vw, 7rem);
}
.home { display: block; color: var(--ink); line-height: 0; border-radius: 50%; }
.links { display: flex; gap: 1.5rem; font-weight: 500; }
.links a { padding-block: 0.5rem; margin-block: -0.5rem; } /* ~44px tap target, same layout */

/* The mark: a detail-callout bubble, lettered in single strokes */
.mark { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.mark .ring, .mark .bar { stroke-width: 3; }
.mark .glyph { stroke-width: 3.4; }
.home .mark { width: 2.75rem; height: 2.75rem; transition: transform 160ms var(--ease-out); }
.home:active .mark { transform: scale(0.97); }

/* Drawn once on load, the way the bubble is drafted: ring, then bar, then letters */
@media (prefers-reduced-motion: no-preference) {
  .mark-draw .ring, .mark-draw .bar, .mark-draw .glyph {
    /* gap > dash and offset past 1, so no round cap shows before a stroke starts */
    stroke-dasharray: 1 2;
    stroke-dashoffset: 1.05;
    animation: draw var(--d) var(--ease-pen) var(--delay) forwards;
  }
  .mark-draw .ring { --d: 650ms; --delay: 80ms; }
  .mark-draw .bar { --d: 300ms; --delay: 480ms; }
  .mark-draw .glyph { --d: 360ms; --delay: 600ms; }
  .mark-draw .glyph + .glyph { --delay: 660ms; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.intro { margin-bottom: clamp(3.5rem, 10vw, 6rem); }
.intro .lede { margin: 1.25rem 0 0.75rem; }
.place { margin: 0; color: var(--muted); }

.section-title {
  display: flex; gap: 0.75rem; align-items: baseline;
  font-family: "Barlow Condensed", Barlow, sans-serif;
  font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding-bottom: 0.5rem; border-bottom: var(--heavy) solid var(--ink);
  margin-bottom: 2rem;
}
.section-title span { color: var(--redline); font-variant-numeric: tabular-nums; }
section { margin-bottom: clamp(3.5rem, 10vw, 6rem); }

.project-head { display: flex; gap: 1rem; align-items: center; }
.project-head h3 { font-size: 1.75rem; letter-spacing: -0.01em; }
.project-head img { flex: none; border-radius: 11px; }

figure { margin: 2rem 0; }
figure img {
  display: block; width: 100%; height: auto;
  border-radius: 8px; background: var(--surface);
  outline: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); outline-offset: -1px;
}
figcaption { margin-top: 0.625rem; font-size: 0.9375rem; color: var(--muted); max-width: 40rem; }

.pair { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.pair figure { margin: 0; }

.features { margin: 2.5rem 0; border-bottom: 1px solid var(--rule); }
.features div { display: grid; grid-template-columns: 12rem 1fr; gap: 0.25rem 2rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.features dt { font-weight: 600; }
.features dd { margin: 0; color: var(--muted); max-width: 38rem; }
@media (max-width: 40rem) { .features div { grid-template-columns: 1fr; } }

.stack { border-top: 1px solid var(--rule); padding-top: 1rem; color: var(--muted); }
.stack .label, .credentials .label { display: block; margin-bottom: 0.125rem; }

.roles { list-style: none; padding: 0; margin: 0 0 2rem; }
.roles > li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.roles > li:first-child { padding-top: 0; }
.highlights { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.5rem; max-width: 42rem; color: var(--muted); }
.highlights strong { color: var(--ink); font-weight: 600; }
.role-head + .role-head { margin-top: 0.25rem; }
.role-head + .role-head h3 { font-weight: 500; color: var(--muted); }
.roles .role-stack { margin-top: 0.75rem; font-size: 0.9375rem; }
.role-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; align-items: baseline; }
.roles p { margin: 0.375rem 0 0; color: var(--muted); max-width: 42rem; }
.credentials { margin: 0 0 1rem; }

/* Footer drawn as a sheet's title block */
.title-block {
  display: grid; grid-template-columns: 1fr 1fr auto;
  border: var(--heavy) solid var(--ink);
}
.title-block > div { padding: 0.5rem 0.75rem; border-right: 1px solid var(--ink); }
.title-block > div:nth-child(3) { border-right: 0; }
.title-block .label { display: block; font-size: 0.6875rem; }
.title-block strong { font-family: "Barlow Condensed", Barlow, sans-serif; font-size: 1.75rem; line-height: 1; }
.firm { display: flex; gap: 0.75rem; align-items: center; }
.firm .mark { width: 2.25rem; height: 2.25rem; flex: none; }
.credit { grid-column: 1 / -1; margin: 0; padding: 0.5rem 0.75rem; border-top: 1px solid var(--ink); font-size: 0.8125rem; color: var(--muted); }

@media (max-width: 30rem) {
  .title-block { grid-template-columns: 1fr auto; }
  .title-block > .firm { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--ink); }
}
