/* ============================================================
   Devon Ngo — Personal Site
   Layered on the Command+Tab design tokens (colors_and_type.css).

   COLOR SYSTEM
   Four palette colors (Wada Sanzo Classic #282) carry meaning:
     green  = Command+Tab / blog      gold = Photography
     purple = The Kelloggian          red  = general / me
   Any element can opt in with data-tone="green|gold|purple|red";
   it then reads --tone / --tone-ink / --tone-tint. The actual hex
   values live in site.config.js (palette) and are applied as the
   --w-* variables below.

   LINE LANGUAGE
   2px purple "ink" outlines + hard offset shadows in a tone color,
   dashed rules for secondary separators, one smooth gradient bar
   under the header and above the footer.
============================================================ */

:root {
  /* Palette bases (overridden at runtime from site.config.js) */
  --w-red:    #DA525D;
  --w-maple:  #C59F6B;
  --w-green:  #96D1AA;
  --w-lilac:  #B984AF;

  /* Readable text shades + soft tints, derived from the bases */
  --w-red-ink:    color-mix(in srgb, var(--w-red)   70%, #3A0D14);
  --w-maple-ink:  color-mix(in srgb, var(--w-maple) 55%, #2E1F08);
  --w-green-ink:  color-mix(in srgb, var(--w-green) 40%, #0B3B1E);
  --w-lilac-ink:  color-mix(in srgb, var(--w-lilac) 62%, #2A0F2A);
  --w-red-tint:   color-mix(in srgb, var(--w-red)   16%, #fff);
  --w-maple-tint: color-mix(in srgb, var(--w-maple) 22%, #fff);
  --w-green-tint: color-mix(in srgb, var(--w-green) 24%, #fff);
  --w-lilac-tint: color-mix(in srgb, var(--w-lilac) 18%, #fff);

  --ink:  var(--ct-purple);
  /* ONE neutral purple for every accent that carries no meaning (nav, form,
     speaking cards, 'Now' dots, default links). Meaningful colors are only:
     green = Command+Tab, gold = Photography, lilac = The Kelloggian. */
  --accent-neutral: var(--ct-muted-purple);
  --highlight: color-mix(in srgb, var(--w-lilac) 62%, transparent);   /* marker device (hero + speaking lead) */
  --sand: #EFE9DF;                       /* alternating section band */
  --line: 2px solid var(--ink);
  --dash: 2px dashed rgba(61, 34, 96, 0.28);
  --gradient-bar: linear-gradient(90deg,
      var(--w-lilac), var(--w-red) 36%, var(--w-maple) 68%, var(--w-green));

  /* Site fonts (chosen in site.config.js -> fonts; these are the defaults).
     display = big headlines (hero name, section titles, card titles)
     ui      = interface text (nav, buttons, labels, post metadata)
     body    = reading text (paragraphs, descriptions, lists)
     Inter is NOT used by the page — only by the Command+Tab wordmark,
     via --font-sans / --font-serif in colors_and_type.css. */
  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ui:      'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Fraunces', Georgia, 'Times New Roman', serif;

  --r-card: 24px;
  --r-btn:  12px;
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Default tone = red (general) */
  --tone:      var(--accent-neutral);
  --tone-ink:  var(--ct-muted-purple);
  --tone-tint: var(--ct-lavender-bg);

  /* Page-level overrides of the Command+Tab dark defaults */
  --bg:             var(--ct-cream);
  --bg-elevated:    #FFFFFF;
  --surface:        #FFFFFF;
  --fg1:            var(--ct-purple);        /* .ct-page text color */
  --fg2:            var(--ct-muted-purple);
  --accent:         var(--ct-sage-light);
  --accent-soft-bg: rgba(90, 148, 100, 0.12);
  --accent-soft-bd: rgba(90, 148, 100, 0.45);
  --rule:           rgba(61, 34, 96, 0.12);
  --rule-strong:    rgba(61, 34, 96, 0.20);
}

[data-tone="neutral"] { --tone: var(--accent-neutral); --tone-ink: var(--ct-muted-purple); --tone-tint: var(--ct-lavender-bg); }
[data-tone="gold"]   { --tone: var(--w-maple); --tone-ink: var(--w-maple-ink); --tone-tint: var(--w-maple-tint); }
[data-tone="green"]  { --tone: var(--w-green); --tone-ink: var(--w-green-ink); --tone-tint: var(--w-green-tint); }
[data-tone="purple"] { --tone: var(--w-lilac); --tone-ink: var(--w-lilac-ink); --tone-tint: var(--w-lilac-tint); }
[data-tone="red"]    { --tone: var(--w-red); --tone-ink: var(--w-red-ink); --tone-tint: var(--w-red-tint); }
[data-tone="ink"]    { --tone: color-mix(in srgb, var(--ink) 45%, #fff); --tone-ink: var(--ink); --tone-tint: var(--ct-lavender-bg); }

/* ---- Reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body.ct-page {   /* .ct-page (tokens file) sets Inter; this must out-rank it */
  background: var(--ct-cream);
  color: var(--ct-purple);
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
img { display: block; max-width: 100%; }

/* ---- Layout ------------------------------------------------ */
.section-inner   { max-width: 900px; margin: 0 auto; padding: var(--sp-11) var(--sp-7); }
/* Same 900px frame (and so the same left edge) as every other section; reading text keeps a 720px measure inside it */
.prose-container { max-width: 900px; margin: 0 auto; padding: var(--sp-11) var(--sp-7); }
.prose-container > :not(.section-heading):not(.now-list) { max-width: 720px; }

main > section + section { border-top: var(--line); }
.section-work,
.section-speaking,
.section-connect { background: var(--sand); }

.section-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: var(--sp-7);
  color: var(--ink);
}

.noscript-note { padding: var(--sp-8); text-align: center; }

/* ============================================================
   HEADER
============================================================ */
/* Out of the page flow (fixed), so hiding it leaves no empty strip. The
   bar is hidden while the hero headline is on screen (.bar-hidden, toggled
   by the scroll script in index.html) and returns once you scroll past it. */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  background: var(--ct-cream);
  transition: background 200ms, opacity 220ms, transform 260ms var(--ease-pop);
}
.site-header::after {            /* smooth gradient bar */
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--gradient-bar);
}
.site-header.is-scrolled {
  background: rgba(245, 242, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--sp-7);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dn-logotype {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  transition: opacity 220ms, transform 220ms var(--ease-pop), visibility 220ms;
}
.site-nav { display: flex; gap: var(--sp-6); }
.site-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 200ms;
}
.site-nav a:hover { border-bottom-color: var(--ink); }

/* Hamburger button — shown only on small screens (see RESPONSIVE) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: var(--line);
  border-radius: var(--r-btn);
  box-shadow: 3px 3px 0 var(--accent-neutral);
  cursor: pointer;
  transition: transform 200ms var(--ease-pop), box-shadow 200ms;
}
.nav-toggle:hover  { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--accent-neutral); }
.nav-toggle:active { transform: translate(2px, 2px);   box-shadow: 1px 1px 0 var(--accent-neutral); }
.nav-toggle:focus-visible { outline: 3px solid var(--w-green); outline-offset: 3px; }
.nav-toggle[hidden] { display: none !important; }
.nav-toggle-bars { position: relative; display: block; width: 20px; height: 14px; }
.nav-toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 220ms var(--ease-pop), opacity 150ms, top 220ms;
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 6px; }
.nav-toggle-bars span:nth-child(3) { top: 12px; }
.is-open .nav-toggle-bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.is-open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.is-open .nav-toggle-bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* ============================================================
   HERO
============================================================ */
.section-hero {
  padding: var(--sp-12) var(--sp-7);
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.section-hero::before,
.section-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--sand);
  pointer-events: none;
}
.section-hero::before { width: 420px; height: 420px; right: -120px; top: -140px; }
.section-hero::after  { width: 220px; height: 220px; left: -80px;  bottom: -90px; }

.hero-grid {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--sp-10);
  align-items: center;
}
.hero-content { display: flex; flex-direction: column; gap: var(--sp-5); }
.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 7vw, 84px);
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--ink);
}

/* Highlighter underline: a marker swipe behind the lower half of the name.
   It sweeps in once on load (skipped for reduced-motion). */
.hero-wave {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  isolation: isolate;               /* keeps the swipe behind the text, above the page */
}
.hero-wave::after {
  content: '';
  position: absolute;
  z-index: -1;
  left: -0.06em; right: -0.1em;     /* overshoot a little, like a real marker */
  /* Geometry (in em of the name's font size; baseline sits at 0.82em):
     top .58em -> bottom .94em = a .36em-thick marker, 2/3 of it on the
     letters and 1/3 hanging below the baseline. */
  top: 58%;
  bottom: 0.06em;
  background: var(--highlight);
  border-radius: 0.12em 0.4em 0.16em 0.45em / 0.3em 0.2em 0.4em 0.25em;
  transform: rotate(-1.2deg) skewX(-6deg);
  transform-origin: left center;
  animation: marker-swipe 750ms 650ms cubic-bezier(0.34, 1.35, 0.64, 1) both;   /* slight overshoot */
}
@keyframes marker-swipe {
  from { transform: rotate(-1.2deg) skewX(-6deg) scaleX(0); }
  to   { transform: rotate(-1.2deg) skewX(-6deg) scaleX(1); }
}

.hero-subline {
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink);
  opacity: 0.8;
  max-width: 34ch;
}
.hero-links { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-4); }
.hero-cta {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: var(--line);
  border-radius: var(--r-btn);
  padding: 12px 20px;
  transition: transform 220ms var(--ease-pop), background 200ms;
}
.hero-cta:hover {
  background: var(--tone);
  transform: translate(-2px, -2px);
}

