/* Self-hosted fonts (latin + latin-ext). Libre Franklin is one variable file for every weight. */
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/libre-franklin-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("../fonts/libre-franklin-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/zilla-slab-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/zilla-slab-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/zilla-slab-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/zilla-slab-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/zilla-slab-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Zilla Slab"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/zilla-slab-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Kalam"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/kalam-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Kalam"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/kalam-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Herr Von Muellerhoff"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/herr-von-muellerhoff-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Prescription · v2
   One letterhead pad on a doctor's green desk-mat. Printed blue, one red rule,
   ballpoint notes, a yellow highlighter for the one result worth reading. */

:root {
  --desk: #1d4538;
  --desk-lit: #2a5e4c;
  --desk-deep: #12302a;
  --paper: #fbf9f3;
  --paper-warm: #f4efe2;
  --slip: #fffdf8;
  --print: #1b2d6e;       /* letterhead blue: headings, stamps, controls */
  --print-2: #3a4b86;     /* secondary printed labels */
  --ink: #1b1f29;         /* body text: near-black ink */
  --ink-2: #4a5062;       /* secondary text */
  --pen: #2441b3;         /* ballpoint */
  --red: #bd2532;         /* the red rule, stamps, red pen */
  --hl: 255, 213, 61;     /* highlighter yellow, as rgb */
  --hair: rgba(27, 45, 110, 0.15);

  --f-head: "Zilla Slab", "Rockwell", Georgia, serif;
  --f-body: "Libre Franklin", "Franklin Gothic Book", "Arial Narrow", sans-serif;
  --f-hand: "Kalam", "Segoe Print", cursive;
  --f-sign: "Herr Von Muellerhoff", "Kalam", cursive;

  --gut: clamp(8px, 2.8vw, 48px);
  --pad-x: clamp(18px, 4.8vw, 76px);
  --col-gap: clamp(14px, 2vw, 28px);
  --sec-gap: clamp(84px, 10vw, 152px);
  --line: 36px;
  --photo-w: clamp(104px, 14vw, 196px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-write: cubic-bezier(0.42, 0.08, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }

@view-transition { navigation: auto; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  scrollbar-color: #5f8c7b var(--desk-deep);
  background: var(--desk-deep);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  /* felt desk-mat under a lamp: light pools at the top, falls off to the edges */
  background:
    radial-gradient(120% 70% at 50% -10%, var(--desk-lit) 0%, var(--desk) 46%, var(--desk-deep) 100%) fixed;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.125rem;
  line-height: 1.62;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
  caret-color: var(--pen);
}

::selection { background: rgba(var(--hl), 0.55); color: var(--ink); }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--desk-deep); }
::-webkit-scrollbar-thumb { background: #4d7a69; border: 3px solid var(--desk-deep); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #6d9c8a; }

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--print); text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: rgba(27, 45, 110, 0.35); transition: text-decoration-color 0.2s, color 0.2s; }
a:hover { text-decoration-color: currentColor; color: var(--pen); }

:focus-visible { outline: 2.5px solid var(--pen); outline-offset: 3px; border-radius: 3px; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--print); color: var(--paper); padding: 10px 16px; border-radius: 4px; font-weight: 600; }
.skip:focus { top: 12px; }
.skip:hover { color: #fff; }
.nw { white-space: nowrap; }

.sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.55; vertical-align: middle; margin: 0 0.6em; }

.lbl {
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--print-2);
  margin-right: 0.5em;
}

