/* ============================================================
   sketch.css — a sketchbook feel, like a story being drawn in progress.
   Loaded after personal.css and only layers on top of it: delete this file and its
   <link> (and the #rough filters in index.html) to get the plain look back.

   What it adds
     - paper: a faint dot grid and grain, like a dotted notebook page
     - wobbly hand-drawn outlines (an SVG displacement filter) on cards, buttons
       and the dividers between sections; the hard offset shadows stay, like a
       printed block under a pencil line
     - the career-journey diagram redrawn as a sketch (rough lines and shapes)
     - handwriting (Patrick Hand: chosen because it stays easy to read at small sizes) for small annotations: step captions, diagram notes,
       "updated" lines
     - washi tape on the photos, a pencil squiggle under headings, and cards
       pinned at slightly different angles
============================================================ */
:root {
  --hand: 'Patrick Hand', 'Bradley Hand', 'Segoe Print', cursive;
  --pencil: rgba(61, 34, 96, 0.55);
  /* ONE sticky-note color for every sticky on the page: classic Post-it yellow */
  --st-gold:  #FFF176;
  --dots: radial-gradient(circle, rgba(61, 34, 96, 0.09) 1px, transparent 1.4px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.13 0 0 0 0 0.38 0.18 0 0 0 -0.045'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Paper ---------- */
body.ct-page {
  background-image: var(--dots), var(--grain);
  background-size: 24px 24px, 220px 220px;
}
.section-work,
.section-speaking,
.section-connect {
  background-image: var(--dots), var(--grain);
  background-size: 24px 24px, 220px 220px;
}

/* ---------- Hand-drawn outlines ----------
   Each card's real border goes transparent and a pseudo-element draws the line again
   on top, run through the displacement filter. Only the line wobbles, never the text. */
.writing-item,
.speaking-entry,
.contact-form,
.journey,
.work-card,
.hero-cta,
.contact-submit,
.journey-btn { position: relative; border-color: transparent; }

.writing-item::before,
.speaking-entry::before,
.contact-form::before,
.journey::before,
.work-card::before {
  /* The pseudo is BOTH the card's fill and its hand-drawn outline, so they wobble together and the
     fill can never poke out of the line (that was the bleeding corners). The card's own background
     is removed below; the highlighter swipe (::after) sits one layer further back. */
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid var(--ink);
  border-radius: inherit;
  background: var(--fill, #fff);
  filter: url(#rough);
  pointer-events: none;
  z-index: -1;
}
.writing-item, .speaking-entry, .contact-form, .journey, .work-card {
  isolation: isolate;          /* keep the two background layers inside the card */
  background: none;
}
.work-card--ct { --fill: var(--ct-purple); }
.work-card--photo { padding: 2px; }   /* keeps the photo clear of the line so none of the outline is covered */
.hero-cta::before,
.contact-submit::before,
.journey-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid var(--ink);
  border-radius: inherit;
  filter: url(#rough-fine);
  pointer-events: none;
}
.journey-btn:disabled::before { opacity: 0.5; }

/* the work cards clipped their children to a rounded box; let the line draw outside it */
.work-card { overflow: visible; }
.work-card--photo .photo-placeholder { border-radius: 26px; }
.work-card--ct { border-radius: 28px; }

/* Corners that poke out of the wobbly line: keep every fill inside the line. The card's own
   background stops at the padding box (inside the 2px border the line is drawn over), the photo
   card's footer gets rounded bottom corners, and the photos use the card's INNER radius. */
.work-card--photo .work-card-photo-footer { border-radius: 0 0 26px 26px; }
.work-card--ct { border-radius: 28px; }
.hero-image-placeholder { background-clip: padding-box; }

/* cards pinned in at slightly different angles (individual `rotate` composes with the hover transforms) */
.work-card--ct { rotate: -0.5deg; }
.work-card--photo { rotate: 0.5deg; }
.writing-list > *:nth-child(odd)  { rotate: -0.3deg; }
.writing-list > *:nth-child(even) { rotate: 0.35deg; }
.speaking-entry:nth-child(even) { rotate: 0.4deg; }
.speaking-entry:nth-child(odd)  { rotate: -0.3deg; }

/* ---------- Section dividers: a pencilled line instead of a ruler ---------- */
main > section + section { border-top: 0; position: relative; }
main > section + section::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  border-top: 2px solid var(--ink);
  filter: url(#rough-line);
  pointer-events: none;
}
.section-hero::before { content: ''; }   /* (the hero keeps its own decorative circles) */

/* ---------- Headings: a pencilled squiggle underneath, different for each ----------
   Each heading gets its own shape, length and color, so the underline suits the heading it
   sits under (long wave for the long About heading, a double line for the two things in Stuff
   I make, a zigzag for the writing, a flourish for the talks, an arrow for "now", a heart
   for the contact heading). Colors follow the site palette: red = me/general, green =
   Command+Tab, gold = Photography, lilac = The Kelloggian, neutral purple for the talks.
   The shapes are masks, so the colors come straight from the CSS variables. */
.section-heading::after {
  content: '';
  display: block;
  width: var(--sq-w, 132px);
  height: var(--sq-h, 14px);
  margin-top: 6px;
  background: var(--sq-c, var(--w-lilac));
  -webkit-mask: var(--sq) no-repeat left center / 100% 100%;
  mask: var(--sq) no-repeat left center / 100% 100%;
}
#about-heading    { --sq: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='14' viewBox='0 0 300 14' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8C30 1 55 14 85 7S140 1 170 8 230 14 260 7 290 3 298 8'/%3E%3C/svg%3E"); --sq-w: 300px; --sq-h: 14px; --sq-c: var(--w-red); }
#work-heading     { --sq: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='20' viewBox='0 0 150 20' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 5C20 0 36 10 56 5S92 0 110 5 138 9 148 4'/%3E%3Cpath d='M2 15C22 10 38 19 60 14S96 10 116 15 140 19 148 13'/%3E%3C/svg%3E"); --sq-w: 150px; --sq-h: 20px; --sq-c: linear-gradient(180deg, var(--w-green) 0 50%, var(--w-maple) 50% 100%); }
#writing-heading  { --sq: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='190' height='16' viewBox='0 0 190 16' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12 14 3 26 13 38 3 50 13 62 3 74 13 86 3 98 13 110 3 122 13 134 3 146 13 158 3 170 12 186 6'/%3E%3C/svg%3E"); --sq-w: 190px; --sq-h: 16px; --sq-c: var(--w-lilac); }
#speaking-heading { --sq: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='290' height='24' viewBox='0 0 290 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 15C80 11 160 11 228 13 262 14 278 7 270 4 264 0 252 9 262 16 268 20 281 16 288 11'/%3E%3C/svg%3E"); --sq-w: 290px; --sq-h: 24px; --sq-c: var(--accent-neutral); }
#now-heading      { --sq: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='20' viewBox='0 0 220 20' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 10C60 6 120 14 188 9'/%3E%3Cpath d='M180 3 206 9 184 17'/%3E%3C/svg%3E"); --sq-w: 220px; --sq-h: 20px; --sq-c: var(--w-red); }
#connect-heading  { --sq: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='24' viewBox='0 0 130 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 15C26 4 56 24 88 11'/%3E%3Cpath d='M104 10C104 4 112 3 112 9 112 3 120 4 120 10 120 15 112 18 112 20 112 18 104 15 104 10Z' stroke-width='2.4'/%3E%3C/svg%3E"); --sq-w: 130px; --sq-h: 24px; --sq-c: var(--w-red); }

/* ---------- Washi tape on the photos ---------- */
.hero-image::before,
.hero-image::after,
.speaking-photo::before {
  content: '';
  position: absolute;
  z-index: 4;
  width: 86px;
  height: 26px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 6px, transparent 6px 12px),
    color-mix(in srgb, var(--w-maple) 70%, transparent);
  box-shadow: 0 1px 2px rgba(61, 34, 96, 0.18);
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 100% 0, 96% 50%, 100% 100%, 12% 100%, 8% 90%, 4% 100%, 0 92%, 3% 50%);
  pointer-events: none;
}
.hero-image::before { top: -10px; left: -22px; rotate: -32deg; }
.hero-image::after  { top: -8px; right: -20px; rotate: 30deg; background-color: color-mix(in srgb, var(--w-lilac) 70%, transparent); }
.speaking-photo { position: relative; }
.speaking-photo::before { top: -12px; left: 50%; translate: -50% 0; rotate: -3deg; }

/* ---------- Handwritten annotations ---------- */
.journey-panel .jp-step {
  font-family: var(--hand);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-neutral);
}
.journey-title::after {
  content: 'still drawing…';
  margin-left: 12px;
  font: 400 18px var(--hand);
  color: var(--accent-neutral);
  opacity: 0.85;
  white-space: nowrap;           /* wraps as a whole phrase on phones, never "still / drawing…" */
}
/* the story is finished at the last step, so the caption goes away */
.journey[data-step="5"] .journey-title::after { content: none; }
.now-updated { font-family: var(--hand); font-size: 17px; font-weight: 400; color: var(--accent-neutral); }
.journey-svg .j-small { font-family: var(--hand); font-weight: 400; font-size: calc(var(--j-fs-s, 13) * 1.12px); }

/* ---------- The career journey as a sketch ----------
   Lines and shapes (never text) go through a light displacement so they look drawn. */
.j-base line, .j-dash, #j-prog, .j-arc, .j-node, .j-next, .j-hcdbox, .j-row, .j-knock {
  filter: url(#rough-svg);       /* userSpaceOnUse region: a straight horizontal line has a zero-height box and would vanish otherwise */
}
#j-prog { stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
  .work-card, .writing-list > *, .speaking-entry { transition: none; }
}

