/* ============ LORISCA CESSIA — v2 ============
   Bold grotesque display · 12-col grid · hard section bands
   Palette: white / mist / deep slate / steel / slate blue
   Type: Archivo (display) · Plus Jakarta Sans (body) · Martian Mono (micro-labels only)
   ============================================================ */

:root {
  --white: #ffffff;
  --mist: #eef2f6;
  --mist-deep: #e2e9f0;
  --ink: #1e2d42;          /* 13.9:1 on white */
  --steel: #4a6a8f;        /* 5.6:1 on white — secondary text */
  --accent: #5b7fa6;       /* large/bold + interactive accents only */
  --hairline: #d5dfe8;     /* structural rules, never text */
  --display: "Archivo", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(4.5rem, 10vw, 9rem);
  --measure: 66ch;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--steel); }
::selection { background: var(--ink); color: var(--white); }
h1 em, h2 em { font-style: normal; color: var(--accent); }

/* ---------- 12-col page grid ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: .9rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark {
  font-family: var(--display); font-weight: 800; font-size: 1.05rem;
  letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
  display: flex; align-items: baseline; gap: .7rem;
}
.wm-name { white-space: nowrap; }
.wm-role {
  font-family: var(--mono); font-size: .6rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel);
  border-left: 2px solid var(--hairline); padding-left: .7rem;
}
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a { font-size: .86rem; font-weight: 600; color: var(--steel); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }

/* ---------- Type utilities ---------- */
.eyebrow {
  font-family: var(--mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
  display: flex; align-items: center; gap: .7rem;
  margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 3px; background: var(--ink); flex: none; }
.lede { font-size: 1.12rem; line-height: 1.7; color: var(--steel); max-width: var(--measure); }
.mono { font-family: var(--mono); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-weight: 700; font-size: .92rem;
  padding: .8rem 1.5rem; border-radius: 10px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
}
.btn.primary { background: var(--ink); color: var(--white); }
.btn.primary:hover { background: #2a3d58; }
.btn.ghost { border-color: var(--hairline); color: var(--ink); background: var(--white); }
.btn.ghost:hover { border-color: var(--ink); }
.cta-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.text-link { font-weight: 700; color: var(--steel); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- Sections & bands ---------- */
.section { padding: var(--section-pad) 0; }
.band { background: var(--mist); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.band > .wrap { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }

.section-head {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem;
  margin-bottom: 3rem; align-items: end;
}
.section-head .sh-main { grid-column: 1 / 9; }
.section-head .sh-side {
  grid-column: 9 / 13; color: var(--steel); font-size: .95rem; line-height: 1.6;
  border-left: 3px solid var(--hairline); padding-left: 1.2rem;
}
.section-head h2 {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(2.1rem, 4.5vw, 3.2rem); line-height: 1.02;
}

/* ---------- Hero (7/5 split) ---------- */
.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem; align-items: start; }
.hero-copy { grid-column: 1 / 8; }
.hero-side { grid-column: 8 / 13; }
/* Home hero runs full measure: the right-now card is gone */
body[data-page="home"] .hero-copy { grid-column: 1 / 10; }
.hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.9rem, 7vw, 5.4rem);
  letter-spacing: -0.035em; line-height: 0.98;
  margin: 0 0 1.4rem;
}
body[data-page="home"] .hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.12;
}
.hero-subtitle {
  font-family: var(--mono); font-size: .85rem; font-weight: 500;
  letter-spacing: .04em; color: var(--steel);
  margin: -0.55rem 0 1.5rem;
}
.hero .lede { font-size: 1.15rem; }
.metric-line {
  margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--hairline);
  font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
}
.metric-line span { color: var(--steel); font-family: var(--body); font-weight: 500; font-size: .95rem; }