/* ================= HIGHLIGHTER ================= */
mark.hl {
  color: inherit;
  padding: 0 0.28em;
  margin: 0 -0.12em;
  border-radius: 0.25em 0.55em 0.3em 0.6em / 0.5em 0.3em 0.6em 0.35em;
  background-image: linear-gradient(100deg,
    rgba(var(--hl), 0.25) 0, rgba(var(--hl), 0.78) 0.35em,
    rgba(var(--hl), 0.62) 55%, rgba(var(--hl), 0.8) calc(100% - 0.4em), rgba(var(--hl), 0.3) 100%);
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: 100% 76%;
  background-position: 0 72%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ================= STAMPS ================= */
.stamp {
  display: inline-grid;
  justify-items: center;
  border: 2.5px solid var(--red);
  border-radius: 6px;
  color: var(--red);
  font-family: var(--f-body);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.05;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3.5px rgba(189, 37, 50, 0.6);
  mix-blend-mode: multiply;
  /* worn rubber: the ink is lighter in patches */
  -webkit-mask-image: radial-gradient(circle at 22% 30%, #000 0 38%, rgba(0,0,0,0.78) 60%), radial-gradient(circle at 80% 75%, #000 0 30%, rgba(0,0,0,0.82) 70%);
  -webkit-mask-composite: source-over;
  mask-image: radial-gradient(circle at 22% 30%, #000 0 38%, rgba(0,0,0,0.78) 60%), radial-gradient(circle at 80% 75%, #000 0 30%, rgba(0,0,0,0.82) 70%);
  pointer-events: none;
}
.stamp-nda { padding: 6px 12px 5px; font-size: 0.82rem; letter-spacing: 0.14em; transform: rotate(-5deg); margin-top: 4px; }

/* ================= THE PAD ================= */
.pad {
  width: min(100% - 2 * var(--gut), 1360px);
  margin: var(--gut) auto calc(var(--gut) + 32px);
  /* paper: faintly warmer toward the edges, like a sheet that has sat on a desk */
  background:
    radial-gradient(140% 90% at 50% 35%, var(--paper) 62%, var(--paper-warm) 100%);
  border-radius: 3px;
  /* the glued pad: two sheets peeking out underneath, then the soft fall-off onto the mat */
  box-shadow:
    0 1px 1px rgba(4, 20, 14, 0.25),
    0 6px 0 -3px #ece6d8,
    0 7px 1px -3px rgba(4, 20, 14, 0.25),
    0 12px 0 -6px #e2dbca,
    0 13px 2px -6px rgba(4, 20, 14, 0.3),
    0 40px 80px -24px rgba(4, 20, 14, 0.75);
  position: relative;
  view-transition-name: sheet;
}
/* ================= LETTERHEAD ================= */
.head { display: flex; flex-direction: column; }

.lh {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name  photo"
    "role  photo"
    "qual  photo"
    "uni   photo"
    "rule  rule"
    "strip strip";
  column-gap: var(--col-gap);
  padding: clamp(24px, 4vw, 58px) var(--pad-x) 0;
  color: var(--print);
}

.lh-name {
  grid-area: name;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(2.7rem, 7.6vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  color: var(--print);
  text-wrap: balance;
}
.lh-role {
  grid-area: role;
  margin-top: clamp(10px, 1.4vw, 18px);
  font-weight: 700;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
}
.lh-qual {
  grid-area: qual;
  margin-top: 8px;
  font-family: var(--f-head);
  font-weight: 500;
  font-size: clamp(1.02rem, 1.4vw, 1.22rem);
  color: var(--print-2);
}
.lh-uni { grid-area: uni; font-size: 0.98rem; color: var(--print-2); }

/* polaroid, taped to the sheet */
.lh-photo {
  grid-area: photo;
  align-self: start;
  justify-self: end;
  position: relative;
  margin-top: 6px;
  margin-right: 4px;
  width: var(--photo-w);
  background: #fff;
  padding: 8px 8px clamp(30px, 3.2vw, 44px);
  transform: rotate(2.4deg);
  box-shadow: 0 1px 2px rgba(14, 12, 8, 0.18), 0 12px 24px -10px rgba(14, 12, 8, 0.4);
}
.lh-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: #e9e4d8; }
.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 52%;
  height: 24px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(238, 228, 196, 0.78);
  box-shadow: 0 1px 2px rgba(60, 44, 18, 0.18);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  z-index: 2;
}
.note-photo {
  position: absolute;
  left: 12px;
  bottom: clamp(3px, 0.6vw, 8px);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  transform: rotate(-3deg);
  transform-origin: left center;
}
.stamp-avail {
  position: absolute;
  left: calc(-1 * clamp(64px, 8vw, 118px));
  bottom: clamp(30px, 4vw, 54px);
  padding: 7px 12px 6px;
  background: transparent;
  transform: rotate(-11deg);
  z-index: 3;
}
.stamp-avail .s-small { font-size: clamp(0.56rem, 0.7vw, 0.68rem); letter-spacing: 0.16em; }
.stamp-avail .s-big { font-family: var(--f-head); font-size: clamp(1rem, 1.6vw, 1.45rem); letter-spacing: 0.04em; font-weight: 700; margin-top: 2px; }

.lh-rule {
  grid-area: rule;
  border: 0;
  height: 3px;
  background: var(--red);
  margin: clamp(20px, 2.6vw, 32px) 0 0;
}

.lh-strip {
  grid-area: strip;
  display: flex;
  flex-wrap: wrap;
  column-gap: clamp(18px, 3vw, 44px);
  row-gap: 4px;
  padding: 12px 0 14px;
  font-size: 0.98rem;
  color: var(--ink);
}
.lh-strip li { white-space: nowrap; }
.lh-strip a { color: var(--ink); }

/* ================= Rx ================= */
.rx {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding: clamp(28px, 3.6vw, 52px) var(--pad-x) clamp(36px, 4.4vw, 64px);
  border-top: 1px solid var(--hair);
}
.rx-mark {
  grid-column: 1 / 3;
  position: relative;
  color: var(--print);
  width: clamp(60px, 9.8vw, 148px);
  align-self: start;
}
.rx-mark svg { width: 100%; height: auto; transform: rotate(-3deg); transform-origin: 40% 60%; }
.rx-ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 128%; aspect-ratio: 1;
  border: 2px solid var(--print);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
}
.rx-body { grid-column: 3 / 11; }
.rx-line {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: clamp(1.55rem, 3.4vw, 3rem);
  line-height: 1.3;
  color: var(--ink);
  max-width: 25ch;
  text-wrap: balance;
}
.rx-line .hl { font-weight: 700; color: var(--print); }
.rx-where { margin-top: 10px; font-size: 1.08rem; color: var(--ink-2); }
.rx-actions { grid-column: 3 / 11; display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: clamp(20px, 2.6vw, 30px); }

.note-rx {
  position: absolute;
  right: var(--pad-x);
  top: clamp(36px, 4.2vw, 62px);
  font-size: clamp(1.3rem, 1.9vw, 1.7rem);
  transform: rotate(-4deg);
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 22px;
  border-radius: 5px;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--print);
  transition: background-color 0.2s, color 0.2s, transform 0.15s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.btn svg { flex: none; }
.btn-primary {
  background: var(--print);
  color: var(--paper);
  box-shadow: 0 2px 4px rgba(16, 18, 28, 0.16), 0 8px 18px -8px rgba(16, 18, 28, 0.42);
}
.btn-primary:hover { background: #142359; color: #fff; box-shadow: 0 3px 6px rgba(16, 18, 28, 0.18), 0 12px 24px -10px rgba(16, 18, 28, 0.5); }
.btn-ghost { background: transparent; color: var(--print); }
.btn-ghost:hover { background: rgba(27, 45, 110, 0.07); color: var(--print); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ================= CONTENTS (sticky) ================= */
.contents {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--col-gap);
  padding: 0 var(--pad-x);
  background: var(--paper);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  transition: box-shadow 0.3s;
}
.contents.is-stuck { box-shadow: 0 10px 18px -16px rgba(16, 18, 28, 0.5); }
.contents ol {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.contents ol a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  padding: 16px 6px 15px 0;
  font-weight: 600;
  font-size: 1rem;
  color: var(--print);
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.contents .n { font-family: var(--f-head); font-weight: 700; color: var(--red); }
.ring {
  position: absolute;
  left: -14px; right: -10px; top: 4px; bottom: 2px;
  width: calc(100% + 24px);
  height: calc(100% - 6px);
  max-width: none;
  overflow: visible;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.ring path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 0.6s var(--ease-write), opacity 0s 0.6s; }
.contents a[aria-current="true"] .ring path { stroke-dashoffset: 0; opacity: 1; transition: stroke-dashoffset 0.6s var(--ease-write), opacity 0s; }
.contents ol a:hover { color: var(--pen); }
.c-resume {
  display: inline-flex; align-items: center; gap: 6px;
  flex: none;
  padding: 7px 12px;
  border: 1.5px solid var(--print);
  border-radius: 5px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}
.c-resume svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c-resume:hover { background: var(--print); color: var(--paper); }

/* ================= SECTIONS ================= */
.sec {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  padding: var(--sec-gap) var(--pad-x) 0;
}
.sec-head { grid-column: 1 / 5; position: relative; }
.sec-body { grid-column: 5 / 13; min-width: 0; }

/* a section that needs the whole sheet: heading on its own line above */
.sec-wide .sec-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 26px; margin-bottom: clamp(34px, 4vw, 52px); }
.sec-wide .sec-body { grid-column: 1 / -1; }
.sec-wide h2, .sec-wide .note-head { position: static; }
.sec-wide .note-head { margin-top: 0; }
.sec-wide .items { margin-left: clamp(0px, 6vw, 96px); }

.sec h2 {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: clamp(2.6rem, 4.6vw, 3.9rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--print);
  position: sticky;
  top: 86px;
}
.sec h2 .amp { display: block; font-size: clamp(1.15rem, 1.7vw, 1.45rem); font-weight: 600; letter-spacing: 0; margin-top: 10px; color: var(--print-2); }

.sec h3 { font-family: var(--f-head); font-weight: 700; color: var(--print); line-height: 1.3; }

.lead {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  line-height: 1.4;
  max-width: 34ch;
  color: var(--ink);
  text-wrap: pretty;
}
.sub { margin-top: 24px; max-width: 62ch; color: var(--ink-2); }

.meta { font-size: 1rem; color: var(--ink-2); margin-top: 2px; }

.result { margin-top: 12px; }
.result .lbl { color: var(--red); }

/* ================= EXPERIENCE ================= */
.history { position: relative; }
.h-item {
  display: grid;
  grid-template-columns: clamp(44px, 5vw, 72px) minmax(0, 1fr);
  position: relative;
  padding-bottom: clamp(40px, 4.4vw, 60px);
}
.h-item:last-child { padding-bottom: 0; }
.h-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 0.72em;
  top: 3.2rem;
  bottom: 14px;
  width: 1px;
  background: var(--hair);
  font-size: 1.9rem;
}
.h-num {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--red);
  padding-top: 2px;
}
.h-main { max-width: 68ch; }
.h-main h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); }
.h-main .at { display: block; font-family: var(--f-body); font-weight: 600; font-size: 1.06rem; color: var(--ink); margin-top: 3px; }
.h-main .meta + p { margin-top: 12px; }