/* ============================================================
   HIGHLIGHTER SHADOWS
   The hard offset block shadows become a marker swipe: a translucent, slightly
   crooked slab of the card's tone color tucked behind it, multiplied into the paper
   (so it darkens like real highlighter ink), with streaks and rough edges.
   Each slab is the card's ::after at z-index -1. Sections isolate their stacking
   context so the slab can sit behind the card but above the section background.
============================================================ */
main > section { isolation: isolate; }

.work-card, .work-card:hover,
.writing-item, .writing-item:hover,
.speaking-entry,
.contact-form,
.journey,
.hero-cta, .hero-cta:hover,
.contact-submit, .contact-submit:hover, .contact-submit:active,
.nav-toggle, .nav-toggle:hover, .nav-toggle:active,
.hero-image-placeholder { box-shadow: none; }

.work-card::after,
.writing-item::after,
.speaking-entry::after,
.contact-form::after,
.journey::after,
.hero-image-placeholder::after,
.hero-cta::after,
.contact-submit::after,
.nav-toggle::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: 20px 28px 22px 30px / 26px 20px 30px 22px;
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.16) 0 3px, transparent 3px 8px),
    color-mix(in srgb, var(--tone, var(--w-lilac)) 66%, transparent);
  mix-blend-mode: multiply;
  filter: url(#rough);
  --ox: 9px; --oy: 11px;
  translate: var(--ox) var(--oy);
  transition: translate 250ms var(--ease-pop);
}
.work-card::after, .writing-item::after, .speaking-entry::after, .contact-form::after, .journey::after { z-index: -2; }