.hero-image { position: relative; }
.hero-image-placeholder {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--w-lilac-tint);
  border: var(--line);
  border-radius: 32px;
  box-shadow: 12px 12px 0 var(--w-lilac);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ct-muted-purple);
  font-size: var(--fs-small);
  font-style: italic;
  overflow: hidden;
  transform: rotate(2.5deg);
  transition: transform 300ms var(--ease-pop);
}
.hero-image:hover .hero-image-placeholder { transform: rotate(0) translate(-2px, -2px); }
/* Photography card: image is absolutely positioned so its own dimensions
   never change the card's height */
.photo-placeholder { position: relative; overflow: hidden; }
.photo-placeholder.has-photo img { position: absolute; inset: 0; object-position: 50% 40%; }

.has-photo picture { display: block; width: 100%; height: 100%; }
.has-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-image-placeholder.has-photo img { object-position: 50% 18%; }   /* keep the head in frame when cropping */

/* ============================================================
   ABOUT
============================================================ */
.about-body { display: flex; flex-direction: column; gap: var(--sp-5); }
.about-body p { font-size: 18px; line-height: var(--lh-prose); }
.inline-link {
  color: var(--w-green-ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--w-green);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.inline-link:hover { background: var(--w-green-tint); }

/* ============================================================
   THE WORK
============================================================ */
.work-intro {
  max-width: 62ch;
  margin: calc(-1 * var(--sp-4)) 0 var(--sp-7);
  font-size: 18px;
  line-height: var(--lh-prose);
  color: var(--ct-muted-purple);
}
.work-intro:empty { display: none; }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-7); }
.work-card {
  border: var(--line);
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  box-shadow: 8px 8px 0 var(--tone);
  transition: transform 250ms var(--ease-pop), box-shadow 250ms;
}
.work-card:hover { transform: translate(-3px, -3px); box-shadow: 12px 12px 0 var(--tone); }