/* ================= PROJECTS ================= */
.i-tag { margin-top: 4px; color: var(--ink); font-size: 1.06rem; line-height: 1.45; }
.i-team {
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--print-2);
  line-height: 1.5;
}
.i-stack { margin-top: 12px; font-size: 0.95rem; color: var(--ink-2); }
.i-links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 3px; }
.i-links a {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: 1rem;
  min-height: 34px;
}
.i-links svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease-out); }
.i-links a:hover svg { transform: translateX(3px); }

/* Featured slips: two sheets torn from a smaller pad */
.slips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 3.2vw, 48px);
  margin-bottom: clamp(56px, 6vw, 84px);
}
.slip {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--slip);
  padding: clamp(26px, 2.6vw, 36px) clamp(20px, 2.2vw, 30px) clamp(22px, 2.4vw, 30px);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(14, 12, 8, 0.14), 0 18px 34px -18px rgba(14, 12, 8, 0.42);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
/* perforated top edge where it was torn off */
.slip::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 7px;
  background: radial-gradient(circle at 5px -1px, var(--paper) 3.2px, transparent 3.6px) 0 0 / 11px 7px repeat-x;
}
.slip.s1 { transform: rotate(-0.7deg); }
.slip.s2 { transform: rotate(0.6deg); margin-top: 22px; }
.slip:hover, .slip:focus-within { transform: rotate(0deg) translateY(-4px); box-shadow: 0 2px 4px rgba(14, 12, 8, 0.14), 0 26px 44px -20px rgba(14, 12, 8, 0.5); }
.slip-num {
  position: absolute;
  top: 12px;
  right: 18px;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--red);
}
.slip-media { position: relative; margin: 6px 0 22px; }
.slip-media a { display: block; overflow: hidden; border-radius: 2px; }
.slip-media img, .slip-media video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  background: #e8e4da;
  transition: transform 0.8s var(--ease-out);
}
.slip:hover .slip-media img, .slip:hover .slip-media video { transform: scale(1.025); }
.slip-media .tape { top: -13px; width: 30%; }
.slip-media figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--ink-2); line-height: 1.45; }
.slip-text h3 { font-size: clamp(1.6rem, 2.3vw, 2.05rem); }
.slip-text .i-desc { margin-top: 14px; }
.slip-text .i-links { flex-direction: row; gap: 22px; margin-top: 14px; }