/* The small buttons now get the same two-layer construction as the cards (see the fill pseudo-elements
   below), so their swipe also just sits behind the fill. (It used to be masked with a square hole,
   which left a sliver outside the rounded corners, most visible on the menu button.) */
.hero-cta::after, .contact-submit::after, .nav-toggle::after { z-index: -2; }
.journey { --tone: var(--w-lilac); }
.contact-form, .speaking-entry { --tone: var(--accent-neutral); }
.hero-image-placeholder { --tone: var(--w-lilac); }

/* smaller things get a smaller swipe */
.hero-cta::after, .contact-submit::after, .nav-toggle::after {
  --ox: 5px; --oy: 6px;
  border-radius: inherit;        /* same corners as the button, so the shadow reads as its twin */
  filter: url(#rough-fine);      /* same gentle wobble as the button's outline (the cards keep the stronger one) */
  background: color-mix(in srgb, var(--tone, var(--w-lilac)) 66%, transparent);   /* flat, no stripe texture, so the edge stays clean */
}
.nav-toggle { position: relative; }

/* hover lifts the card away from its swipe, like the old shadow did */
.work-card:hover::after, .writing-item:hover::after { --ox: 12px; --oy: 14px; }
.hero-cta:hover::after, .contact-submit:hover::after { --ox: 7px; --oy: 8px; }

/* the hero photo clipped itself to a rounded box; let its swipe show outside the box instead */
.hero-image-placeholder { overflow: visible; }
.hero-image-placeholder.has-photo picture,
.hero-image-placeholder.has-photo img { border-radius: 30px; }   /* inner radius: 32px outer minus the 2px border */

/* speaking photo: swipe behind the figure */
.speaking-photo img { box-shadow: none; }
.speaking-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 16px 22px 18px 24px / 22px 16px 24px 18px;
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.16) 0 3px, transparent 3px 8px),
    color-mix(in srgb, var(--accent-neutral) 55%, transparent);
  mix-blend-mode: multiply;
  filter: url(#rough);
  --ox: 7px; --oy: 9px;
  translate: var(--ox) var(--oy);
  pointer-events: none;
}

/* ============================================================
   STICKY NOTES
   Short asides become sticky notes: pale paper, slight tilt, a curled corner, a
   soft cast shadow. Used for the Stuff I make intro, the career journey step
   description, and the contact line.
============================================================ */
.journey-panel {
  position: relative;
  --st: var(--st-gold);
  background: var(--st);
  color: var(--ink);
  border: 0;
  border-radius: 2px 2px 3px 2px;
  box-shadow: 1px 2px 3px rgba(61, 34, 96, 0.16), 4px 8px 16px rgba(61, 34, 96, 0.12);
}
/* curled bottom-right corner */
.journey-panel::after {
  content: '';
  position: absolute;
  right: 0; bottom: 0;
  width: 26px; height: 26px;
  background: linear-gradient(315deg, transparent 50%, rgba(61, 34, 96, 0.12) 50%, color-mix(in srgb, var(--st) 80%, var(--ct-purple)) 51%, color-mix(in srgb, var(--st) 80%, var(--ct-purple)) 100%);
  box-shadow: -2px -2px 4px rgba(61, 34, 96, 0.1);
}
/* a pin of tape at the top */
.journey-panel::before {
  content: '';
  position: absolute;
  top: -11px; left: 50%;
  width: 64px; height: 20px;
  translate: -50% 0;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 2px rgba(61, 34, 96, 0.14);
  clip-path: polygon(0 12%, 5% 0, 10% 12%, 15% 0, 100% 0, 95% 50%, 100% 100%, 15% 100%, 10% 88%, 5% 100%, 0 88%, 3% 50%);
}


/* career journey description: the sticky changes with the step (see journey.js, data-step) */
.journey-panel {
  margin-top: var(--sp-4);
  padding: var(--sp-5) var(--sp-5) var(--sp-5);
  rotate: -0.5deg;
  border-radius: 2px 2px 3px 2px;
  transition: background 300ms;
}
.journey-panel p { color: var(--ink); }
.journey-panel .jp-sub { color: rgba(61, 34, 96, 0.75); }
.journey-panel .jp-note { color: var(--w-green-ink); }
.journey-panel .jp-step { color: rgba(61, 34, 96, 0.75); }
.jp-pill { background: rgba(255, 255, 255, 0.7); }

/* ============================================================
   VOTING DOTS
   Dot-vote stickers: glossy round colored dots. They stand in for the career
   journey's step indicator (a dot per step; colored as you pass it, bigger on the
   current one) and the bullets in "What I'm up to now".
============================================================ */
.journey-dot::before {
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border: 2px dashed rgba(61, 34, 96, 0.45);        /* a spot waiting for a dot */
  background: transparent;
  transition: transform 250ms var(--ease-pop), background 200ms;
}
.journey-dot.is-past::before,
.journey-dot.is-on::before {
  border: 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.65) 0 22%, transparent 24%),
    var(--dc, var(--w-lilac));
  box-shadow: 0 1px 2px rgba(61, 34, 96, 0.35);
}
.journey-dot.is-on::before { transform: scale(1.35); }
/* every step pin is the same color: the journey's own lilac */
.journey-dot { --dc: var(--w-lilac); }