/* Now-card: the hero's 5-col side */
.now-card {
  border: 1px solid var(--hairline); border-radius: 14px; background: var(--white);
  padding: 1.6rem; position: sticky; top: 5.5rem;
}
.now-card .nc-title {
  font-family: var(--display); font-weight: 800; font-size: 1.1rem;
  letter-spacing: -0.02em; margin-bottom: 1.1rem;
}
.nc-row {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: .8rem;
  padding: .7rem 0; border-top: 1px solid var(--hairline); font-size: .92rem;
}
.nc-row .k { font-family: var(--mono); font-size: .64rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); padding-top: .2rem; }
.nc-row .v { line-height: 1.55; }
.nc-row .v a { color: var(--steel); font-weight: 600; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 1.5rem; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden;
  background: var(--white); display: flex; flex-direction: column;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--ink); transform: translateY(-3px); }
.card-visual { aspect-ratio: 16 / 9; overflow: hidden; background: var(--mist); border-bottom: 1px solid var(--hairline); }
.card-visual img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.6rem 1.6rem 1.2rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.badge {
  align-self: flex-start; font-family: var(--mono); font-size: .64rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  background: var(--ink); color: var(--white); border-radius: 999px; padding: .32rem .8rem;
}
.card-h { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1.12; }
.card-hook { color: var(--steel); font-size: .98rem; line-height: 1.6; }
.card-metric {
  font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: -0.01em;
  padding-top: .6rem; border-top: 1px solid var(--hairline); margin-top: auto;
}
.card-links { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: .7rem; }
.card-links a { font-size: .85rem; font-weight: 700; color: var(--steel); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.card-toggle {
  margin: 0 1.6rem 1.4rem; align-self: flex-start;
  font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  background: none; border: 1px solid var(--hairline); border-radius: 8px;
  padding: .6rem 1rem; color: var(--ink); cursor: pointer;
}
.card-toggle:hover { border-color: var(--ink); }
.card-detail { display: none; padding: 0 1.6rem 1.6rem; }
.card.open .card-detail { display: block; }
.diagram { border: 1px solid var(--hairline); border-radius: 10px; background: var(--mist); margin-bottom: 1.2rem; }
.detail-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--hairline); }
.detail-row .k { font-family: var(--display); font-weight: 700; font-size: .92rem; }
.detail-row .v { color: var(--steel); font-size: .95rem; line-height: 1.6; }

/* ---------- Page hero ---------- */
.page-hero { padding: clamp(3rem, 7vw, 5.5rem) 0 0; }
.page-hero h1 {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.035em;
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 0.98; margin-bottom: 1.2rem;
}
.lane-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.lane-head .eyebrow { margin-bottom: 0; }
.lane-org { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); }

/* ---------- Pipeline strip ---------- */
.pipeline {
  margin-top: 2.5rem; padding-top: 1.8rem; border-top: 1px solid var(--hairline);
  display: grid; grid-template-columns: 10rem 1fr; gap: 1.2rem; align-items: baseline;
}
.pipeline strong { font-family: var(--display); font-weight: 800; font-size: 1rem; letter-spacing: -0.01em; }
.pipeline span { color: var(--steel); font-size: .95rem; line-height: 1.6; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem; }
.about-main { grid-column: 1 / 8; }
.about-side { grid-column: 9 / 13; }
.portrait { aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--mist-deep); border: 1px solid var(--hairline); position: sticky; top: 5.5rem; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.chapter { margin-bottom: 2.4rem; }
.chapter .k {
  display: block; font-family: var(--mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel); margin-bottom: .5rem;
}
.chapter h3 { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: .7rem; }
.chapter p { color: var(--steel); line-height: 1.7; margin-bottom: 1rem; max-width: var(--measure); }
.chapter p strong { color: var(--ink); }