/* The rest: numbered lines on the sheet */
.items { border-top: 2px solid var(--print); }
.item {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 15rem) minmax(0, 1fr) 9.5rem;
  column-gap: var(--col-gap);
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--hair);
  position: relative;
}
.item::before {
  content: "";
  position: absolute;
  inset: 0 calc(-1 * clamp(8px, 1.2vw, 16px));
  background: rgba(36, 65, 179, 0.045);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.item:hover::before, .item:focus-within::before { opacity: 1; }
.i-num {
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--red);
}
.i-name h3 { font-size: 1.5rem; }
.i-what { max-width: 62ch; }
.i-what .result { margin-top: 8px; }

/* ================= SKILLS ================= */
.skills { display: grid; border-top: 1px solid var(--hair); }
.sk-row {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  column-gap: var(--col-gap);
  padding: 22px 0;
  border-bottom: 1px solid var(--hair);
}
.sk-row dt { font-family: var(--f-head); font-weight: 700; font-size: 1.3rem; color: var(--print); line-height: 1.3; }
.sk-row ul { display: flex; flex-wrap: wrap; gap: 6px 0; }
.sk-row li { font-size: 1.08rem; }
.sk-row li:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--print-2);
  opacity: 0.5;
  vertical-align: middle;
  margin: 0 0.75em;
}