.now-list li::before {
  width: 15px; height: 15px;
  border: 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.65) 0 22%, transparent 24%),
    var(--dc, var(--w-lilac));
  box-shadow: 0 1px 2px rgba(61, 34, 96, 0.35);
}
/* one dot color for the whole list */
.now-list li::before { --dc: var(--w-lilac); }

@media (prefers-reduced-motion: reduce) {
  .work-card::after, .writing-item::after, .hero-cta::after, .contact-submit::after { transition: none; }
}


/* ============================================================
   HIGHLIGHTER AT THE TOP
   When the page loads, a highlighter sweeps along "Devon" in step with the marker
   swipe behind the word, then lifts off and flies out of the page (up and to the right).
   It is the word's ::before, positioned by percentages of the word's own width, so it
   follows the word at any size. Hidden for reduced motion and shrunk on phones.
============================================================ */
.hero-wave::before {
  content: '';
  position: absolute;
  z-index: 3;
  left: -3%;
  top: 78%;
  width: 137px;
  height: 47px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='20 0 140 48' fill='none' stroke='%233D2260' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%0A%3Cpath d='M36 18V32H22L28 18Z' fill='%23B984AF'/%3E%0A%3Cpath d='M36 17H40C46 17 47 9 54 9V39C47 39 46 33 40 33H36Z' fill='%23fff'/%3E%0A%3Crect x='54' y='9' width='84' height='30' rx='6' fill='%23fff'/%3E%0A%3Crect x='108' y='9' width='12' height='30' fill='%23B984AF' stroke-width='2'/%3E%0A%3Cpath d='M138 11H152A4 4 0 0 1 156 15V33A4 4 0 0 1 152 37H138Z' fill='%23fff'/%3E%0A%3Cpath d='M144 15V33' stroke-width='1.8'/%3E%0A%3C/svg%3E") no-repeat center / contain;
  transform-origin: 2px 67%;                 /* the chisel tip (bottom-left corner of the small nib) */
  translate: 0 -67%;
  rotate: -28deg;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(1px 3px 2px rgba(61, 34, 96, 0.22));
  /* The sweep uses the SAME duration, delay and easing curve as the marker swipe behind the word
     (marker-swipe in personal.css: 750ms, 650ms delay, cubic-bezier(.34,1.35,.64,1)), and its tip
     travels exactly the swipe's own path (the swipe spans -0.06em to 100% + 0.1em of the word).
     Both are linear in the same eased progress, so the tip is always at the swipe's leading edge,
     overshoot and settle included. Then, after a short pause, it lifts off and leaves. */
  animation:
    pen-in 150ms 500ms ease-out both,
    pen-sweep 750ms 650ms cubic-bezier(0.34, 1.35, 0.64, 1) both,
    pen-leave 750ms 1550ms cubic-bezier(0.5, 0, 0.9, 0.5) forwards;
}
@keyframes pen-in    { from { opacity: 0; } to { opacity: 1; } }
@keyframes pen-sweep { from { left: -0.06em; top: 78%; rotate: -28deg; } to { left: calc(100% + 0.1em); top: 78%; rotate: -28deg; } }
@keyframes pen-leave {
  0%   { left: calc(100% + 0.1em); top: 78%;  rotate: -28deg; opacity: 1; }
  100% { left: calc(100% + 70vw);  top: -190%; rotate: -70deg; opacity: 0; }   /* off the page, up and to the right */
}
@media (prefers-reduced-motion: reduce) { .hero-wave::before { display: none; } }
@media (max-width: 720px) { .hero-wave::before { width: 92px; height: 32px; } }

/* ============================================================
   FOOTER, in the sketchbook style
   No more dark slab: the footer sits on the paper like the other sections, with a thick
   marker line across the top in the palette gradient (the same gradient as the header bar),
   ink text, and a handwritten location line.
============================================================ */
.site-footer {
  position: relative;
  background: #fff;
  border: 0;
  border-radius: 0;
  padding-top: var(--sp-10);
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 7px;
  background: var(--gradient-bar);
  border-radius: 4px;
  filter: url(#rough-fine);
  pointer-events: none;
}
.footer-icon { content: url("assets/crossroads-light.svg"); }   /* the purple version of the logo (the default one is cream, for dark backgrounds) */
.footer-name,
.footer-link,
.footer-ct-link .wm-cmd,
.footer-ct-link .wm-tab { color: var(--ink); }
.footer-link:hover { color: var(--accent-neutral); }
.footer-ct-link .wm-plus,
.footer-arrow { color: var(--w-green-ink); }


/* ============================================================
   TAPE DIVIDERS (thin: 6px)
   The dashed rules inside sections (above the credentials, between the "now" items,
   above the contact links, between the phone-menu links) are thin strips of washi tape
   with torn zigzag ends. Colors follow the palette: each "now" strip matches its item's
   voting dot.
============================================================ */
.speaking-credentials, .connect-links { border-top: 0; position: relative; }
.now-list li { border-bottom: 0; }
.speaking-credentials::before,
.now-list li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 6px;
  --tc: var(--w-lilac);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 4px, transparent 4px 8px),
    color-mix(in srgb, var(--tc) 58%, transparent);
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 33%, calc(100% - 3px) 50%, 100% 67%, calc(100% - 4px) 100%, 4px 100%, 0 67%, 3px 50%, 0 33%);
  rotate: -0.3deg;
  pointer-events: none;
}
.speaking-credentials::before { top: -3px; --tc: var(--w-lilac); }
.now-list li:not(:last-child)::after { bottom: -3px; }
.now-list li:nth-child(5n+1)::after { --tc: var(--w-red); }
.now-list li:nth-child(5n+2)::after { --tc: var(--w-maple); rotate: 0.3deg; }
.now-list li:nth-child(5n+3)::after { --tc: var(--w-green); }
.now-list li:nth-child(5n+4)::after { --tc: var(--w-lilac); rotate: 0.3deg; }
.now-list li:nth-child(5n+5)::after { --tc: var(--w-red); }
@media (max-width: 720px) {
  .site-nav a { border-bottom: 0; position: relative; }
  .site-nav a:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 6px;
    background:
      repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 4px, transparent 4px 8px),
      color-mix(in srgb, var(--w-lilac) 58%, transparent);
    clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 33%, calc(100% - 3px) 50%, 100% 67%, calc(100% - 4px) 100%, 4px 100%, 0 67%, 3px 50%, 0 33%);
    pointer-events: none;
  }
}