/* Route timeline */
.route { border-left: 3px solid var(--ink); margin: 1rem 0 0 .4rem; }
.stop { position: relative; padding: 0 0 2rem 1.8rem; }
.stop::before {
  content: ""; position: absolute; left: -8px; top: 6px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--ink);
}
.stop.now::before { background: var(--ink); }
.stop > button { all: unset; cursor: pointer; display: block; width: 100%; }
.stop .when { font-family: var(--mono); font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--steel); }
.stop .where { font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.stop .role { color: var(--steel); font-size: .95rem; margin-bottom: .4rem; }
.stop .detail { display: none; }
.stop.open .detail { display: block; }
.stop .detail ul { margin: .8rem 0 0 1.1rem; color: var(--steel); font-size: .95rem; line-height: 1.65; }
.stop .detail li { margin-bottom: .4rem; }

/* Method grid */
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.method { border: 1px solid var(--hairline); border-radius: 12px; padding: 1.8rem; background: var(--white); }
.method h3 { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; margin-bottom: .5rem; }
.method p { color: var(--steel); font-size: .95rem; line-height: 1.65; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--hairline); background: var(--white); }
.foot-inner {
  max-width: 1200px; margin: 0 auto; padding: 2.5rem var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.foot-inner .fine { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-copy, .hero-side { grid-column: 1 / 13; }
  body[data-page="home"] .hero-copy { grid-column: 1 / 13; }
  .now-card { position: static; }
  .section-head .sh-main, .section-head .sh-side { grid-column: 1 / 13; }
  .section-head .sh-side { border-left: none; border-top: 3px solid var(--hairline); padding: 1.2rem 0 0; }
  .cols-2, .cols-3, .method-grid { grid-template-columns: 1fr; }
  .about-main, .about-side { grid-column: 1 / 13; }
  .portrait { position: static; max-width: 420px; }
  .detail-row, .pipeline { grid-template-columns: 1fr; gap: .3rem; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: .8rem; }
  .wm-role { display: none; }
}

/* ---------- Obvious footer ---------- */
.site-footer { border-top: 2px solid var(--ink); background: var(--white); }
.site-footer .wrap { padding-top: 2.6rem; padding-bottom: 2.6rem; }
.foot-links { display: flex; gap: 1.7rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.foot-links a {
  font-family: var(--display); font-weight: 700; font-size: 1.02rem;
  letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
}
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.site-footer .fine {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--steel);
}

/* ---------- Pipeline index (shared with org sites) ---------- */
.pipeline-index { margin-top: 2.8rem; border-top: 2px solid var(--ink); padding-top: 1.6rem; }
.pipe-head {
  font-family: var(--display); font-weight: 800; font-size: 1.1rem;
  letter-spacing: -0.02em; margin-bottom: .6rem;
}
.pipe-note { color: var(--steel); font-size: .92rem; margin-bottom: 1rem; max-width: var(--measure); }
.pipe-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .75rem 0; border-bottom: 1px solid var(--hairline);
}
.pipe-title { font-weight: 600; font-size: .98rem; }
.pipe-status {
  font-family: var(--mono); font-size: .62rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--steel); white-space: nowrap;
}

/* ---------- Docs-style sub-navigation ---------- */
.subnav { border-top: 1px solid var(--hairline); background: rgba(255,255,255,.94); }
.subnav-inner {
  max-width: 1200px; margin: 0 auto; padding: .55rem var(--gutter);
  display: flex; gap: 1.5rem; overflow-x: auto;
}
.subnav-inner a {
  font-family: var(--mono); font-size: .66rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel);
  text-decoration: none; white-space: nowrap; padding: .2rem 0;
}
.subnav-inner a:hover { color: var(--ink); }
section[id], div[id] { scroll-margin-top: 104px; }

/* ---------- Off-the-clock cards ---------- */
.fun-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.5rem; }
.fun-card {
  border: 1px solid var(--hairline); border-radius: 14px;
  background: var(--white); padding: 2rem 1.6rem;
}
.fun-emoji { font-size: 2.6rem; margin-bottom: 1rem; line-height: 1; }
.fun-card h3 {
  font-family: var(--display); font-weight: 800; font-size: 1.3rem;
  letter-spacing: -0.02em; margin-bottom: .4rem;
}
.fun-card p { color: var(--steel); font-size: .95rem; line-height: 1.6; }
@media (max-width: 900px) { .fun-grid { grid-template-columns: 1fr; } }