.work-card--ct {
  background: var(--ct-purple);
  padding: 32px 34px;
  justify-content: space-between;
}
.work-card--ct .ct-wordmark .wm-cmd,
.work-card--ct .ct-wordmark .wm-tab { color: var(--ct-cream); }
.work-card--ct .ct-wordmark .wm-plus { color: var(--w-green); }
.work-card-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ct-cream);
  margin-top: var(--sp-6);
  flex: 1;
}
.work-card-desc {
  font-size: var(--fs-small);
  color: var(--ct-lavender-text);
  line-height: var(--lh-normal);
  margin-top: var(--sp-3);
}
.work-card-cta {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  margin-top: var(--sp-6);
}
.work-card--ct .work-card-cta { color: var(--tone); }

.work-card--photo { background: #fff; position: relative; }
.photo-placeholder {
  flex: 1;
  min-height: 260px;
  background: var(--tone-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ct-muted-purple);
  font-size: var(--fs-small);
  font-style: italic;
}
.work-card-photo-footer {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 28px;
  background: var(--tone);
  color: var(--ink);
  border-top: var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.work-card-photo-label { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.work-card-photo-footer .work-card-cta { margin-top: 0; }

/* ============================================================
   SELECTED WRITING
============================================================ */
.writing-list { display: flex; flex-direction: column; gap: var(--sp-6); }
.writing-item {
  background: #fff;
  border: var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-6) var(--sp-7);
  box-shadow: 6px 6px 0 var(--tone);
  transition: transform 250ms var(--ease-pop), box-shadow 250ms;
}
.writing-item:hover { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 var(--tone); }
.writing-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: var(--sp-2);
}
.writing-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--tone-ink);
  margin-bottom: var(--sp-3);
}
.writing-desc {
  color: var(--ct-muted-purple);
  line-height: var(--lh-normal);
  margin-bottom: var(--sp-4);
}
.writing-cta,
.all-posts-link,
.connect-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--tone);
  padding-bottom: 1px;
  transition: background 200ms;
}
.writing-cta:hover,
.all-posts-link:hover,
.connect-link:hover { background: var(--tone-tint); }
.all-posts-link { margin-top: var(--sp-7); }
.writing-empty { color: var(--ct-muted-purple); }

/* ============================================================
   SPEAKING + TEACHING
============================================================ */
.speaking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-10);
  align-items: start;
}
.speaking-lead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: var(--sp-5);
}
.speaking-intro p:not(.speaking-lead) { color: var(--ct-muted-purple); line-height: var(--lh-prose); }
.speaking-entry {
  background: #fff;
  border: var(--line);
  border-radius: 18px;
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-4);
  box-shadow: 4px 4px 0 var(--accent-neutral);
}
.speaking-photo { margin: 0 0 var(--sp-5); }
.speaking-photo[hidden] { display: none; }
.speaking-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--line);
  border-radius: 18px;
  box-shadow: 4px 4px 0 var(--accent-neutral);
}
.speaking-event  { font-weight: 600; }
.speaking-detail { font-size: var(--fs-small); color: var(--ct-muted-purple); margin-top: var(--sp-1); }
.speaking-credentials {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: var(--dash);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.speaking-credential { font-size: var(--fs-small); font-weight: 600; padding-left: var(--sp-5); position: relative; }
.speaking-credential::before { content: '—'; position: absolute; left: 0; color: var(--accent-neutral); }
.credential-badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-5); margin-top: var(--sp-5); }
.credential-badge { display: block; width: 110px; height: auto; }
.speaking-credential .inline-link { color: inherit; font-size: inherit; text-decoration-color: var(--accent-neutral); }
.speaking-credential .inline-link:hover { background: var(--ct-lavender-bg); }