/* ================= EDUCATION ================= */
.degree h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); }
.grade { margin-top: 12px; font-weight: 600; }
.circled { position: relative; display: inline-block; padding: 0 4px; color: var(--print); font-family: var(--f-head); font-weight: 700; font-size: 1.15em; }
.circled svg { position: absolute; left: -16px; top: -12px; width: calc(100% + 32px); height: calc(100% + 24px); max-width: none; overflow: visible; pointer-events: none; }
.ink-path { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.recog { margin-top: clamp(30px, 3.6vw, 44px); border-top: 1px solid var(--hair); max-width: 74ch; }
.recog li { padding: 13px 0; border-bottom: 1px solid var(--hair); }
.recog .when { color: var(--ink-2); }

/* ================= CONTACT ================= */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.c-title { font-family: var(--f-head); font-weight: 600; font-size: clamp(1.5rem, 2.2vw, 1.9rem); color: var(--print); line-height: 1.2; margin-bottom: 10px; }
.c-direct { margin-top: 20px; display: grid; gap: 6px; }
.c-direct a { overflow-wrap: anywhere; }

/* the appointment slip: a carbon-copy form */
.form {
  position: relative;
  display: grid;
  gap: 4px;
  padding: clamp(18px, 2.4vw, 28px) clamp(18px, 2.4vw, 30px) clamp(20px, 2.4vw, 30px);
  background: #f3f5fb;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(16, 18, 28, 0.12), 0 14px 28px -18px rgba(16, 18, 28, 0.4);
}
.form-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1.5px dashed rgba(27, 45, 110, 0.35);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--print-2);
}
.f-row { display: grid; gap: 2px; padding-bottom: 14px; }
.f-row label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--print-2); }
.f-row .opt { text-transform: none; letter-spacing: 0; font-weight: 500; }
.form input, .form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1.5px solid #8e97b3;
  border-radius: 0;
  background: transparent;
  font-family: var(--f-hand);
  font-size: 1.3rem;
  line-height: var(--line);
  color: var(--pen);
  padding: 0 2px;
  min-height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form textarea {
  resize: vertical;
  border: 0;
  min-height: calc(var(--line) * 5);
  background-image: linear-gradient(to bottom, transparent calc(var(--line) - 1.5px), #8e97b3 calc(var(--line) - 1.5px), #8e97b3 var(--line));
  background-size: 100% var(--line);
  background-attachment: local;
}
.form input:focus, .form textarea:focus { outline: none; border-bottom-color: var(--pen); box-shadow: 0 2px 0 0 var(--pen); }
.form textarea:focus { box-shadow: none; outline: 2px solid var(--pen); outline-offset: 4px; border-radius: 2px; }
.form input[aria-invalid="true"] { border-bottom-color: var(--red); }
.form textarea[aria-invalid="true"] { outline: 2px solid var(--red); outline-offset: 4px; }
.f-err { color: var(--red); font-size: 0.9rem; font-weight: 600; margin-top: 4px; }
.f-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.f-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 6px; }
.f-status { font-weight: 600; color: var(--print); }
.f-status.is-error { color: var(--red); }
.f-status a { font-weight: 700; }