/* ---------- Fun cards: photo + story ---------- */
.fun-card { overflow: hidden; }
.fun-photo { margin: -2rem -1.6rem 1.4rem; aspect-ratio: 16/10; overflow: hidden; background: var(--mist); }
.fun-photo img { width: 100%; height: 100%; object-fit: cover; }
.fun-story { margin-top: .8rem; color: var(--steel); font-size: .95rem; line-height: 1.65; }

/* ---------- Blog posts (off the clock) ---------- */
.post-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 640px) { .post-list { grid-template-columns: 1fr; } }
.post-card { border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden; background: var(--white); }
.post-photo { overflow: hidden; background: var(--mist); }
.post-photo img { width: 100%; height: auto; display: block; cursor: zoom-in; }
/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 34, .92); display: flex; align-items: center; justify-content: center; padding: 4vmin; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; }
.post-body { padding: 1.8rem; }
.post-meta { display: flex; gap: .8rem; align-items: center; margin-bottom: .7rem; }
.post-emoji { font-size: 1.6rem; line-height: 1; }
.post-date { font-family: var(--mono); font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); }
.post-body h3 { font-family: var(--display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.02em; margin-bottom: .5rem; }
.post-body > p { color: var(--steel); line-height: 1.65; }
.post-story { margin-top: .9rem; }
.embed-video { margin-top: 1.2rem; aspect-ratio: 16/9; }
.embed-video iframe { width: 100%; height: 100%; border: 0; border-radius: 10px; }
.embed-card { display: flex; gap: .7rem; align-items: center; margin-top: 1.2rem; padding: 1rem 1.2rem; border: 1px solid var(--hairline); border-radius: 10px; text-decoration: none; font-weight: 600; color: var(--ink); }
.embed-card:hover { border-color: var(--ink); }

/* involvement tiles — "in the field" mosaic */
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
@media (max-width: 640px) { .tile-grid { grid-template-columns: 1fr; } }
.tile { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4/3; background: var(--ink); }
.tile:has(img) { cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.tile:hover img { transform: scale(1.05); }
.tile-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.8); font-family: var(--display); font-weight: 800; font-size: 4rem; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.6rem 1rem .9rem; background: linear-gradient(to top, rgba(12,19,31,.85), transparent); color: #fff; font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
/* lightbox figure + caption */
.lb-fig { margin: 0; max-width: min(92vw, 1100px); }
.lb-fig img { max-width: 100%; max-height: 80vh; border-radius: 12px; object-fit: contain; display: block; }
.lb-cap { margin-top: .8rem; color: #fff; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.lb-cap a { color: #fff; text-decoration: underline; text-underline-offset: 3px; margin-left: .8rem; letter-spacing: .12em; }

/* ============================================================
   DYNAMIC LAYER — motion system, dark mode, playful bits
   ============================================================ */

/* ---------- dark mode ---------- */
:root { --nav-bg: rgba(255,255,255,.94); }
[data-theme="dark"] {
  --white: #1e2d42;
  --mist: #26374d;
  --mist-deep: #2c3f57;
  --ink: #eef2f6;
  --steel: #9db0c4;
  --accent: #8fa9c9;
  --hairline: #3b4f68;
  --nav-bg: rgba(30,45,66,.94);
}
.nav, .subnav { background: var(--nav-bg); }
.theme-toggle {
  background: none; border: 1px solid var(--hairline); border-radius: 999px;
  width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center;
  color: var(--steel); cursor: pointer; flex: none;
  transition: color .2s ease, border-color .2s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); transform: rotate(24deg); }
[data-theme="dark"] .tile { background: var(--mist); }
[data-theme="dark"] .lightbox { background: rgba(10, 16, 26, .94); }

/* ---------- scroll reveals ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- cursor tilt ---------- */
.tilt { transition: transform .18s ease, border-color .18s ease, box-shadow .25s ease; will-change: transform; }
.tilt:hover { box-shadow: 0 18px 40px -16px rgba(30,45,66,.35); }

/* ---------- spring expands (replaces instant show/hide) ---------- */
.expandable { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s cubic-bezier(.3,.8,.2,1); }
.expandable > .expand-inner { overflow: hidden; min-height: 0; }
.card.open .card-detail.expandable, .stop.open .detail.expandable { grid-template-rows: 1fr; }
/* retire the old instant toggles */
.card-detail:not(.expandable) { display: none; }
.card.open .card-detail:not(.expandable) { display: block; }
.stop .detail:not(.expandable) { display: none; }
.stop.open .detail:not(.expandable) { display: block; }

/* ---------- sparkles ---------- */
[data-sparkles] { position: relative; display: inline-block; }
.sparkle {
  position: absolute; color: var(--accent); pointer-events: none;
  animation: sparkle-pop 760ms cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes sparkle-pop {
  0% { opacity: 0; transform: scale(.2) rotate(0deg); }
  45% { opacity: 1; transform: scale(1) rotate(90deg); }
  100% { opacity: 0; transform: scale(.3) rotate(180deg); }
}

/* ---------- like heart ---------- */
.like-heart {
  position: relative; display: inline-flex; align-items: center; gap: .6rem;
  background: none; border: 1px solid var(--hairline); border-radius: 999px;
  padding: .7rem 1.2rem; color: var(--steel); cursor: pointer;
  font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .12em;
}
.like-heart svg path {
  fill: color-mix(in srgb, var(--accent) calc(var(--fill, 0) * 100%), transparent);
  stroke: var(--accent);
  transition: fill .3s ease;
}
.like-heart:hover { border-color: var(--accent); color: var(--ink); }
.like-particle {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); pointer-events: none;
  animation: like-burst .65s ease-out forwards;
}
@keyframes like-burst {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.2); }
}