/* ============================================================
   NOW
============================================================ */
.now-updated { font-size: var(--fs-small); font-weight: 600; color: var(--ct-muted-purple); margin-top: calc(-1 * var(--sp-5)); margin-bottom: var(--sp-5); }
.now-list li {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-normal);
  padding: var(--sp-4) 0 var(--sp-4) var(--sp-7);
  border-bottom: var(--dash);
  position: relative;
}
.now-list li:last-child { border-bottom: none; }
.now-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: calc(var(--sp-4) + 0.45em);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--tone);
  border: 1.5px solid var(--ink);
}

/* ============================================================
   CONNECT
============================================================ */
.contact-form {                       /* a card, like the writing + speaking cards */
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  background: #fff;
  border: var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-7);
  margin-bottom: var(--sp-8);
}
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-submit {                     /* outline button: fills on hover / press / keyboard focus */
  align-self: flex-start;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: var(--line);
  border-radius: var(--r-btn);
  padding: 13px 26px;
  cursor: pointer;
  transition: transform 220ms var(--ease-pop), background 180ms, color 180ms;
}
.contact-submit:hover,
.contact-submit:focus-visible {
  background: var(--ink);
  color: var(--ct-cream);
  transform: translate(-2px, -2px);
}
.contact-submit:focus-visible { outline: 3px solid var(--w-green); outline-offset: 3px; }
.contact-submit:active {              /* pressed: stays filled, sinks into its shadow */
  background: var(--ink);
  color: var(--ct-cream);
  transform: translate(2px, 2px);
}
.contact-submit:disabled { opacity: 0.6; cursor: progress; transform: none; }
.form-status { margin: 0; font-size: var(--fs-small); font-weight: 600; line-height: 1.5; padding: var(--sp-3) var(--sp-4); border: var(--line); border-radius: 12px; }
.form-status[hidden] { display: none; }
.contact-form.is-sent > :not(.form-status) { display: none; }
.form-status[data-state="success"] { background: var(--w-green-tint); color: var(--w-green-ink); }
.form-status[data-state="error"]   { background: var(--w-red-tint);   color: var(--w-red-ink); }
.connect-links { display: flex; flex-wrap: wrap; gap: var(--sp-6); padding-top: var(--sp-6); border-top: var(--dash); }

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  /* Gradient border: purple fill clipped to the padding box, gradient behind the border */
  border: 4px solid transparent;
  border-bottom: 0;
  background:
    linear-gradient(315deg, rgba(150, 209, 170, 0.6), rgba(150, 209, 170, 0.6) 0%, transparent 35%) padding-box,
    linear-gradient(var(--ct-purple), var(--ct-purple)) padding-box,
    var(--gradient-bar) border-box;
  padding: var(--sp-11) var(--sp-7);
  border-radius: 40px 40px 0 0;
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}
.footer-brand { display: flex; align-items: center; gap: var(--sp-3); }
.footer-icon { width: 28px; height: 28px; }
/* same face as the nav logotype (.dn-logotype) */
.footer-name { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; color: var(--ct-cream); }
.footer-link { font-size: var(--fs-small); color: var(--ct-cream); transition: color 200ms; }
.footer-link:hover { color: var(--ct-lavender-text); text-decoration: underline; text-underline-offset: 3px; }
.footer-ct-link { display: flex; align-items: center; gap: var(--sp-2); transition: opacity 200ms; }
.footer-ct-link:hover { opacity: 0.8; }
.footer-ct-link .wm-cmd,
.footer-ct-link .wm-tab  { color: var(--ct-cream); }
.footer-ct-link .wm-plus { color: var(--w-green); }
.footer-arrow { font-size: var(--fs-small); color: var(--w-green); }

/* ============================================================
   READING TEXT — body font
============================================================ */
.about-body p,
.hero-subline,
.work-intro,
.work-card-desc,
.writing-desc,
.speaking-intro p:not(.speaking-lead),
.now-list li {
  font-family: var(--font-body);
  font-variation-settings: 'SOFT' 60;   /* Fraunces: rounder, friendlier terminals */
}
/* Display fonts have no true italic — use a marker highlight instead */
.speaking-lead em {
  font-style: normal;
  background: linear-gradient(transparent 62%, var(--highlight) 62%);
}

/* ============================================================
   MOTION — a small springy bounce, HERO ONLY
   The hero eases in on load using --ease-pop (a curve that overshoots
   slightly, then settles). Entrances animate the independent `translate`
   / `scale` properties so they never fight the `transform` hover effects.
   Switched off for prefers-reduced-motion (see the end of this file).
============================================================ */
@keyframes rise {                       /* gentle pop up into place */
  from { opacity: 0; translate: 0 24px; scale: 0.97; }
  to   { opacity: 1; translate: 0 0;    scale: 1; }
}
@keyframes pop {                        /* bigger pop for the photo */
  from { opacity: 0; translate: 0 18px; scale: 0.86; }
  to   { opacity: 1; translate: 0 0;    scale: 1; }
}