/* ================= FOOTER / SIGNATURE ================= */
.foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 28px;
  padding: var(--sec-gap) var(--pad-x) clamp(28px, 3.4vw, 44px);
}
.foot-copy { font-size: 0.92rem; color: var(--ink-2); }
.sign { display: grid; justify-items: center; width: min(300px, 100%); }
.sig { width: 100%; height: auto; overflow: visible; margin-bottom: -6px; }
.sig text {
  font-family: var(--f-sign);
  font-size: 74px;
  fill: var(--pen);
  stroke: var(--pen);
  stroke-width: 0.6;
}
.sign-line { display: block; width: 100%; border-top: 1px solid var(--print-2); padding-top: 4px; text-align: center; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--print-2); }

/* ================= NOTES (ballpoint) ================= */
.note {
  font-family: var(--f-hand);
  font-weight: 400;
  color: var(--pen);
  line-height: 1.2;
  white-space: nowrap;
  display: inline-block;
}
.note-head {
  display: block;
  width: max-content;
  margin-top: 16px;
  font-size: 1.35rem;
  transform: rotate(-3deg);
  transform-origin: left;
  position: sticky;
  top: calc(86px + clamp(2.6rem, 4.6vw, 3.9rem) + 12px);
}

/* ================= MOTION =================
   Default is fully inked. Only .motion (set before paint when motion is allowed)
   holds marks back so they can be pressed, written and highlighted in. */