/* ============================================================
   PILLS THAT LINE UP
   The skill chips under the diagram and the tool/phase pills in the sticky share one shape: the same
   height, padding and line-height. A pill whose text has to wrap (the long Human-Centered Design one
   on a narrow screen) keeps a modest corner radius instead of turning into a blob, and a row of
   pills is aligned to the top so pills of different heights share one baseline.
============================================================ */
.journey-chip, .jp-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  font-size: 13px;
  line-height: 1.25;
  border-radius: 14px;
}
.journey-rows, .jp-pills { align-items: flex-start; gap: 6px; }

/* "Notre Dame" and "Kellogg" sit above their nodes in the narrow layout; a white halo keeps the
   dotted HCD outline from running through the letters */
.journey.is-compact #j-nd,
.journey.is-compact #j-kl {
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 7px;
  stroke-linejoin: round;
}


/* ============================================================
   HERO PHOTO TAPE ON SMALL SCREENS
   On phones the photo is a square narrower than its column, so tape positioned at the column's
   corners floated off the photo. Under 720px the two corner strips are replaced by one strip
   centered on the top edge, attached to the photo itself (so it tilts with it).
============================================================ */
@media (max-width: 720px) {
  .hero-image::before, .hero-image::after { display: none; }
  .hero-image-placeholder::before {
    content: '';
    position: absolute;
    z-index: 4;
    top: -12px;
    left: 50%;
    width: 78px;
    height: 24px;
    translate: -50% 0;
    rotate: -3deg;
    background:
      repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 6px, transparent 6px 12px),
      color-mix(in srgb, var(--w-maple) 70%, transparent);
    box-shadow: 0 1px 2px rgba(61, 34, 96, 0.18);
    clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 100% 0, 96% 50%, 100% 100%, 12% 100%, 8% 90%, 4% 100%, 0 92%, 3% 50%);
    pointer-events: none;
  }
}


/* The hero photo is taped down, so it doesn't straighten or shift on hover (personal.css rotates it
   to 0 and nudges it; here it stays at its resting tilt, and so does its highlighter swipe). */
.hero-image:hover .hero-image-placeholder { transform: rotate(2.5deg); }
@media (max-width: 720px) { .hero-image:hover .hero-image-placeholder { transform: rotate(1.5deg); } }


/* ============================================================
   BUTTONS: fill layer, so the highlighter swipe never shows past a corner
   The button's own background moves to its ::before (with the hand-drawn outline for the two
   CTA buttons), and the swipe sits one layer behind. Hover colors are carried by --fill.
============================================================ */
.hero-cta, .contact-submit, .nav-toggle { isolation: isolate; background: none; }
.hero-cta, .contact-submit { --fill: #fff; }
.hero-cta::before, .contact-submit::before { background: var(--fill); z-index: -1; }
.hero-cta:hover { background: none; --fill: var(--tone); }
/* the neutral tone is a mid purple, too dark behind ink text: the hero buttons fill with a light lilac instead (the same lilac as the hero marker swipe) */
.hero-cta[data-tone="neutral"]:hover { --fill: color-mix(in srgb, var(--w-lilac) 38%, #fff); }
.contact-submit:hover, .contact-submit:focus-visible, .contact-submit:active { background: none; --fill: var(--ink); }
.nav-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #fff;
  z-index: -1;
}


/* ============================================================
   iPHONE / SAFARI SAFETY
   CSS `filter: url(#...)` on the diagram's own SVG shapes (a userSpaceOnUse displacement filter) is
   unreliable in WebKit and can make lines and circles disappear, so on iOS the diagram is drawn
   with its plain strokes. (The wobble on boxes and outlines stays.) Chrome and Firefox are unchanged.
============================================================ */
@supports (-webkit-touch-callout: none) {
  .j-base line, .j-dash, #j-prog, .j-arc, .j-node, .j-next, .j-hcdbox, .j-row, .j-knock { filter: none; }
}


/* "What I'm up to now" is a plain list: no dividers between items, and one dot color */
.now-list li { border-bottom: 0; }
.now-list li:not(:last-child)::after, .now-list li::after { content: none; }

/* ============================================================
   "WHAT I'M UP TO NOW" AS A GRID OF SQUARE STICKIES
   Each item is its own square sticky note on the paper: the one sticky color, a strip of tape, a curled
   corner and a slight random tilt, with the text in handwriting. 3 across on desktop, 2 on tablets and
   phones, 1 on very narrow screens.
============================================================ */
.now-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-6);
  padding: var(--sp-3) 0 0;
}
.now-list li {
  position: relative;
  aspect-ratio: 1;
  display: block;               /* (not flex: the text and the inline MMM link must flow as one paragraph) */
  overflow-wrap: anywhere;
  padding: var(--sp-7) var(--sp-5) var(--sp-5);
  background: var(--st-gold);
  color: var(--ink);
  border: 0;
  border-radius: 2px 2px 3px 2px;
  box-shadow: 1px 2px 3px rgba(61, 34, 96, 0.16), 4px 8px 16px rgba(61, 34, 96, 0.12);
  font-family: var(--hand);
  font-size: 1.2rem;
  line-height: 1.3;
  font-variation-settings: normal;
}
.now-list li:nth-child(4n+1) { rotate: -1.6deg; }
.now-list li:nth-child(4n+2) { rotate: 1.2deg; }
.now-list li:nth-child(4n+3) { rotate: -0.8deg; }
.now-list li:nth-child(4n+4) { rotate: 1.7deg; }
/* the old dot and divider are replaced by a strip of tape and a curled corner */
.now-list li::before {
  content: '';
  position: absolute;
  top: -10px; left: 50%;
  width: 56px; height: 18px;
  translate: -50% 0;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 2px rgba(61, 34, 96, 0.14);
  clip-path: polygon(0 12%, 5% 0, 10% 12%, 15% 0, 100% 0, 95% 50%, 100% 100%, 15% 100%, 10% 88%, 5% 100%, 0 88%, 3% 50%);
  border: 0; border-radius: 0; box-shadow: none;
  width: 56px; height: 18px;
}
.now-list li:not(:last-child)::after, .now-list li::after {
  content: '';
  position: absolute;
  right: 0; bottom: 0; left: auto; top: auto;
  width: 22px; height: 22px;
  background: linear-gradient(315deg, transparent 50%, rgba(61, 34, 96, 0.12) 50%, color-mix(in srgb, var(--st-gold) 80%, var(--ct-purple)) 51%, color-mix(in srgb, var(--st-gold) 80%, var(--ct-purple)) 100%);
  clip-path: none;
  rotate: 0deg;
}
.now-list li a { color: inherit; }
@media (max-width: 720px) { .now-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); } .now-list li { font-size: 1.1rem; padding: var(--sp-6) var(--sp-4) var(--sp-4); } }
@media (max-width: 360px) { .now-list { grid-template-columns: minmax(0, 1fr); } .now-list li { aspect-ratio: auto; min-height: 140px; } }