/* ---------- journey map ---------- */
.journey-map { position: relative; border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; background: var(--mist); }
.journey-map .map-canvas { width: 100%; height: 420px; }
.journey-legend { display: flex; gap: 1.4rem; flex-wrap: wrap; padding: .9rem 1.2rem; border-top: 1px solid var(--hairline); background: var(--white); }
.journey-legend span, .journey-legend .journey-stop { font-family: var(--mono); font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); display: flex; align-items: center; gap: .5rem; }
.journey-legend .journey-stop { background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
.journey-legend .journey-stop:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.journey-legend i { width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent); display: inline-block; }
.map-pin { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid var(--white); box-shadow: 0 2px 8px rgba(30,45,66,.4); cursor: pointer; }
@media (max-width: 640px) { .journey-map .map-canvas { height: 300px; } }

/* ---------- hannibal easter egg ---------- */
.hannibal { position: relative; display: inline-block; border-bottom: 2px dotted var(--accent); }
.hannibal-line { cursor: pointer; }
.hannibal img {
  position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%) scale(.6);
  width: 120px; border-radius: 10px; border: 1px solid var(--hairline);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
  background: var(--white); padding: 6px;
}
.hannibal:hover img, .hannibal:focus img, .hannibal.show img { opacity: 1; transform: translateX(-50%) scale(1); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .expandable { transition: none; }
  .tilt { transition: none; }
  .sparkle, .like-particle { display: none; }
  html { scroll-behavior: auto; }
}

