/* Ink on paper. One serif, one mono, one faded fountain-pen blue. */
:root {
  --paper: #f5f2ea;
  --ink: #16181d;
  --ink-soft: #5d5e62;
  --ink-faint: #a6a196;
  --rule: #dcd6c8;
  --accent: #34507f;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --col: 680px;
  /* the only color on the page: the Trek, the Archer, the labs */
  --bike-blue: #0b65e0;
  --bike-grey: #3b3a3e;
  --bike-tire: #2b2f36;
  --bike-tire-inner: #292929;
  --bike-black: #1c1c1c;
  --bike-saddle: #484549;
  --bike-logo: #ffffff;
  --plane-body: #fffdf8;
  --plane-navy: #2d4365;
  --plane-maroon: #853838;
  --plane-hub: #c4c4c4;
  --plane-tire: #16181d;
  --plane-prop: var(--ink);
  --mtn-rock: #b5b5b5;
  --mtn-snow: #ffffff;
  --mtn-grass: #648c56;
  --lab-coat: #e9c989;
  --lab-coat-far: #d6b06b;
  --lab-ear: #ddb877;
  --lab-nose: #121214;
  --lab-nose-ring: transparent;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121315;
    --ink: #ebe5d7;
    --ink-soft: #a29d92;
    --ink-faint: #5f5c56;
    --rule: #2a2a2b;
    --accent: #93a9d2;
    --bike-blue: #2a78e6;
    --bike-grey: #4a494e;
    --bike-tire: #30343c;
    --bike-tire-inner: #2c2c2e;
    --bike-black: #232325;
    --bike-saddle: #57545a;
    --bike-logo: #f2efe8;
    --plane-body: #1d1e21;
    --plane-navy: #4a6797;
    --plane-maroon: #a24c4c;
    --plane-hub: #a8a8a8;
    --plane-tire: #070708;
    --mtn-rock: #7d7c7a;
    --mtn-snow: #e9e5dc;
    --mtn-grass: #557a49;
    --lab-coat: #d2b277;
    --lab-coat-far: #b39459;
    --lab-ear: #c3a267;
    --lab-nose: #0a0a0b;
    --lab-nose-ring: #ebe5d7;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121315;
  --ink: #ebe5d7;
  --ink-soft: #a29d92;
  --ink-faint: #5f5c56;
  --rule: #2a2a2b;
  --accent: #93a9d2;
  --bike-blue: #2a78e6;
  --bike-grey: #4a494e;
  --bike-tire: #30343c;
  --bike-tire-inner: #2c2c2e;
  --bike-black: #232325;
  --bike-saddle: #57545a;
  --bike-logo: #f2efe8;
  --plane-body: #1d1e21;
  --plane-navy: #4a6797;
  --plane-maroon: #a24c4c;
  --plane-hub: #a8a8a8;
  --plane-tire: #070708;
  --mtn-rock: #7d7c7a;
  --mtn-snow: #e9e5dc;
  --mtn-grass: #557a49;
  --lab-coat: #d2b277;
  --lab-coat-far: #b39459;
  --lab-ear: #c3a267;
  --lab-nose: #0a0a0b;
  --lab-nose-ring: #ebe5d7;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  position: relative;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-color: var(--ink-faint); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover, a:focus-visible { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 1px dashed var(--accent); outline-offset: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; line-height: 1.5; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.col { max-width: var(--col); margin: 0 auto; padding: 0 24px; }

/* tiny fixed links, top right */
.corner {
  position: fixed; top: 18px; right: 22px; z-index: 5;
  display: flex; gap: 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
}
.corner a { text-decoration: none; color: var(--ink-soft); }
.corner a:hover, .corner a:focus-visible { color: var(--accent); }

@media (max-width: 1179px) { .corner { position: absolute; } }

/* the scroll line */
.trail { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.trail path.taper { fill: var(--ink); stroke: none; opacity: 1; }
.trail path { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }

main, .hero, .foot { position: relative; z-index: 1; }

/* hero */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 20px;
  overflow: hidden;
}
/* --sig-ar (width / height) is set from the data, so a tall signature caps on height instead */
.signature { display: block; width: min(860px, 88vw, calc(58vh * var(--sig-ar, 4.8))); height: auto; color: var(--ink); overflow: visible; }
.caption { text-align: center; margin-top: 34px; opacity: 0; transform: translateY(6px); transition: opacity 0.9s ease, transform 0.9s ease; }
.caption .mono { color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.18em; margin: 0 0 6px; }
.caption .lede { font-size: 18px; font-style: italic; font-weight: 300; color: var(--ink-soft); margin: 0; }
.signed .caption { opacity: 1; transform: none; }
.cue { position: absolute; margin: 0; color: var(--ink-faint); opacity: 0; transition: opacity 1s ease 0.6s; left: 0; top: 0; }
.signed .cue { opacity: 1; }
.scrolled .cue { opacity: 0; transition-delay: 0s; }

/* section labels */
.label {
  font-weight: 400; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.18em;
  margin: 0 0 28px;
}
.intro { padding-top: 14vh; padding-bottom: 6vh; }
.intro p { font-size: 21px; font-weight: 300; }

/* off the clock */
.fun { padding-top: 10vh; padding-bottom: 4vh; }
.fun-list { list-style: none; margin: 0; padding: 0; }
.fun-item { position: relative; display: flex; gap: 22px; align-items: center; margin: 0 0 44px; }
.fun-item h3 { font-weight: 400; font-size: 26px; margin: 0 0 2px; line-height: 1.2; }
.fun-item p { margin: 0; color: var(--ink-soft); }
.doodle { flex: none; width: 112px; height: 70px; overflow: visible; }
.doodle path { fill: none; stroke: var(--ink); stroke-width: var(--sw, 1.5); stroke-linecap: round; stroke-linejoin: round;
  /* 1 2 / 1.001: no zero-length dash ever lands on an endpoint, so round caps never leave a stray dot */
  stroke-dasharray: 1 2; stroke-dashoffset: 1.001; visibility: hidden;
  transition: stroke-dashoffset var(--dur, 0.5s) cubic-bezier(.45, .05, .4, 1) var(--delay, 0s), visibility 0s linear var(--delay, 0s); }
.doodle.on path { stroke-dashoffset: 0; visibility: visible; }
.doodle [data-in], .doodle [data-out] { display: none; }
/* colored doodles: ink outline first, then the color washes in under it */
.doodle.color { height: auto; }
.doodle[data-doodle="bike"] { width: 118px; --sw: 2.1; }
.doodle[data-doodle="plane"] { width: 128px; --sw: 2.1; }
.doodle[data-doodle="hike"] { width: 118px; --sw: 2.1; }
.doodle .wash { opacity: 0; clip-path: inset(0 100% 0 0); transition: opacity 0.42s ease-out var(--wash-delay, 0s), clip-path 0.42s cubic-bezier(.3, .1, .3, 1) var(--wash-delay, 0s); }
.doodle.on .wash { opacity: 1; clip-path: inset(0 0 0 0); }
.doodle .wash path, .doodle .wash circle { stroke: none; stroke-dasharray: none; visibility: visible; transition: none; }

/* wide screens: doodles hang in the left margin, on the line */
@media (min-width: 1180px) {
  .fun-item { display: block; min-height: 120px; }
  .fun-item > div { padding-top: 26px; }
  .doodle { position: absolute; right: calc(100% + 44px); top: 0; width: 176px; height: 110px; }
  .doodle.color { height: auto; }
  .doodle[data-doodle="plane"] { width: clamp(200px, 50vw - 370px, 270px); top: -4px; --sw: 1.2; }
  .doodle[data-doodle="bike"] { width: clamp(190px, 50vw - 380px, 240px); top: -6px; --sw: 1.15; }
  .doodle[data-doodle="hike"] { width: clamp(190px, 50vw - 380px, 240px); top: 4px; --sw: 1.15; }
  .fun-item.fun-bike { min-height: 168px; }
  .doodle [data-in], .doodle [data-out] { display: inline; }
}

/* the labs */
.labs { position: relative; height: 350px; margin: 6vh 0 4vh; cursor: pointer; -webkit-tap-highlight-color: transparent; outline-offset: -6px; }
.labs svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.labs .ground { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0.85; }
.labs .drawn .ground { stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s ease-out; }
.labs .drawn.still .ground { transition: none; }
.dog path { fill: none; stroke: none; }
.dog .f { fill: var(--lab-coat); }
.dog .farf { fill: var(--lab-coat-far); }
.dog .ear { fill: var(--lab-ear); }
.dog .l { stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.dog .far { stroke-opacity: 0.55; }
.dog .thin { stroke-width: 1.1; }
.dog .dot { fill: var(--ink); }
.dog .nose { fill: var(--lab-nose); stroke: var(--lab-nose-ring); stroke-width: 0.9; stroke-linejoin: round; }
.labs .name { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.labs .name path { visibility: hidden; }
.replay { position: absolute; right: 24px; bottom: 0; margin: 0; color: var(--ink-faint); opacity: 0; transition: opacity 0.6s; }
.labs.done .replay, .labs:hover .replay { opacity: 1; }

/* resume */
.resume { padding-top: 8vh; }
.jobs { list-style: none; margin: 0 0 72px; padding: 0; }
.job { padding: 28px 0 30px; border-top: 1px solid var(--rule); }
.job:last-child { border-bottom: 1px solid var(--rule); }
.job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.job h3 { font-size: 26px; font-weight: 400; margin: 0; line-height: 1.25; }
.job .aka { font-size: 17px; font-style: italic; font-weight: 300; color: var(--ink-soft); }
.meta { color: var(--ink-soft); margin: 0; font-size: 11.5px; }
.role { margin: 0 0 12px; }
.role-title { font-style: italic; margin: 0 0 6px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.role-title .meta { font-style: normal; }
.role ul { margin: 0; padding: 0 0 0 1.1em; list-style: none; }
.role li { position: relative; margin: 0 0 4px; font-size: 18px; }
.role li::before { content: ""; position: absolute; left: -1.05em; top: 0.8em; width: 0.5em; height: 1px; background: var(--ink-faint); }
.tech { color: var(--ink-faint); margin: 14px 0 0; }

.writing { list-style: none; margin: 0 0 72px; padding: 0; }
.writing li { margin: 0 0 26px; }
.writing a { font-size: 21px; line-height: 1.35; }
.writing p { margin: 6px 0 0; color: var(--ink-soft); font-size: 17px; }
.writing .meta { margin-right: 10px; color: var(--accent); }

.links { list-style: none; margin: 0 0 40px; padding: 0; font-size: 13px; }
.links li { margin: 0 0 8px; }

.foot { display: flex; justify-content: space-between; padding-top: 40px; padding-bottom: 48px; color: var(--ink-faint); }
.foot p { margin: 0; }
.foot a { color: var(--ink-faint); text-decoration: none; }

/* phones and narrow tablets: room on the left for the thin line */
@media (max-width: 760px) {
  body { font-size: 17.5px; }
  .col { padding-left: 46px; padding-right: 22px; }
  .corner { top: 14px; right: 16px; gap: 14px; }
  .signature { width: min(90vw, calc(52vh * var(--sig-ar, 4.8))); }
  .caption .lede { font-size: 16.5px; }
  .intro p { font-size: 19px; }
  .doodle { width: 84px; height: 53px; }
  .doodle { --sw: 2.6; }
  .fun-item { gap: 16px; margin-bottom: 34px; }
  .fun-item h3 { font-size: 22px; }
  .labs { height: 222px; }
  .job h3 { font-size: 23px; }
  .role li { font-size: 16.5px; }
  .writing a { font-size: 19px; }
  .replay { right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caption, .cue, .doodle path, .doodle .wash, .labs .ground { transition: none !important; }
}