/* Stickies are flat paper: no curled corner */
.journey-panel::after,
.now-list li::after,
.now-list li:not(:last-child)::after { content: none; }


/* Every step's sticky is the same size: the wrapper already reserves the height of the tallest step,
   so the note stretches to fill it (instead of being only as tall as its own text). */
.journey-panel-wrap { display: flex; flex-direction: column; }
.journey-panel-wrap > .journey-panel { flex: 1 1 auto; }

/* ============================================================
   NAVBAR, in the sketchbook style
   The bar is a strip of the same dotted paper as the page, with a thick hand-drawn marker line
   along its bottom edge (the palette gradient, wobbled like the other lines). Links are written in
   the handwriting font, and hovering one draws a highlighter swipe behind it (the same lilac swipe
   as "Devon." in the headline) instead of an underline.
============================================================ */
.site-header,
.site-header.is-scrolled {
  background-color: #fff;
  background-image: none;
}
.site-header::after {
  height: 6px;
  bottom: -2px;
  border-radius: 4px;
  filter: url(#rough-fine);
}
.site-nav a {
  font-family: var(--hand);
  font-size: 1.25rem;
  font-weight: 400;
  padding: 2px 8px;
  border-bottom: 0;
  border-radius: 4px 9px 5px 10px / 8px 5px 9px 5px;
  background: linear-gradient(transparent 26%, color-mix(in srgb, var(--w-lilac) 55%, transparent) 26% 88%, transparent 88%) no-repeat 0 0 / 0% 100%;
  transition: background-size 240ms var(--ease-pop);
}
.site-nav a:hover,
.site-nav a:focus-visible { border-bottom-color: transparent; background-size: 100% 100%; }
.site-nav { gap: var(--sp-5); }
.dn-logotype { position: relative; }
@media (max-width: 720px) {
  .site-nav {
    background-color: #fff;
    background-image: none;
  }
  .site-nav a { font-size: 1.6rem; font-weight: 400; padding: var(--sp-3) 8px; }
  .site-nav a:hover { color: inherit; }
}
@media (prefers-reduced-motion: reduce) { .site-nav a { transition: none; } }

/* No decorative circles in the hero's corners */
.section-hero::before, .section-hero::after { content: none; }


/* Stuff I make and Get in touch use plain text on the page (no sticky), and the speaking section's body
   text is brought up to the size of the other body text (the About paragraphs are 18px). */
.speaking-intro p:not(.speaking-lead) { font-size: 18px; }
.speaking-credential { font-size: 15px; }
.speaking-event { font-size: 16px; }
.speaking-detail { font-size: 14px; }

/* Writing cards: larger text (title 20 to 24px, description to 18px like the About text, date line and
   link to 15px/16px) and a little more padding to match */
.writing-item { padding: var(--sp-7) var(--sp-8); }
.writing-title { font-size: 24px; margin-bottom: var(--sp-3); }
.writing-meta { font-size: 15px; margin-bottom: var(--sp-4); }
.writing-desc { font-size: 18px; line-height: var(--lh-prose); }
.writing-cta { font-size: 16px; }
@media (max-width: 720px) { .writing-item { padding: var(--sp-5); } .writing-title { font-size: 21px; } .writing-desc { font-size: 17px; } }

/* ============================================================
   CARD TEXT: one larger scale for every card
   Body text in cards matches the About paragraphs (18px); titles step up with it; secondary
   lines are 15-16px; nothing in a card is smaller than 14px.
============================================================ */
/* Stuff I make cards */
.work-card-tagline { font-size: 28px; }
.work-card-desc { font-size: 17px; line-height: var(--lh-prose); }
.work-card-cta { font-size: 17px; }
.work-card-photo-label { font-size: 22px; }
.work-card--photo .work-card-cta { font-size: 16px; }
.work-card--ct { padding: 36px 38px; }

/* talk cards */
.speaking-event { font-size: 19px; line-height: 1.35; }
.speaking-detail { font-size: 16px; margin-top: var(--sp-2); }
.speaking-entry { padding: var(--sp-5) var(--sp-6); }

/* career journey card */
.journey-title { font-size: 26px; }
.journey-title::after { font-size: 21px; }
.journey-btn { font-size: 16px; }
.journey-panel p { font-size: 18px; line-height: 1.55; }
.journey-panel .jp-title { font-size: 26px; }
.journey-panel .jp-sub { font-size: 16px; }
.journey-panel .jp-step { font-size: 20px; }
.journey-chip, .jp-pill { font-size: 14px; min-height: 30px; }

/* contact form card */
.contact-submit { font-size: 17px; }

/* "What I'm up to now" stickies */
.now-list li { font-size: 1.4rem; }

@media (max-width: 720px) {
  .work-card-tagline { font-size: 24px; }
  .work-card--ct { padding: 30px 28px; }
  .speaking-event { font-size: 18px; }
  .journey-panel p { font-size: 17px; }
  .journey-panel .jp-title { font-size: 23px; }
  .now-list li { font-size: 1.2rem; }
}

/* ============================================================
   ONE TYPE SYSTEM
   Four voices, each with a fixed job, used the same way in every section:
     Bricolage Grotesque (display) .. every heading and card title
     Fraunces (body) ................. all running text: paragraphs, descriptions, list items
     Figtree (UI) .................... labels, meta lines (dates, venues, subtitles), pills, links, buttons
     Patrick Hand (handwriting) ...... annotations only: nav links, step captions, diagram notes,
                                       "updated" line, the sticky notes, the footer location
   Sizes: body text 18px; card titles 24px (22px where the card is narrow: talks, photo label);
   meta lines 15px/600; links and buttons 16px/600.
============================================================ */
/* card titles: always the display face */
.speaking-event { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.015em; line-height: 1.3; }
.writing-title, .journey-panel .jp-title, .journey-title { letter-spacing: -0.015em; }
.journey-title, .journey-panel .jp-title { font-size: 24px; }
.work-card-photo-label { font-size: 22px; }

/* meta lines: Figtree 15px/600 everywhere (writing date line, talk venue/date, journey subtitle) */
.writing-meta, .speaking-detail, .journey-panel .jp-sub { font-family: var(--font-ui); font-size: 15px; font-weight: 600; }
.speaking-detail { color: var(--ct-muted-purple); }
.journey-panel .jp-sub { color: rgba(61, 34, 96, 0.8); }

/* running text: always Fraunces 18px (the credentials were Figtree, the work-card text was 17px) */
.speaking-credential { font-family: var(--font-body); font-variation-settings: 'SOFT' 60; font-size: 18px; font-weight: 400; line-height: 1.45; }
.speaking-credential .inline-link { font-size: inherit; font-weight: inherit; }   /* same weight as the rest of the line; the underline marks it as a link */
.speaking-credentials { gap: var(--sp-3); }
.work-card-desc { font-size: 18px; }

/* links and buttons: Figtree 16px/600 */
.writing-cta, .all-posts-link, .connect-link, .work-card-cta, .work-card--photo .work-card-cta,
.hero-cta, .contact-submit, .journey-btn, .footer-link { font-family: var(--font-ui); font-size: 16px; font-weight: 600; }
.footer-link { font-weight: 600; }

/* the handwritten sticky text keeps one weight (the bold link was being faked) */
.now-list li a, .now-list li .inline-link { font-weight: 400; }

@media (max-width: 720px) {
  .speaking-event { font-size: 20px; }
  .speaking-credential { font-size: 17px; }
  .work-card-desc { font-size: 17px; }
  .journey-title, .journey-panel .jp-title { font-size: 22px; }
}
.footer-arrow { font-size: 16px; }

/* The line under the speaking heading ("Making analysis something people can actually use...") is a
   sub-headline, so it uses the same size as the other sub-headlines (the Command+Tab card tagline, 28px) */
.speaking-lead { font-size: 28px; line-height: 1.25; letter-spacing: -0.015em; }
@media (max-width: 720px) { .speaking-lead { font-size: 24px; } }

/* "What I'm up to now" on phones: the notes are no longer forced square (a note with more text, like the
   first, grew taller than its neighbor and left a ragged grid). Each row now stretches to the tallest note
   in it, text wraps in balanced lines, and a last note left alone in its row spans the full width. */
@media (max-width: 720px) {
  .now-list { align-items: stretch; }
  .now-list li {
    aspect-ratio: auto;
    min-height: 124px;
    font-size: 1.15rem;
    line-height: 1.3;
    text-wrap: balance;
    padding: var(--sp-6) var(--sp-4) var(--sp-4);
  }
  .now-list li:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 96px; }
}
@media (max-width: 360px) { .now-list li:last-child:nth-child(odd) { grid-column: auto; } }