/* ---------- About v3 blocks ---------- */
.tagline {
  margin-top: 1.4rem; font-family: var(--display); font-weight: 700;
  font-size: 1.25rem; letter-spacing: -0.01em; color: var(--accent);
}
.aside-card {
  border: 1px solid var(--hairline); border-radius: 12px; background: var(--white);
  padding: 1.5rem; margin-bottom: 1.5rem; position: sticky; top: 5.5rem;
}
.aside-card + .aside-card { position: static; }
.aside-card .k {
  display: block; font-family: var(--mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel); margin-bottom: .5rem;
}
.aside-card p { color: var(--steel); font-size: .95rem; line-height: 1.65; }
.aside-card p strong { color: var(--ink); }
.tool-list { list-style: none; margin: .4rem 0 0; padding: 0; }
.tool-list li {
  padding: .55rem 0; border-top: 1px solid var(--hairline);
  color: var(--steel); font-size: .95rem;
}
.tool-list li:first-child { border-top: none; }
.principle-block { text-align: center; max-width: 40rem; margin: 0 auto 3rem; }
.principle-latin {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.15; margin-bottom: .8rem;
}
.principle-trans { color: var(--steel); font-size: 1.05rem; margin-bottom: .5rem; }
.principle-note { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); }
.fieldnotes {
  text-align: center; color: var(--steel); font-size: 1rem;
  max-width: var(--measure); margin: 0 auto 3rem;
}
.offclock-teaser {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  border: 1px solid var(--hairline); border-radius: 14px; background: var(--white);
  padding: 1.8rem 2rem;
}
.offclock-teaser h3 { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; margin-bottom: .3rem; }
.offclock-teaser p { color: var(--steel); font-size: .95rem; }
@media (max-width: 900px) { .aside-card { position: static; } }

/* ---------- Selected work cards ---------- */
.sel-card .k {
  display: block; font-family: var(--mono); font-size: .66rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel); margin-bottom: .8rem;
}
.sel-big {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(2.6rem, 4.5vw, 3.6rem); line-height: 1; color: var(--accent);
}
.sel-label {
  font-family: var(--mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--steel);
  margin: .4rem 0 1rem;
}
.sel-card h3 { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; margin-bottom: .5rem; }
.sel-card p { color: var(--steel); font-size: .95rem; line-height: 1.65; margin-bottom: 1rem; }

/* ---------- route stop toggle affordance ---------- */
.stop-toggle {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: .7rem;
  font-family: var(--mono); font-size: .68rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
.stop-toggle .st-plus {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.4rem; height: 1.4rem; border-radius: 50%;
  border: 1.5px solid var(--accent); font-size: 1rem; line-height: 1;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), background .2s ease, color .2s ease;
}
.stop > button:hover .stop-toggle .st-plus { background: var(--accent); color: var(--white); }
.stop.open .stop-toggle .st-plus { transform: rotate(45deg); }

/* ---------- Search palette ---------- */
.nav-search {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--steel); display: inline-flex; align-items: center;
}
.nav-search:hover { color: var(--ink); }
.search-pal { display: none; }
.search-pal.open { display: block; }
.sp-backdrop {
  position: fixed; inset: 0; background: rgba(30, 45, 66, .45);
  z-index: 200; backdrop-filter: blur(2px);
}
.sp-box {
  position: fixed; z-index: 201; top: 12vh; left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100vw - 2.5rem));
  background: var(--white); border: 1px solid var(--hairline); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(30, 45, 66, .25); overflow: hidden;
}
.sp-input {
  width: 100%; border: none; border-bottom: 1px solid var(--hairline);
  padding: 1.1rem 1.3rem; font-family: var(--body); font-size: 1.05rem; color: var(--ink);
  outline: none; background: var(--white);
}
.sp-results { max-height: 46vh; overflow-y: auto; }
.sp-hit {
  display: block; padding: .9rem 1.3rem; text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
.sp-hit:last-child { border-bottom: none; }
.sp-hit:hover { background: var(--mist); }
.sp-t { display: block; font-family: var(--display); font-weight: 700; font-size: .98rem; color: var(--ink); }
.sp-s { display: block; font-size: .85rem; color: var(--steel); margin-top: .2rem; line-height: 1.5; }
.sp-empty { padding: 1.2rem 1.3rem; color: var(--steel); font-size: .9rem; margin: 0; }
body.sp-lock { overflow: hidden; }

/* ---------- Hero blurred background ---------- */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: -48px;
  background-size: cover; background-position: center 30%;
  filter: blur(28px) saturate(1.15);
  opacity: .45; pointer-events: none;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.88));
}
[data-theme="dark"] .hero-bg { opacity: .35; }
[data-theme="dark"] .hero-bg::after {
  background: linear-gradient(180deg, rgba(30,45,66,.85), rgba(30,45,66,.9));
}
.hero .wrap { position: relative; z-index: 1; }