/* Staggered entrance on load */
.hero-image { animation: pop  800ms 120ms var(--ease-pop) both; }
.hero-name  { animation: rise 650ms  80ms var(--ease-pop) both; }
.hero-subline { animation: rise 650ms 220ms var(--ease-pop) both; }
.hero-links { animation: rise 650ms 340ms var(--ease-pop) both; }

/* Click burst (burst.js): short lines shoot out from the click point and fade.
   Each line gets its own angle / length / distance / color via custom properties. */
.burst { position: fixed; z-index: 300; width: 0; height: 0; pointer-events: none; }
.burst i {
  position: absolute;
  left: -2px;
  top: calc(var(--len) / -2);
  width: 4px;
  height: var(--len);
  border-radius: 4px;
  background: var(--c);
  opacity: 0;
  animation: burst-line 560ms cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
@keyframes burst-line {
  0%   { opacity: 1; transform: rotate(var(--a)) translateY(calc(var(--r0) * -1)) scaleY(0.5); }
  55%  { opacity: 1; transform: rotate(var(--a)) translateY(calc(var(--r1) * -1)) scaleY(1); }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--r1) * -1 - 12px)) scaleY(0.4); }
}
/* ============================================================
   DESKTOP (721px+): bar hides until you scroll past the headline;
   hero is a touch smaller (was 96px padding / 85vh / 84px name / 354px photo)
============================================================ */
@media (min-width: 721px) {
  .site-header.bar-hidden { opacity: 0; transform: translateY(-100%); pointer-events: none; }
  /* keyboard users: tabbing into the hidden nav reveals it */
  .site-header.bar-hidden:focus-within { opacity: 1; transform: none; pointer-events: auto; }

  .section-hero { padding-top: var(--sp-10); padding-bottom: var(--sp-10); min-height: 74vh; }
  .hero-name { font-size: clamp(44px, 6.4vw, 76px); }
  .hero-image { width: 100%; max-width: 320px; justify-self: end; }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 720px) {
  /* Nav collapses into a hamburger; links drop down as a panel */
  .nav-toggle { display: inline-flex; }
  .header-inner { padding: 0 var(--sp-5); }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: var(--sp-2) var(--sp-5) var(--sp-4);
    background: var(--ct-cream);
    border-bottom: var(--line);
    box-shadow: 0 10px 0 rgba(61, 34, 96, 0.06);
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav a {
    font-size: 20px;
    font-weight: 700;
    padding: var(--sp-4) 0;
    border-bottom: var(--dash);
  }
  .site-nav a:last-child { border-bottom: none; }
  .site-nav a:hover { border-bottom-color: rgba(61, 34, 96, 0.28); color: var(--accent-neutral); }

  /* The header bar is out of the page flow on phones, so hiding it leaves no
     empty strip. While the hero headline is on screen (.bar-hidden) only the
     hamburger shows; the bar fades back in after you scroll past it, or as
     soon as the menu is opened. */
  .site-header::after { transition: opacity 220ms; }
  .site-header.bar-hidden:not(.is-open) {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    pointer-events: none;                       /* don't block taps on the hero beneath */
  }
  .site-header.bar-hidden:not(.is-open)::after { opacity: 0; }
  .site-header.bar-hidden:not(.is-open) .nav-toggle { pointer-events: auto; }
  .site-header.bar-hidden:not(.is-open) .dn-logotype { opacity: 0; visibility: hidden; transform: translateY(-6px); }

  /* Tighter hero on phones: no forced 85vh, less padding, closer photo -> headline */
  .section-hero { min-height: 0; padding-top: var(--sp-7); padding-bottom: var(--sp-9); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-7); }
  .hero-image { order: -1; }
  /* Headshot: always a square (the exact shape of the square crop, so
     nothing is cut off — whole face + shoulders at every size), and never
     taller than 1/3 of the screen. The 24px allowance covers the tilt
     (~8px at this size) + the 8px offset shadow, so the whole visible
     footprint stays inside a third. */
  .hero-image-placeholder {
    --photo-h: calc(100vh / 3 - 24px);
    --photo-h: calc(100svh / 3 - 24px);
    aspect-ratio: 1 / 1;
    width: min(100%, var(--photo-h));
    height: auto;
    transform: rotate(1.5deg);
    box-shadow: 8px 8px 0 var(--w-lilac);
  }
  .hero-image-placeholder.has-photo img { object-position: 50% 50%; }   /* square in, square out: no crop */
  .section-hero::before { width: 260px; height: 260px; }

  .work-grid, .speaking-grid { grid-template-columns: 1fr; }
  .work-card { box-shadow: 6px 6px 0 var(--tone); }
  .writing-item { padding: var(--sp-5); box-shadow: 4px 4px 0 var(--tone); }
  .contact-form { padding: var(--sp-5); box-shadow: 4px 4px 0 var(--accent-neutral); }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: var(--sp-5); }
}
/* ============================================================
   CAREER JOURNEY (About) — stepper + SVG, driven by journey.js
============================================================ */
.journey {
  --j-line: var(--accent-neutral);
  margin-top: var(--sp-8);
  padding: var(--sp-5);
  border: var(--line);
  border-radius: var(--r-card);
  background: #fff;
  box-shadow: 8px 8px 0 var(--w-lilac);
}
.journey-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 0 0 var(--sp-3); }
.journey-scroll { overflow-x: auto; }
.journey-svg { display: block; width: 100%; height: auto; }   /* scales to the card at any width; journey.js sets --j-fs / --j-fs-s so text never drops below ~11px */
.journey-svg text { font-family: var(--font-ui); fill: var(--ink); dominant-baseline: central; text-anchor: middle; }
.journey-svg .j-label { font-size: calc(var(--j-fs, 14) * 1px); font-weight: 600; }
.journey-svg .j-small { font-size: calc(var(--j-fs-s, 13) * 1px); fill: var(--accent-neutral); }
.journey-svg .j-small--left { text-anchor: start; }
.j-base line, .j-dash, #j-prog { stroke: var(--j-line); stroke-width: 3; }
.j-dash { stroke-dasharray: 3 6; stroke-linecap: round; opacity: .35; }
#j-prog { stroke-width: 5.5; }
.j-node { stroke: var(--ink); transition: stroke-width .3s; }
.j-node--gray { fill: #D9D5CE; stroke-width: 1.5; }
.j-node--phase { fill: var(--w-lilac-tint); stroke: var(--w-lilac-ink); }
.j-node--kellogg { fill: var(--w-green); stroke: var(--w-green-ink); }
.j-next { fill: none; stroke: var(--accent-neutral); stroke-width: 2; stroke-dasharray: 4 3; }
.j-arc { fill: none; stroke: var(--j-line); stroke-width: 1.5; stroke-linecap: round; }
.j-hcdbox { fill: none; stroke: var(--w-green-ink); stroke-dasharray: 0.1 5; stroke-linecap: round; transition: stroke-width .3s; }
.journey-svg .j-label--tag { text-anchor: start; fill: var(--w-green-ink); }
.j-row { fill: var(--w-lilac-tint); stroke: var(--w-lilac-ink); stroke-width: .5; }
.j-knock { fill: #fff; }              /* opaque discs behind the phase circles so the line passes behind them */
.j-it { transition: opacity .3s; }
.j-pg { transition: opacity .3s; }

/* Compact (narrow card, set by journey.js): the four skill rows under the timeline
   move out of the SVG into a wrapping list of chips, and a few labels are nudged
   apart because their text is drawn larger to stay readable. */
.journey-rows { display: none; flex-wrap: wrap; gap: 6px; margin: var(--sp-2) 0 var(--sp-3); }
.journey-chip {
  font: 600 13px var(--font-ui);
  padding: 5px 11px;
  border-radius: 10px;
  background: var(--w-lilac-tint);
  border: 0.5px solid var(--w-lilac-ink);
  color: var(--w-lilac-ink);
}
.journey.is-compact .journey-rows { display: flex; }
.journey.is-compact .j-rowg { display: none; }
@media (max-width: 420px) {              /* dots get their own row (iPhone 17 is 402px wide) so Back / Next never overflow */
  .journey-nav { flex-wrap: wrap; }
  .journey-nav .journey-dots { order: -1; flex: 1 1 100%; }   /* higher specificity: the base .journey-dots rule comes later in the file */
  .journey-nav .journey-btn:first-of-type { margin-right: auto; }
}
@media (max-width: 480px) {
  .journey { padding: var(--sp-4); }
  .journey-btn { padding: 6px 12px; }
  .journey-nav .journey-dot { flex: 1 1 0; max-width: 44px; width: auto; }   /* 6 dots share the row, up to a 44px-wide target each */
  .journey-btn { min-height: 44px; }
  .jp-trail .jp-trail-btn { min-height: 44px; }
}

.journey-nav { display: flex; align-items: center; gap: 10px; margin: var(--sp-3) 0; }
.journey-btn {
  font: 600 14px var(--font-ui);
  min-height: 44px;                 /* comfortable touch target */
  padding: 6px 18px;
  border: var(--line);
  border-radius: var(--r-btn);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.journey-btn:hover:not(:disabled) { background: var(--w-lilac-tint); }
.journey-btn:disabled { opacity: .4; cursor: default; }
.journey-dots { display: flex; flex: 1; justify-content: center; }
/* Each step dot is a 28x44 tap target; the visible 12px circle is drawn by ::before */
.journey-dots { gap: 0; }
.journey-dot { position: relative; width: 28px; height: 44px; border: 0; background: transparent; padding: 0; cursor: pointer; }
.journey-dot::before { content: ''; position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; box-sizing: border-box; }
.journey-dot.is-past::before { background: var(--w-lilac); }
.journey-dot.is-on::before { background: var(--ink); }
.journey-btn:focus-visible,
.journey-dot:focus-visible { outline: 3px solid var(--w-green-ink); outline-offset: 2px; border-radius: 12px; }

.journey-panel { border: var(--dash); border-radius: 12px; padding: var(--sp-4) var(--sp-5); background: var(--sand); }
.journey-panel p { margin: 0 0 var(--sp-2); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
.journey-panel .jp-step { font: 600 13px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-neutral); margin: 0 0 var(--sp-1); }
.journey-panel .jp-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin: 0; }
.journey-panel .jp-sub { font-family: var(--font-ui); font-size: 14px; color: var(--accent-neutral); margin-bottom: var(--sp-3); }
.journey-panel .jp-note { color: var(--w-green-ink); font-weight: 600; }
.jp-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.jp-trail { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--sp-4) 0 0; padding: 0; list-style: none; }
.jp-trail-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 14px 4px 5px;
  font: 600 14px var(--font-ui); color: var(--ink); background: #fff; border: 2px solid var(--ink);
  border-radius: 999px; cursor: pointer; transition: background 160ms, transform 200ms var(--ease-pop);
}
.jp-trail-btn:hover { background: var(--w-lilac-tint); transform: translateY(-1px); }
.jp-trail-btn:focus-visible { outline: 3px solid var(--w-green-ink); outline-offset: 2px; }
.jp-trail-n {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--w-lilac); font: 700 13px var(--font-ui); color: var(--ink);
}
.jp-pill { font: 600 13px var(--font-ui); padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--rule-strong); color: var(--accent-neutral); }
.jp-pill--phase { background: var(--w-lilac-tint); color: var(--w-lilac-ink); border-color: var(--w-lilac); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .hero-image-placeholder { transform: none !important; }
  .nav-toggle, .nav-toggle-bars span { transition: none !important; }
  *, *::before, *::after { animation: none !important; }
  .hero-cta:hover, .work-card:hover, .writing-item:hover,
  .contact-submit:hover, .contact-submit:active { transform: none !important; }
}