/* Talk cards: the venue/date line is a touch smaller (13px, still above the 12.8px floor) so each one
   fits on a single line in its card on desktop. (Measured: the longer one needs 13.2px.) */
.speaking-detail { font-size: 13px; }


/* =====================================================}

   MORE HAND-DRAWN FRAMES AND LINES
   The same trick as the cards: the real border goes transparent (so nothing shifts) and a
   pseudo-element draws the line again through the displacement filter, so only the line
   wobbles and never the text. Photos wobble together with their frame.
============================================================ */


/* ---------- Form status message ---------- */
.form-status { position: relative; isolation: isolate; border-color: transparent; background: none !important; }
.form-status::before {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid var(--ink);
  border-radius: inherit;
  background: var(--fill, #fff);
  filter: url(#rough-fine);
  pointer-events: none;
  z-index: -1;
}
.form-status[data-state="success"] { --fill: var(--w-green-tint); }
.form-status[data-state="error"]   { --fill: var(--w-red-tint); }

/* ---------- Photo frames: the photo stays crisp, only the frame line wobbles ----------
   The frame is its own empty overlay element (.photo-frame) drawn on top of the photo. */
.hero-image-placeholder.has-photo { position: relative; border-color: transparent; }
.speaking-photo img { border-color: transparent; }
.photo-frame {
  position: absolute;
  inset: -2px;
  z-index: 3;
  border: 2px solid var(--ink);
  border-radius: 32px;
  filter: url(#rough-fine);
  pointer-events: none;
}
.speaking-photo .photo-frame { inset: 0; border-radius: 18px; }

/* ---------- Horizontal lines ---------- */
/* the line above the photography card's label strip */
.work-card-photo-footer { border-top-color: transparent; }
.work-card-photo-footer::before {
  content: '';
  position: absolute;
  top: -2px; left: 0; right: 0;
  border-top: 2px solid var(--ink);
  filter: url(#rough-line);
  pointer-events: none;
}
/* the underline on "Read →", "All posts" and the contact links */
.writing-cta, .all-posts-link, .connect-link { position: relative; border-bottom-color: transparent; }
.writing-cta::after, .all-posts-link::after, .connect-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  border-bottom: 2px solid var(--tone);
  filter: url(#rough-line);
  pointer-events: none;
}
/* the phone menu: its bottom edge and the dashed lines between the links */
@media (max-width: 720px) {
  .site-nav { border-bottom-color: transparent; }
  .site-header.is-open .site-nav::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    border-bottom: 2px solid var(--ink);
    filter: url(#rough-line);
    pointer-events: none;
  }
  .site-nav a, .site-nav a:hover { position: relative; border-bottom-color: transparent; }
  .site-nav a:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    border-bottom: var(--dash);
    filter: url(#rough-line);
    pointer-events: none;
  }
}

/* ============================================================
   HERO BACKGROUND
   A soft lilac-to-green wash (no dot grid) so the hero reads as its own
   panel against the cream page and the near-white navbar. Tweak the percentages to
   make it stronger or softer.
============================================================ */
.section-hero {
  background-color: var(--ct-cream);
  background-image:
    linear-gradient(155deg,
      color-mix(in srgb, var(--w-lilac) 30%, #fff) 0%,
      color-mix(in srgb, var(--w-lilac) 16%, var(--ct-cream)) 55%,
      color-mix(in srgb, var(--w-green) 26%, var(--ct-cream)) 100%);
}

/* ============================================================
   POLISH
============================================================ */
/* "What I'm up to now": three across, and a short last row is centered instead of hugging the left with an empty corner */
@media (min-width: 721px) {
  .now-list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-6); }
  .now-list li { flex: 0 0 calc((100% - 2 * var(--sp-6)) / 3); }
}
/* No one-word last lines, no lopsided headings */
.about-body p, .writing-desc, .speaking-intro, .journey-panel p, .mad-sentence { text-wrap: pretty; }
.section-heading, .writing-title, .journey-panel .jp-title { text-wrap: balance; }

/* ---- Hero strap + section links ---- */
.hero-strap {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: clamp(15px, 1.6vw, 18px);
  letter-spacing: 0.005em;
  line-height: 1.4;
  color: var(--ink);
  margin: calc(-1 * var(--sp-2)) 0 var(--sp-4);
  animation: rise 650ms 150ms var(--ease-pop) both;
}
.hero-links { align-items: center; }
@media (prefers-reduced-motion: reduce) { .hero-strap { animation: none; } }
@media (max-width: 480px) {
  .hero-links { gap: 10px; }
  .hero-links .hero-cta { padding: 10px 14px; font-size: 15px; }
}

/* ============================================================
   STICKY NOTES KEEP REAL POST-IT PROPORTIONS
   Real notes are square (3 x 3 in) or 3 x 5 in (5:3 landscape). The "Now" notes are square everywhere,
   a lone last note on a phone sits centered at the same square size instead of stretching across the row,
   and the contact note is a 5:3 note instead of a long strip. (The journey note is 5:3 on desktop.)
============================================================ */
@media (min-width: 361px) and (max-width: 720px) {
  .now-list li { aspect-ratio: 1; min-height: 0; font-size: 1.02rem; padding: var(--sp-5) var(--sp-3) var(--sp-3); text-wrap: pretty; }
  .now-list li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - var(--sp-5) / 2); min-height: 0; }
}
.mad-extra { max-width: 460px; }
.madlib .sticky { display: flex; flex-direction: column; aspect-ratio: 5 / 3; }
.madlib .sticky textarea { flex: 1 1 auto; min-height: 0; resize: none; }
@media (min-width: 721px) { .journey-panel { aspect-ratio: 5 / 3; } }   /* a 3 x 5 in note, landscape; the same height on every step so the card never jumps */