/* ---------- section media: editor-added picture + links (data-driven) ---------- */
.sec-media { margin: 2rem 0 0; border-radius: 14px; overflow: hidden; }
.sec-media img { width: 100%; display: block; }
.sec-media figcaption { font-size: .85rem; color: var(--steel); margin-top: .6rem; }
.sec-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.25rem; }

/* ============================================================
   OFF THE CLOCK — Claude design implementation (Oct 2026)
   Design: claude.ai/design "Off the Clock" — re-implemented in
   site code. All copy stays admin-editable via data/off-the-clock.json,
   fun/posts.json, fun/tiles.json, fun/layout.json.
   ============================================================ */

/* ---------- hero ---------- */
.oc-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.2rem, 8.5vw, 6.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0.8rem 0 1.4rem;
}
.oc-title em { font-style: normal; color: var(--accent); }
.oc-hero-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.oc-hero-row .lede { margin: 0; max-width: 46ch; color: var(--steel); }
.oc-clock {
  display: flex; align-items: center; gap: 0.8rem; flex: none;
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 0.55rem 1.2rem 0.55rem 0.7rem; background: var(--white);
}
.oc-clock[hidden] { display: none; }
.oc-clock-face { color: var(--ink); flex: none; }
.oc-clock-txt { display: flex; flex-direction: column; line-height: 1.35; }
.oc-clock-txt .k {
  font-family: var(--mono); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel);
}
.oc-clock-txt strong { font-weight: 700; }

/* ---------- fun cards ---------- */
.fun-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem; align-items: start;
}
.fun-card {
  background: var(--white); border: 1px solid var(--hairline);
  border-radius: 20px; padding: 1.4rem 1.4rem 1.2rem;
  box-shadow: 0 10px 30px rgba(20, 35, 55, 0.07);
}
.fun-card.tilt-0 { rotate: -1.1deg; }
.fun-card.tilt-1 { rotate: 0.9deg; }
.fun-card.tilt-2 { rotate: -0.7deg; }
@media (max-width: 640px) {
  .fun-card.tilt-0, .fun-card.tilt-1, .fun-card.tilt-2 { rotate: none; }
}
.fun-top .post-meta { margin-bottom: 0.5rem; }
.fun-top h3 {
  font-family: var(--display); font-weight: 800; font-size: 1.35rem;
  letter-spacing: -0.01em; margin-bottom: 0.35rem;
}
.fun-top > p { color: var(--steel); line-height: 1.6; font-size: 0.95rem; }
.fun-photo { margin-top: 1rem; border-radius: 14px; overflow: hidden; background: var(--mist); }
.fun-photo img { width: 100%; height: auto; display: block; cursor: zoom-in; }
.fun-story-btn {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem;
  background: none; border: none; cursor: pointer; padding: 0.2rem 0;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel);
}
.fun-story-btn:hover { color: var(--ink); }
.fun-story-btn .plus {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.35rem; height: 1.35rem; border: 1px solid var(--hairline);
  border-radius: 50%; font-size: 0.9rem; line-height: 1;
}
.fun-story-panel { margin-top: 0.8rem; }
.fun-story-panel[hidden] { display: none; }
.fun-story-panel > p { color: var(--steel); line-height: 1.65; font-size: 0.95rem; }