.motion .rx-mark svg { animation: rx-press 820ms var(--ease-out) 220ms both; }
.motion .rx-ring { animation: rx-ring 900ms var(--ease-out) 640ms both; }
@keyframes rx-press {
  0%   { opacity: 0; transform: translateY(-14px) scale(1.55) rotate(-11deg); filter: blur(7px); }
  52%  { opacity: 1; transform: translateY(0) scale(0.93) rotate(-2deg); filter: blur(0); }
  72%  { transform: scale(1.025) rotate(-3.4deg); }
  100% { opacity: 1; transform: scale(1) rotate(-3deg); filter: blur(0); }
}
@keyframes rx-ring {
  0%   { opacity: 0.45; transform: translate(-50%, -50%) scale(0.55); }
  100% { opacity: 0;    transform: translate(-50%, -50%) scale(1.25); }
}
.motion .lh-photo { animation: photo-set 900ms var(--ease-out) 80ms both; }
@keyframes photo-set {
  0%   { opacity: 0; transform: translateY(-12px) rotate(7deg); }
  100% { opacity: 1; transform: rotate(2.4deg); }
}
.motion .stamp-avail { animation: stamp-press 620ms var(--ease-out) 1150ms both; }
@keyframes stamp-press {
  0%   { opacity: 0; transform: scale(1.6) rotate(-17deg); filter: blur(5px); }
  60%  { opacity: 1; transform: scale(0.95) rotate(-10deg); filter: blur(0); }
  100% { opacity: 1; transform: scale(1) rotate(-11deg); }
}

/* handwriting: a pen moving left to right */
.motion .note {
  clip-path: inset(-40% 100% -40% -8%);
  transition: clip-path var(--dur, 900ms) var(--ease-write) var(--delay, 120ms);
}
.motion .inked .note,
.motion .note.inked { clip-path: inset(-40% -8% -40% -8%); }

/* highlighter: one swipe, left to right */
.motion mark.hl { background-size: 0% 76%; transition: background-size 0.75s var(--ease-write) var(--hl-delay, 280ms); }
.motion .inked mark.hl { background-size: 100% 76%; }
.motion .rx mark.hl { --hl-delay: 1000ms; }

.motion .ink-path { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 1s var(--ease-write) 350ms, opacity 0s 350ms; }
.motion .inked .ink-path { stroke-dashoffset: 0; opacity: 1; }

/* signature: the pen traces the letters, then the ink fills */
.motion .sig text { stroke-dasharray: 900; stroke-dashoffset: 900; fill-opacity: 0; transition: stroke-dashoffset 2.2s var(--ease-write) 200ms, fill-opacity 0.6s ease 1.9s; }
.motion .inked .sig text { stroke-dashoffset: 0; fill-opacity: 1; }

/* slips settle onto the sheet as they arrive */
.motion .slip { opacity: 0.35; translate: 0 24px; transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), opacity 0.7s var(--ease-out), translate 0.9s var(--ease-out); }
.motion .slip.s2 { transition-delay: 0s, 0s, 120ms, 120ms; }
.motion .slip.inked { opacity: 1; translate: 0 0; }

/* tear-off: following a case-study link tears this sheet off the pad
   and the next sheet is waiting underneath */