/* ---- Keyboard focus for links and cards that had only the browser default ---- */
.hero-cta:focus-visible,
.work-card:focus-visible,
.writing-cta:focus-visible,
.connect-link:focus-visible,
.inline-link:focus-visible,
.archive-title:focus-visible { outline: 3px solid var(--w-green-ink); outline-offset: 3px; border-radius: 6px; }
.footer-link:focus-visible { outline: 3px solid var(--w-green); outline-offset: 3px; border-radius: 4px; }


/* ============================================================
   CONNECT: the fill-in-the-blank form (markup in index.html, behavior in site.js -> initMadlib)
   The prompt is a letter in the reading serif; whatever the visitor writes is set in the display
   face with a marker swipe, so prompt and answer never blur, and neither is mistaken for a heading.
============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mad { max-width: 900px; margin: 0 auto; padding: var(--sp-11) var(--sp-7) var(--sp-12); }
.mad .section-heading { margin-bottom: var(--sp-8); }
/* the card's highlighter swipe hangs ~11px below it; leave room so the links never crowd it */
.mad .connect-links { margin-top: var(--sp-8); padding-top: 0; }
.madlib { --bt: color-mix(in srgb, var(--accent-neutral) 55%, #fff); display: block; padding: clamp(24px, 5vw, 56px); margin-bottom: 0; }
.madlib[data-tone="gold"]   { --bt: var(--w-maple); }
.madlib[data-tone="green"]  { --bt: var(--w-green); }
.madlib[data-tone="purple"] { --bt: var(--w-lilac); }
.madlib[data-tone="red"]    { --bt: var(--w-red); }
.madlib[data-tone="ink"]    { --bt: color-mix(in srgb, var(--ink) 38%, #fff); }
.madlib[data-tone="neutral"] { --bt: color-mix(in srgb, var(--accent-neutral) 55%, #fff); }
.madlib-fields { border: 0; padding: 0; margin: 0; min-width: 0; }

.mad-sentence {
  font-family: var(--font-body);
  font-weight: 450;
  font-size: clamp(26px, 3.7vw, 46px);
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 var(--sp-6);
  max-width: 22em;
}
.mad-sentence + .mad-sentence { margin-top: var(--sp-6); }
.nw { white-space: nowrap; }

/* the blank: a pencil underline that becomes a marker swipe once filled */
.blank {
  display: inline-block;
  vertical-align: baseline;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: inherit;
  letter-spacing: -0.02em;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 3px dashed color-mix(in srgb, var(--ink) 55%, transparent);
  border-radius: 0;
  padding: 0 0.12em;
  margin: 0 0 0 0.1em;
  min-width: 4.2em;
  field-sizing: content;
  outline: none;
  transition: background-color 180ms, border-color 180ms;
}
.blank--email { min-width: 7em; }
.blank::placeholder { font-family: var(--hand, 'Patrick Hand', cursive); font-weight: 400; letter-spacing: 0; color: color-mix(in srgb, var(--ink) 80%, transparent); }
.blank:hover { background: color-mix(in srgb, var(--bt) 22%, transparent); }
.blank:focus, .blank:focus-visible { background: color-mix(in srgb, var(--bt) 45%, transparent); border-bottom-style: solid; border-color: var(--ink); }
.blank.is-filled { border-bottom-style: solid; border-color: var(--ink); background: linear-gradient(transparent 58%, color-mix(in srgb, var(--bt) 62%, transparent) 58%); }
.blank.is-filled:focus { background: color-mix(in srgb, var(--bt) 45%, transparent); }
.blank--select { cursor: pointer; text-align: left; }
.blank--select .car { display: inline-block; margin-left: .18em; font-size: .6em; transform: translateY(-.08em); }
.blank--select:not(.is-filled) { color: color-mix(in srgb, var(--ink) 80%, transparent); font-family: var(--hand, 'Patrick Hand', cursive); font-weight: 400; letter-spacing: 0; }
.blank:disabled { opacity: .5; }

/* topic picker: with JS the native <select> stays in the form (it is what gets submitted) but is hidden,
   and a large popover takes its place. Without JS the select is simply the blank. */
.pick { position: relative; }
.madlib.is-enhanced .blank--native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; min-width: 0; }
.pick-list {
  position: absolute; z-index: 20; left: 0; top: calc(100% + 14px);
  display: block; margin: 0; padding: 10px; width: min(440px, 86vw); white-space: normal;
  background: #fff; border: 2px solid var(--ink); border-radius: 22px; box-shadow: 8px 8px 0 var(--accent-neutral);
}
.pick-list[hidden] { display: none; }
/* an open list floats above the sticky note below it */
.mad-sentence:has(.blank--select[aria-expanded="true"]) { position: relative; z-index: 30; }
.pick-li { display: block; margin: 0; --bt: color-mix(in srgb, var(--accent-neutral) 55%, #fff); }
.pick-li[data-tone="ink"] { --bt: var(--ink); }
.pick-li[data-tone="gold"]   { --bt: var(--w-maple); }
.pick-li[data-tone="green"]  { --bt: var(--w-green); }
.pick-li[data-tone="purple"] { --bt: var(--w-lilac); }
.pick-li[data-tone="red"]    { --bt: var(--w-red); }
.pick-li[data-tone="neutral"] { --bt: color-mix(in srgb, var(--accent-neutral) 55%, #fff); }
.pick-opt {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  font: 700 clamp(20px, 2.4vw, 26px)/1.2 var(--font-display); color: var(--ink);
  background: none; border: 0; border-radius: 14px; padding: 12px 14px; min-height: 52px; cursor: pointer;
}
.pick-opt small { margin-left: auto; font: 500 14px var(--font-ui); color: var(--accent-neutral); letter-spacing: 0; }
.pick-opt:hover, .pick-opt[aria-selected="true"] { background: color-mix(in srgb, var(--bt) 30%, #fff); }
.pick-opt i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); background: var(--bt); flex: none; }
.pick-opt:focus-visible { outline: 3px solid var(--w-green-ink); outline-offset: -3px; }

.mad-follow { animation: rise 420ms var(--ease-pop) both; }
.mad-follow[hidden] { display: none; }

.mad-extra { margin: var(--sp-7) 0; max-width: 520px; }
.sticky { display: block; position: relative; background: var(--st-gold, #FFF176); color: var(--ink); padding: 22px 24px 18px; rotate: -0.8deg;
  box-shadow: 1px 2px 3px rgba(61,34,96,.16), 4px 8px 16px rgba(61,34,96,.12); }
.sticky::before { content: ''; position: absolute; top: -11px; left: 50%; translate: -50% 0; width: 64px; height: 20px; background: rgba(255,255,255,.55); box-shadow: 0 1px 2px rgba(61,34,96,.14); }
.sticky label { display: block; font: 400 25px var(--hand, 'Patrick Hand', cursive); margin-bottom: 6px; }
.sticky textarea { width: 100%; min-height: 110px; background: transparent; border: 0; resize: vertical; font: 400 22px/1.5 var(--font-body); color: var(--ink); outline: none; }
.sticky:focus-within { outline: 3px solid var(--w-green-ink); outline-offset: 4px; }

.mad-send-row { display: flex; align-items: center; gap: var(--sp-6); flex-wrap: wrap; }
.madlib .mad-send { font: 700 clamp(20px, 2.2vw, 26px)/1 var(--font-display); padding: 20px 34px; min-height: 64px; border-radius: var(--r-btn); }
/* the shadow is the hand-drawn highlighter swipe (::after in sketch.css), colored by the topic via --tone; no hard box-shadow here */
.madlib .mad-send { --tone: var(--bt); }
.madlib .mad-send::after { --ox: 7px; --oy: 8px; }
.madlib .mad-send:hover:not(:disabled)::after, .madlib .mad-send:focus-visible::after { --ox: 9px; --oy: 10px; }
.madlib .mad-send:disabled { opacity: .55; cursor: not-allowed; }
.madlib .mad-send:disabled::after { --ox: 4px; --oy: 5px; }
.mad-left { font: 400 20px var(--hand, 'Patrick Hand', cursive); color: var(--accent-neutral); }
.madlib .form-status { margin-top: var(--sp-6); }

@media (max-width: 560px) {
  .mad { padding: var(--sp-9) var(--sp-5) var(--sp-10); }
  .mad-sentence { font-size: 27px; }
  .blank { min-width: 3.6em; }
  .pick-list { left: -8px; width: calc(100vw - 64px); }
  .madlib .mad-send { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .mad-follow { animation: none; } }