/* ---------- involvement tiles (redesigned) ---------- */
.tile-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.9rem; align-items: start;
}
@media (max-width: 640px) {
  .tile-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.tile {
  position: relative; border-radius: 16px; overflow: hidden;
  background: #1e2d42; aspect-ratio: auto;
}
.tile-media { position: relative; }
.tile > img, .tile-media > img {
  width: 100%; height: auto; display: block; cursor: zoom-in;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tile:hover .tile-media > img { transform: scale(1.04); }
.tile-empty {
  position: static; inset: auto; min-height: 230px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: #1e2d42;
  font-family: var(--display); font-weight: 800; font-size: 4.5rem;
}
.tile-badge {
  position: absolute; top: 0.7rem; right: 0.7rem; z-index: 2;
  font-family: var(--mono); font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #fff; background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.3rem 0.65rem; border-radius: 999px;
}
.tile-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 2.4rem 3.2rem 0.9rem 1rem; color: #fff;
  background: linear-gradient(to top, rgba(12, 19, 31, 0.88), transparent);
  pointer-events: none;
}
.tile-cap strong {
  display: block; font-family: var(--display);
  font-weight: 800; font-size: 1.05rem;
}
.tile-cap span {
  display: block; font-family: var(--mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; margin-top: 0.25rem;
}
.tile-plus {
  position: absolute; right: 0.7rem; bottom: 0.7rem; z-index: 2;
  width: 2rem; height: 2rem; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.1rem; line-height: 1;
}
.tile-plus:hover { background: rgba(255, 255, 255, 0.3); }
.tile-panel { background: #1e2d42; padding: 1rem 1.1rem 1.2rem; }
.tile-panel[hidden] { display: none; }
.tile-panel p { font-size: 0.9rem; line-height: 1.65; color: #c9d6e4; }
.tile-panel .text-link { color: #fff; margin-top: 0.6rem; display: inline-block; }

/* ---------- slim footer (off the clock) ---------- */
.oc-footer .fine { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; }

/* first contact button filled, per the Off the Clock design */
#contact-row .btn:first-child {
  background: var(--ink); color: var(--white); border-color: transparent;
}
#contact-row .btn:first-child:hover { background: #2a3d58; }

/* ---------- Off the clock: fidelity fixes (Oct 7) ---------- */
/* spring easing + tilt values taken from the Claude design */
:root { --spring: cubic-bezier(.34,1.56,.64,1); }

/* photos fully visible at natural ratio — neutralize older cropped rules */
.fun-photo { margin: 1rem 0 0; aspect-ratio: auto; border-radius: 14px; overflow: hidden; background: var(--mist); }
.fun-photo img { width: 100%; height: auto; max-height: none; object-fit: contain; display: block; cursor: zoom-in; }

/* jiggle: resting tilt, hover straightens + lifts + pops on the spring */
.fun-card { rotate: none; transform: rotate(-2.5deg); transition: transform 550ms var(--spring), box-shadow 300ms ease; }
.fun-card.tilt-0 { rotate: none; transform: rotate(-2.5deg); }
.fun-card.tilt-1 { rotate: none; transform: rotate(1.8deg); }
.fun-card.tilt-2 { rotate: none; transform: rotate(-1.2deg); }
.fun-card:hover { transform: rotate(0deg) translateY(-8px) scale(1.02); box-shadow: 0 26px 50px -22px rgba(30,45,66,.45); }
.fun-emoji { display: inline-block; transition: transform 550ms var(--spring); }
.fun-card:hover .fun-emoji { transform: translateY(-10px) rotate(-14deg) scale(1.15); }

/* tiles: same spring lift as the design */
.tile { transition: transform 500ms var(--spring), box-shadow 300ms ease; }
.tile:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: 0 22px 44px -22px rgba(30,45,66,.5); }

@media (max-width: 640px) {
  .fun-card, .fun-card.tilt-0, .fun-card.tilt-1, .fun-card.tilt-2 { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fun-card, .fun-card:hover, .tile, .tile:hover { transform: none; transition: none; }
  .fun-card:hover .fun-emoji { transform: none; }
}

/* ---------- phones: let the top menu wrap instead of running off the screen ---------- */
@media (max-width: 640px) {
  .nav-inner { flex-wrap: wrap; row-gap: .55rem; }
  .wm-role { display: none; }
  .nav-links { flex-wrap: wrap; gap: .45rem 1rem; align-items: center; order: 2; width: 100%; }
  .nav-inner > .wordmark { flex: 1; }
  .nav-inner > .theme-toggle { order: 1; }
}