::view-transition-old(sheet) { animation: tear-away 640ms cubic-bezier(0.55, 0, 0.8, 0.25) both; transform-origin: 0 0; z-index: 2; }
::view-transition-new(sheet) { animation: sheet-under 640ms var(--ease-out) both; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
@keyframes tear-away {
  0%   { transform: none; opacity: 1; }
  18%  { transform: rotate(1.2deg) translateY(4px); }
  100% { transform: translate(6%, 110vh) rotate(13deg); opacity: 0.9; }
}
.pad.tearing { animation: tear-away 560ms cubic-bezier(0.55, 0, 0.8, 0.25) both; transform-origin: 0 0; }
@keyframes sheet-under {
  0%   { transform: scale(0.985); filter: brightness(0.94); }
  100% { transform: none; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .note { clip-path: none !important; }
  .ink-path { stroke-dashoffset: 0 !important; }
  mark.hl { background-size: 100% 76% !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .item { grid-template-columns: 2.4rem minmax(0, 13rem) minmax(0, 1fr); }
  .i-links { grid-column: 3; flex-direction: row; gap: 18px; margin-top: 10px; }
  .contents ol a { font-size: 0.95rem; }
}

@media (max-width: 899px) {
  .sec-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 20px; margin-bottom: 30px; }
  .sec-body { grid-column: 1 / -1; }
  .sec h2 { position: static; }
  .note-head { position: static; margin-top: 0; }
  .rx-body { grid-column: 3 / -1; }
  .rx-actions { grid-column: 3 / -1; }
  .note-rx { display: none; }
  .contact { grid-template-columns: minmax(0, 1fr); }
  .slips { grid-template-columns: minmax(0, 1fr); }
  .slip.s2 { margin-top: 0; }
  /* contents: one scrolling row */
  .contents { padding-right: clamp(12px, 3vw, 24px); }
  .contents ol {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 6px 0 12px;
    margin-left: -12px;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
    mask-image: linear-gradient(to right, #000 85%, transparent);
  }
  .contents ol::-webkit-scrollbar { display: none; }
  .contents ol li:last-child { padding-right: 28px; }
  .contents ol a { padding: 14px 4px 13px 0; }
}

@media (max-width: 680px) {
  .item { grid-template-columns: 2rem minmax(0, 1fr); row-gap: 10px; }
  .i-name, .i-what, .i-links { grid-column: 2; }
  .i-links { margin-top: 2px; }
  .sk-row { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .h-item { grid-template-columns: 40px minmax(0, 1fr); }
  .form-head span:last-child { display: none; }
}

@media (max-width: 599px) {
  :root { --line: 32px; --photo-w: 100px; }
  body { font-size: 1.0625rem; }
  .lh {
    grid-template-areas:
      "name  photo"
      "role  role"
      "qual  qual"
      "uni   uni"
      "rule  rule"
      "strip strip";
    padding-top: 26px;
  }
  .lh-name { align-self: center; font-size: clamp(2.5rem, 12.4vw, 3.4rem); }
  .lh-photo { padding: 5px 5px 22px; margin-top: 4px; }
  .note-photo { font-size: 0.95rem; left: 7px; bottom: 1px; }
  .stamp-avail { left: -38px; bottom: 20px; padding: 4px 7px 3px; border-width: 2px; }
  .stamp-avail .s-small { font-size: 0.5rem; }
  .stamp-avail .s-big { font-size: 0.86rem; }
  .lh-role { margin-top: 14px; font-size: 0.98rem; letter-spacing: 0.05em; }
  .lh-qual { font-size: 0.98rem; }
  .lh-qual .sep { margin: 0 0.4em; }
  .lh-uni { font-size: 0.9rem; }
  .lh-rule { margin-top: 14px; }
  .lh-strip { font-size: 0.9rem; padding: 10px 0 4px; column-gap: 16px; }
  .lh-strip li:last-child { display: none; }
  .rx { padding-top: 20px; padding-bottom: 30px; }
  .rx-mark { grid-column: 1 / 3; width: 50px; margin-top: 2px; }
  .rx-line { font-size: 1.45rem; }
  .rx-where { font-size: 0.98rem; margin-top: 6px; }
  .rx-actions { grid-column: 1 / -1; }
  .c-resume { padding: 6px 10px; font-size: 0.88rem; }
  .slip { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 420px) {
  .rx { grid-template-columns: 50px minmax(0, 1fr); column-gap: 14px; }
  .rx-mark { grid-column: 1; }
  .rx-body { grid-column: 2; }
  .rx-actions { grid-column: 1 / -1; gap: 10px; }
  .rx-actions .btn { flex: 1 1 auto; justify-content: center; padding: 10px 14px; }
  .lh-strip li:nth-child(3) { display: none; }
}
