/* ===== Public profile — playful storytelling =====
   Warm off-white, ink outlines with offset shadows, pastel blocks, one purple accent,
   Bricolage for headings, Caveat for handwritten notes. Every text colour passes WCAG AA. */
:root {
  --bg: #FAF8F4;
  --card: #FFFFFF;
  --text-2: #3B3850;
  --muted: #5B576C;
  --line: #E6E1D8;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage", "Inter", system-ui, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --b: 2px solid var(--ink);
  --pop: 6px 6px 0 var(--shade);
  --pop-sm: 4px 4px 0 var(--shade);
  --r: 26px;
  --paper: #FFFFFF;   /* white surfaces (dark grey in dark mode) */
  --on-ink: #FFFFFF;  /* text on an ink-coloured background */
  --shade: var(--ink); /* the offset shadows */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body::before { /* a whisper of paper grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
img { max-width: 100%; }
.ic { flex: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 200; border: var(--b); }
.skip:focus { left: 8px; }
.wrap { width: min(1180px, 100% - 48px); margin: 0 auto; }
.hand { font-family: var(--hand); font-weight: 600; }

/* pastel helpers */
.c1 { --pastel: var(--p1); } .c2 { --pastel: var(--p2); } .c3 { --pastel: var(--p3); } .c4 { --pastel: var(--p4); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; border: var(--b);
  font: 600 1rem var(--display); text-decoration: none; cursor: pointer; box-shadow: var(--pop-sm);
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shade); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shade); }
.btn.sm { padding: 8px 16px; font-size: .9rem; box-shadow: 3px 3px 0 var(--shade); }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ask { background: var(--p1); color: var(--ink); }
.btn-ask .ic { color: var(--accent); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-paper { background: var(--p3); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--band-fg); border-color: var(--band-fg); box-shadow: 4px 4px 0 color-mix(in srgb, var(--band-fg) 25%, transparent); }
.btn-ghost:hover { box-shadow: 6px 6px 0 color-mix(in srgb, var(--band-fg) 35%, transparent); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 80; background: var(--bg); transition: box-shadow .2s, border-color .2s; border-bottom: 2px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--ink); box-shadow: 0 6px 18px -12px rgba(28, 26, 46, .35); }
.topbar-in { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.brand-mono {
  width: 44px; height: 44px; justify-content: center; border: var(--b); border-radius: 50%; background: var(--p1);
  font: 800 1rem var(--display); letter-spacing: -.02em; box-shadow: 3px 3px 0 var(--shade); transition: transform .2s;
}
.brand-mono:hover { transform: rotate(-8deg); }
.brand-logo img { display: block; height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.no-brand .nav { margin-left: -14px; }
.nav { display: flex; gap: 4px; margin: 0 auto; min-width: 0; overflow: hidden; flex: 0 1 auto; }
.nav a { flex: none; white-space: nowrap; }
.nav a[hidden] { display: none; }
.nav a { padding: 7px 14px; border-radius: 999px; text-decoration: none; font: 600 .98rem var(--display); color: var(--text-2); transition: background .15s, color .15s; }
.nav a:hover { background: var(--p1); color: var(--ink); }
.nav a.active { background: var(--ink); color: var(--on-ink); }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang { display: inline-flex; border: var(--b); border-radius: 999px; overflow: hidden; background: var(--paper); }
.lang a { padding: 5px 12px; font: 700 .82rem var(--display); text-decoration: none; color: var(--ink); }
.lang a.on { background: var(--ink); color: var(--on-ink); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 48px 0 88px; overflow: hidden; isolation: isolate; }
.blob { position: absolute; z-index: -1; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; animation: morph 16s ease-in-out infinite; }
.hero .b1 { width: 620px; height: 620px; right: -140px; top: -120px; background: var(--p1); }
.hero .b2 { width: 360px; height: 360px; left: -150px; bottom: -120px; background: var(--p3); animation-duration: 20s; animation-direction: reverse; }
@keyframes morph {
  0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; transform: rotate(0); }
  33% { border-radius: 58% 42% 38% 62% / 55% 37% 63% 45%; transform: rotate(6deg); }
  66% { border-radius: 36% 64% 52% 48% / 62% 54% 46% 38%; transform: rotate(-4deg); }
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.hello { margin: 0 0 6px; font-size: 2rem; color: var(--accent); transform: rotate(-3deg); transform-origin: left; display: inline-flex; align-items: center; gap: 8px; }
.hello .wave { width: 44px; height: 22px; }
h1.big { margin: 0; font: 800 clamp(2.9rem, 6.6vw, 6rem)/.98 var(--display); letter-spacing: -.035em; min-height: 2.05em; text-wrap: balance; }
.t-word { position: relative; display: inline-block; color: var(--accent); white-space: nowrap; isolation: isolate; }
.typed.typing .t-text::after { content: ""; display: inline-block; width: .07em; height: .82em; margin-left: .05em; vertical-align: -.04em; background: var(--ink); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.intro { margin: 26px 0 0; font-size: 1.2rem; line-height: 1.6; color: var(--text-2); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.contact { margin: 24px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chip-ic, .chip-card {
  display: inline-grid; place-items: center; height: 44px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
  box-shadow: 3px 3px 0 var(--shade); text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.chip-ic { width: 44px; border-radius: 50%; }
.chip-card { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 999px; font: 600 .92rem var(--display); background: var(--p2); }
.chip-ic:hover, .chip-card:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--shade); background: var(--p1); }
.chip-ic:active, .chip-card:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--shade); }

/* Business card dialog */
.card-dlg { padding: 18px; border: 0; background: transparent; overflow: visible; max-width: calc(100vw - 16px); }
.card-dlg::backdrop { background: rgba(28, 26, 46, .45); backdrop-filter: blur(3px); }
.card-dlg[open] .bcard { animation: card-in .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes card-in { from { opacity: 0; transform: rotate(-6deg) translateY(24px) scale(.94); } to { opacity: 1; transform: rotate(-1.5deg); } }
.bcard {
  position: relative; width: min(400px, calc(100vw - 52px)); padding: 26px 26px 20px; border: var(--b); border-radius: 26px; color: var(--ink);
  background: radial-gradient(circle at 100% 0, var(--p1) 0 120px, transparent 121px), var(--paper); box-shadow: 8px 8px 0 var(--shade); transform: rotate(-1.5deg);
}
.bcard-x { position: absolute; top: -14px; right: -14px; width: 38px; height: 38px; border-radius: 50%; border: var(--b); background: var(--p3); color: var(--ink); cursor: pointer; font-size: .9rem; box-shadow: 3px 3px 0 var(--shade); }
.bcard-top { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 2px dashed var(--ink); }
.bcard-photo { flex: none; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; border: var(--b); background: var(--p2); }
.bcard-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bcard-ini { display: grid; place-items: center; font: 800 2rem var(--display); color: var(--accent); }
.bcard-name { margin: 0; font: 800 1.55rem/1.1 var(--display); letter-spacing: -.02em; }
.bcard-title { margin: 6px 0 0; color: var(--accent); font-weight: 600; font-size: .95rem; line-height: 1.35; }
.bcard-list { list-style: none; margin: 16px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.bcard-list a, .bcard-row { display: flex; align-items: center; gap: 12px; padding: 6px 8px; margin: 0 -8px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: .95rem; overflow-wrap: anywhere; }
.bcard-list a:hover { background: var(--p1); }
.bcard-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--p4); border: 1.5px solid var(--ink); }
.bcard-save { width: 100%; justify-content: center; }
.bcard-note { margin: 12px 0 0; text-align: center; font-size: 1.3rem; color: var(--text-2); transform: rotate(-2deg); }

.portrait { position: relative; justify-self: center; width: min(430px, 100%); padding: 40px 30px; }
.photo-blob {
  position: relative; aspect-ratio: 1; border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--shade); overflow: hidden; background: var(--p2);
  border-radius: 46% 54% 58% 42% / 44% 47% 53% 56%; animation: morph 18s ease-in-out infinite;
}
.photo-blob img { width: 100%; height: 100%; object-fit: cover; display: block; animation: counter 18s ease-in-out infinite; }
@keyframes counter { 33% { transform: rotate(-6deg) scale(1.08); } 66% { transform: rotate(4deg) scale(1.08); } }
.photo-ph { width: 100%; height: 100%; display: grid; place-items: center; font: 800 6rem var(--display); color: var(--accent); }
.note { position: absolute; left: -36px; top: -6px; margin: 0; font-size: 1.9rem; color: var(--ink); transform: rotate(-9deg); line-height: 1; }
.note .arrow { display: block; width: 74px; height: 56px; margin: 2px 0 0 44px; color: var(--accent); }
.sticker {
  position: absolute; display: flex; flex-direction: column; padding: 10px 16px 11px; border: var(--b); border-radius: 18px; box-shadow: var(--pop-sm);
  background: var(--p3); line-height: 1.2; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.sticker strong { font: 800 1.9rem/1 var(--display); letter-spacing: -.02em; }
.sticker > span { font-size: .84rem; font-weight: 600; color: var(--text-2); }
.sticker.s1 { right: -8px; top: 34px; transform: rotate(7deg); background: var(--p3); }
.sticker.s2 { left: -14px; bottom: 54px; transform: rotate(-6deg); background: var(--p2); }
.sticker.s3 { right: 6px; bottom: 0; transform: rotate(4deg); background: var(--p4); }
.sticker:hover { transform: rotate(0) scale(1.08); }

/* ---------- marquee ---------- */
.marquee { background: var(--band); color: var(--band-fg); border-block: var(--b); transform: rotate(-1.6deg); margin: 0 -20px; overflow: hidden; }
.mq-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.mq-group { display: flex; align-items: center; }
.mq-group span { font: 800 clamp(1.4rem, 2.6vw, 2.1rem)/1 var(--display); padding: 20px 22px; white-space: nowrap; letter-spacing: -.01em; }
.mq-group span:nth-of-type(3n+1) { color: var(--p3l); }
.mq-group span:nth-of-type(3n+2) { color: var(--p1l); }
.mq-group span:nth-of-type(3n) { color: var(--p2l); }
.mq-group i { font-style: normal; color: var(--band-fg); opacity: .6; }
.marquee:hover .mq-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 110px 0 0; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 44px; }
.sec-head h2 { margin: 0; font: 800 clamp(2.3rem, 4.6vw, 3.8rem)/1 var(--display); letter-spacing: -.03em; }
.sec-head .aside { margin: 0; font-size: 1.7rem; color: var(--accent); transform: rotate(-3deg); }

/* chapters */
.chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 46px; }
.chapter { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 30px; align-items: start; }
.chap-side { position: sticky; top: 98px; z-index: 1; }
.chap-label {
  display: inline-block; padding: 10px 18px; border: var(--b); border-radius: 16px; background: var(--paper); box-shadow: var(--pop-sm);
  font: 800 1.35rem/1.1 var(--display); letter-spacing: -.01em; transform: rotate(-4deg);
}
.chapter:nth-child(even) .chap-label { transform: rotate(3deg); }
.chap-body { background: var(--pastel); border: var(--b); border-radius: var(--r); box-shadow: var(--pop); padding: 34px 38px; }
.chap-body h3 { margin: 0 0 12px; font: 800 clamp(1.6rem, 2.8vw, 2.2rem)/1.1 var(--display); letter-spacing: -.02em; }
.chap-text { font-size: 1.08rem; color: var(--text-2); max-width: 62ch; }
.chap-text p { margin: 0 0 .7em; } .chap-text > :last-child { margin-bottom: 0; }
.chap-roles { list-style: none; margin: 22px 0 0; padding: 0; border-top: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.chap-roles li { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; padding: 10px 0; border-bottom: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.chap-roles strong { font-weight: 600; }
.chap-roles .at { color: var(--muted); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chap-roles .yr { font: 600 .95rem var(--display); color: var(--text-2); }

/* superpowers */
.powers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.power { background: var(--pastel); border: var(--b); border-radius: var(--r); box-shadow: var(--pop); padding: 30px; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.power:nth-child(3n+1) { transform: rotate(-1.4deg); } .power:nth-child(3n+2) { transform: rotate(1deg); } .power:nth-child(3n) { transform: rotate(-.6deg); }
.power:hover { transform: rotate(0) translateY(-6px); }
.power-ic { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); border: var(--b); color: var(--accent); margin-bottom: 18px; }
.power h3 { margin: 0 0 8px; font: 800 1.55rem/1.15 var(--display); letter-spacing: -.02em; }
.power-text { color: var(--text-2); }
.power-text p { margin: 0; }

/* fun facts as sticky notes */
.facts { list-style: none; margin: 0; padding: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 34px 28px; }
.fact {
  position: relative; background: var(--pastel); padding: 34px 24px 26px; border-radius: 6px 6px 6px 28px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 18px 28px -18px rgba(28, 26, 46, .45); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1);
}
.fact::before { /* tape */
  content: ""; position: absolute; top: -12px; left: 50%; width: 92px; height: 26px; transform: translateX(-50%) rotate(-3deg);
  background: color-mix(in srgb, var(--paper) 62%, transparent); border: 1px solid rgba(28, 26, 46, .08); box-shadow: 0 2px 4px rgba(0, 0, 0, .06);
}
.fact:nth-child(4n+1) { transform: rotate(-2.2deg); } .fact:nth-child(4n+2) { transform: rotate(1.6deg); }
.fact:nth-child(4n+3) { transform: rotate(-1deg); } .fact:nth-child(4n) { transform: rotate(2.4deg); }
.fact:hover { transform: rotate(0) scale(1.04); z-index: 2; }
.fact h3 { margin: 0 0 8px; font: 800 1.5rem/1.1 var(--display); letter-spacing: -.02em; }
.fact p { margin: 0; color: var(--text-2); font-size: .98rem; }

/* quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.quote { margin: 0; background: var(--pastel); border: var(--b); border-radius: var(--r); box-shadow: var(--pop); padding: 30px; }
.quote .ic { color: var(--accent); }
.quote blockquote { margin: 10px 0 18px; font: 600 1.25rem/1.45 var(--display); }
.quote blockquote p { margin: 0 0 .5em; }
.quote figcaption { display: flex; flex-direction: column; font-size: .95rem; }
.quote figcaption span { color: var(--muted); }

/* ---------- full CV ---------- */
.work .wrap > .about, .skills, .history { background: var(--card); border: var(--b); border-radius: var(--r); box-shadow: var(--pop); }
.work .about { padding: 30px 34px; font-size: 1.08rem; color: var(--text-2); margin-bottom: 28px; }
.work .about p { margin: 0 0 .9em; } .work .about > :last-child { margin: 0; }
.skills { padding: 30px 34px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 40px; margin-bottom: 28px; }
.sk-hint { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: .95rem; }
.sk-hint .ic { color: var(--accent); }
.sk-skill { grid-column: 1 / -1; }
.sk h3 { margin: 0 0 12px; font: 800 1.15rem var(--display); }
.sk-skill h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.langs { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.langs div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 14px; border-radius: 14px; background: var(--p4); }
.langs dt { font-weight: 600; }
.langs dd { margin: 0; display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: .9rem; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 14px; height: 7px; border-radius: 4px; background: var(--paper); border: 1.5px solid var(--ink); }
.pips i.on { background: var(--accent); border-color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 12px 0 0; padding: 0; }
.tag-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; cursor: pointer;
  font: 500 .82rem var(--sans); color: var(--text-2); background: var(--bg); border: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent);
  transition: background .15s, transform .15s, border-color .15s;
}
.tag-btn:hover { border-color: var(--ink); background: var(--p1); }
.tag-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tags.lg .tag-btn { font: 600 .95rem var(--display); padding: 8px 15px; border: var(--b); background: var(--p1); color: var(--ink); box-shadow: 3px 3px 0 var(--shade); }
.tags.lg li:nth-child(4n+2) .tag-btn { background: var(--p2); } .tags.lg li:nth-child(4n+3) .tag-btn { background: var(--p3); } .tags.lg li:nth-child(4n) .tag-btn { background: var(--p4); }
.tags.lg .tag-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--shade); }
.tags.lg .tag-btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.tags.lg .tag-btn.none { cursor: default; box-shadow: none; background: var(--bg) !important; border-style: dashed; color: var(--muted); }
.tags.lg .tag-btn.none:hover { transform: none; }
.tag-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font: 700 .75rem var(--sans); background: var(--paper); border: 1.5px solid var(--ink); }
.tag-n:empty { display: none; }
.tag-btn[aria-pressed="true"] .tag-n { background: var(--accent); color: #fff; border-color: #fff; }

.history summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 22px 30px; font: 800 1.35rem var(--display); letter-spacing: -.01em; border-radius: var(--r);
}
.history summary::-webkit-details-marker { display: none; }
.history summary:hover { background: var(--p1); }
.history summary .ic { transition: transform .25s; }
.history[open] summary { border-bottom: var(--b); border-radius: var(--r) var(--r) 0 0; }
.history[open] summary .ic { transform: rotate(180deg); }
.history-in { padding: 8px 34px 34px; }
.hist-sec { padding-top: 26px; }
.hist-title { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 800 1.4rem var(--display); }
.hist-title .ic { color: var(--accent); }

.timeline, .roles { list-style: none; margin: 0; padding: 0; }
.org { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0 18px; padding: 20px 0; border-top: 2px dashed var(--line); }
.org:first-child { border-top: 0; padding-top: 0; }
.logo { width: 46px; height: 46px; border-radius: 14px; object-fit: contain; display: grid; place-items: center; font: 800 .9rem var(--display); background: var(--p1); border: var(--b); }
img.logo { background: #fff; padding: 5px; }
.org-body { min-width: 0; max-width: 72ch; }
.org-name, .role h5 { margin: 0; font: 800 1.12rem/1.3 var(--display); letter-spacing: -.01em; }
.role h5 { font-size: 1.04rem; }
.org-name a { text-decoration: none; } .org-name a:hover { text-decoration: underline; }
.org-sub { margin: 2px 0 0; color: var(--text-2); font-size: .96rem; }
.org-sub a { text-decoration: none; }
.roles { margin-top: 14px; }
.role { position: relative; padding: 0 0 20px 24px; }
.role:last-child { padding-bottom: 0; }
.role::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: -6px; border-left: 2px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
.role:last-child::before { display: none; }
.role::after { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); box-sizing: border-box; }
.role.is-now::after { background: var(--p3); }
.when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 4px 0 0; font: 600 .9rem var(--display); color: var(--text-2); }
.when .dur { color: var(--muted); font-weight: 500; }
.when .dur::before { content: "("; } .when .dur::after { content: ")"; }
.when .cur { padding: 0 9px; border-radius: 99px; background: var(--p3); border: 1.5px solid var(--ink); color: var(--ink); }
.meta { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.desc { margin-top: 10px; color: var(--text-2); font-size: .98rem; }
.desc p { margin: 0 0 .6em; } .desc > :last-child { margin-bottom: 0; }
.desc ul, .desc ol { margin: .3em 0 .6em; padding-left: 1.2em; }
.desc li::marker { color: var(--accent); }
.desc a, .about a { color: var(--accent); text-underline-offset: 3px; }
.desc.clamp { max-height: 7.4em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 50%, transparent); mask-image: linear-gradient(#000 50%, transparent); }
.more { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--accent); font: 700 .92rem var(--display); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ext { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; color: var(--accent); font-weight: 600; font-size: .92rem; }

/* skill explorer states */
[data-match], [data-match-group] { transition: opacity .3s, filter .3s; }
.filtering .dim { opacity: .3; filter: grayscale(.6); }
.filtering .role.dim .desc, .filtering .role.dim .tags, .filtering .role.dim .meta, .filtering .role.dim .more { display: none; }
.filtering .role.hit::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--p1); }
.filtering .role.hit > h5, .filtering .org[data-match].hit .org-name { color: var(--accent); }
.filtering .org.hit > .logo { background: var(--p3); }
.filterbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 20px; border-radius: 999px; background: var(--band); color: var(--band-fg); border: var(--b); box-shadow: 4px 4px 0 var(--accent);
}
.filterbar[hidden] { display: none; }
.fb-clear { border: 0; border-radius: 999px; padding: 8px 14px; background: color-mix(in srgb, var(--band-fg) 16%, transparent); color: var(--band-fg); font: 600 .88rem var(--sans); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.fb-clear:hover { background: color-mix(in srgb, var(--band-fg) 28%, transparent); }
.fb-clear kbd { font: 600 .7rem var(--sans); padding: 1px 5px; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--band-fg) 35%, transparent); }

/* ---------- closing ---------- */
.closing-sec { padding-bottom: 30px; }
.closing { position: relative; overflow: hidden; isolation: isolate; background: var(--band); color: var(--band-fg); border-radius: 40px; padding: 72px 64px; box-shadow: 10px 10px 0 var(--accent); }
.closing .b3 { width: 520px; height: 520px; right: -170px; top: -230px; background: var(--accent); opacity: .55; }
.closing h2 { margin: 0; font: 800 clamp(2.5rem, 6.4vw, 5.4rem)/1 var(--display); letter-spacing: -.035em; max-width: 12ch; }
.closing-text { margin: 22px 0 0; font-size: 1.3rem; color: color-mix(in srgb, var(--band-fg) 86%, var(--band)); }
.closing-text .hand { font-size: 1.9rem; color: var(--p3l); display: inline-block; transform: rotate(-4deg); margin-left: 6px; }
.closing-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.foot { padding: 34px 4px 10px; color: var(--muted); font-size: .88rem; }
.foot p { margin: 0; }

/* ---------- "Ask my CV" ---------- */
.ask-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 55; display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 999px; cursor: pointer;
  font: 700 1rem var(--display); color: var(--on-ink); background: var(--ink); border: var(--b); box-shadow: 4px 4px 0 var(--accent);
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .3s, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.ask-fab .ic { color: var(--p3); }
.ask-fab.show { opacity: 1; transform: none; pointer-events: auto; }
.ask-fab:hover { transform: translate(-2px, -2px); }
.ask-open .ask-fab, .filtering .ask-fab { opacity: 0; pointer-events: none; }
.ask-teaser {
  position: fixed; right: 22px; bottom: 92px; z-index: 56; width: min(300px, calc(100vw - 40px));
  opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom right; transition: opacity .25s, transform .25s cubic-bezier(.2, .8, .2, 1);
}
.ask-teaser.show { opacity: 1; transform: none; }
.ask-teaser[hidden] { display: none; }
.ask-teaser-body {
  display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: 14px 18px; cursor: pointer;
  background: var(--paper); color: var(--ink); border: var(--b); border-radius: 20px 20px 6px 20px; box-shadow: 5px 5px 0 var(--shade); font: inherit;
}
.ask-teaser-body strong { font: 800 1.05rem var(--display); }
.ask-teaser-body > span { font-size: .9rem; color: var(--text-2); line-height: 1.45; }
.ask-teaser-body:hover { background: var(--p1); }
.ask-teaser-x {
  position: absolute; top: -10px; left: -10px; width: 28px; height: 28px; border-radius: 50%; border: var(--b); background: var(--paper);
  font-size: .75rem; cursor: pointer; color: var(--ink); display: grid; place-items: center;
}
.ask-teaser-x:hover { background: var(--p3); }
.ask-open .ask-teaser, .filtering .ask-teaser { display: none; }
.ask {
  position: fixed; right: 22px; bottom: 22px; z-index: 70; width: min(420px, calc(100vw - 28px)); height: min(620px, calc(100vh - 44px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 28px; background: var(--card); border: var(--b); box-shadow: 8px 8px 0 var(--shade);
  opacity: 0; transform: translateY(16px) scale(.98); transform-origin: bottom right; transition: opacity .22s, transform .22s cubic-bezier(.2, .8, .2, 1);
}
.ask.open { opacity: 1; transform: none; }
.ask[hidden] { display: none; }
.ask-head { display: flex; align-items: center; gap: 12px; padding: 18px; background: var(--p1); border-bottom: var(--b); }
.ask-head h2 { margin: 0; font: 800 1.2rem var(--display); }
.ask-head p { margin: 2px 0 0; font-size: .8rem; color: var(--text-2); }
.ask-ic { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: var(--b); color: var(--accent); }
.ask-x { margin-left: auto; align-self: flex-start; width: 36px; height: 36px; border: var(--b); border-radius: 50%; background: var(--paper); cursor: pointer; font-size: .95rem; color: var(--ink); }
.ask-x:hover { background: var(--p3); }
.ask-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; font-size: .95rem; line-height: 1.5; border: 1.5px solid var(--ink); }
.msg p { margin: 0 0 .5em; } .msg p:last-child { margin: 0; }
.msg ul { margin: .2em 0 .5em; padding-left: 1.1em; }
.msg.bot { align-self: flex-start; background: var(--paper); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--p3); border-bottom-right-radius: 6px; }
.msg.err { background: #FFF0EE; }
.msg.wait { display: inline-flex; gap: 5px; padding: 14px 16px; }
.msg.wait span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); animation: blink 1.2s infinite ease-in-out; }
.msg.wait span:nth-child(2) { animation-delay: .15s; } .msg.wait span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: none; } }
.ask-sugg { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 14px; background: var(--bg); }
.sugg { border: 1.5px solid var(--ink); background: var(--p2); color: var(--ink); padding: 7px 12px; border-radius: 14px; font: 600 .86rem var(--sans); cursor: pointer; text-align: left; }
.sugg:hover { background: var(--p3); }
.ask-form { display: flex; gap: 8px; padding: 12px; border-top: var(--b); background: var(--paper); }
.ask-form input { flex: 1; min-width: 0; border: var(--b); border-radius: 999px; padding: 11px 16px; font: 400 .95rem var(--sans); color: var(--ink); background: var(--bg); }
.ask-form input:focus { outline: none; box-shadow: 0 0 0 4px var(--p1); }
.ask-form button { width: 46px; height: 46px; flex: none; border: var(--b); border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; display: grid; place-items: center; }

/* ---------- personal message (application links) ---------- */
picture { display: contents; }
picture > source { display: none; }
.for-you { padding: 30px 0 6px; }
.fy-card { position: relative; overflow: hidden; isolation: isolate; background: var(--p2); border: var(--b); border-radius: 34px; box-shadow: var(--pop); padding: 40px 44px 34px; animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.fy-card .b4 { width: 360px; height: 360px; right: -120px; bottom: -190px; background: var(--p3); opacity: .9; }
.fy-stamp { position: absolute; right: 30px; top: 26px; display: flex; flex-direction: column; align-items: center; padding: 10px 18px 12px; border: 2.5px dashed var(--accent); border-radius: 16px; color: var(--accent); background: color-mix(in srgb, var(--on-ink) 70%, transparent); transform: rotate(6deg); font: 700 .78rem var(--display); text-transform: uppercase; letter-spacing: .08em; max-width: 220px; text-align: center; }
.fy-stamp strong { font: 800 1.35rem/1.1 var(--display); text-transform: none; letter-spacing: -.01em; color: var(--ink); margin-top: 2px; overflow-wrap: anywhere; }
.fy-kicker { margin: 0; font-size: 1.6rem; color: var(--accent); transform: rotate(-2deg); transform-origin: left; display: inline-block; }
.fy-card h2 { margin: 4px 0 0; font: 800 clamp(2.1rem, 4.4vw, 3.4rem)/1.02 var(--display); letter-spacing: -.03em; max-width: calc(100% - 250px); }
.fy-role { margin: 12px 0 0; color: var(--text-2); font-size: 1.05rem; }
.fy-role strong { color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 12px; margin-left: 4px; white-space: nowrap; display: inline-block; }
.fy-text { margin-top: 18px; max-width: 66ch; font-size: 1.1rem; color: var(--text-2); }
.fy-text p { margin: 0 0 .8em; } .fy-text > :last-child { margin-bottom: 0; }
.fy-text ul, .fy-text ol { margin: 0 0 .8em; padding-left: 1.2em; }
.fy-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.fy-sign { margin: 18px 0 0; font-size: 1.8rem; color: var(--ink); transform: rotate(-3deg); display: inline-block; }
.for-you + .hero { padding-top: 34px; }

/* ---------- contact form ---------- */
.contact-dlg { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: var(--b); border-radius: 28px; background: var(--card); color: var(--ink); box-shadow: 8px 8px 0 var(--shade); overflow: auto; }
.contact-dlg::backdrop { background: rgba(28, 26, 46, .45); backdrop-filter: blur(3px); }
.contact-dlg[open] { animation: dlg-in .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.ct-form { margin: 0; }
.ct-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; background: var(--p3); border-bottom: var(--b); }
.ct-head h2 { margin: 0; font: 800 1.3rem var(--display); }
.ct-head p { margin: 2px 0 0; font-size: .88rem; color: var(--text-2); }
.ct-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ct-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ct-body label { display: flex; flex-direction: column; gap: 6px; font: 600 .92rem var(--display); }
.ct-body label small { font: 400 .82rem var(--sans); color: var(--muted); display: inline; }
.ct-body input, .ct-body textarea, .ct-body select { width: 100%; border: var(--b); border-radius: 14px; padding: 11px 14px; font: 400 1rem var(--sans); color: var(--ink); background: var(--bg); resize: vertical; }
.ct-body input:focus, .ct-body textarea:focus, .ct-body select:focus { outline: none; box-shadow: 0 0 0 4px var(--p1); background: var(--paper); }
.ct-body [aria-invalid="true"] { border-color: #B42318; box-shadow: 0 0 0 4px #FDE7E4; }
.ct-body .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ct-err { margin: 0; padding: 10px 14px; border-radius: 12px; background: #FFF0EE; border: 1.5px solid #B42318; color: #8A1C12; font-size: .92rem; }
.ct-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ct-foot small { color: var(--muted); font-size: .82rem; max-width: 26em; }
.ct-done { padding: 34px 26px 30px; text-align: center; }
.ct-done[hidden], .ct-body[hidden] { display: none; }
.ct-yay { font-size: 3rem; margin: 0; animation: drop .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.ct-done h3 { margin: 6px 0 6px; font: 800 1.6rem var(--display); }
.ct-done p { margin: 0 0 22px; color: var(--text-2); }

/* ---------- entrance + scroll reveal ---------- */
.hero .hello, .hero h1, .hero .intro, .hero .hero-cta, .hero .contact { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.hero h1 { animation-delay: .05s; } .hero .intro { animation-delay: .5s; } .hero .hero-cta { animation-delay: .65s; } .hero .contact { animation-delay: .8s; }
.portrait .photo-blob { animation: pop-in .9s cubic-bezier(.3, 1.4, .5, 1) .2s both, morph 18s ease-in-out 1.1s infinite; }
.portrait .sticker { animation: drop .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.sticker.s1 { animation-delay: .9s; } .sticker.s2 { animation-delay: 1.05s; } .sticker.s3 { animation-delay: 1.2s; }
.portrait .note { animation: rise .7s ease 1.4s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.85) rotate(-6deg); } }
@keyframes drop { from { opacity: 0; translate: 0 -30px; scale: 1.3; } }
.reveal { opacity: 0; translate: 0 36px; transition: opacity .7s ease, translate .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; translate: 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav, .nav-more { display: none !important; }
  .menu-btn { display: inline-flex; }
  /* Phones/tablets: no bar, just the language switch in the top corner (scrolls away with the page). */
  html { scroll-padding-top: 16px; }
  .topbar, .topbar.scrolled { position: absolute; left: 0; right: 0; background: transparent; border-bottom: 0; box-shadow: none; }
  .topbar-in { height: 56px; }
  .top-actions { margin-left: auto; }
  .top-actions .btn { display: none; }
  .hero { padding-top: 56px; }
  .fy-card h2 { max-width: calc(100% - 200px); }
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { order: -1; width: min(340px, 86%); padding: 30px 26px 20px; }
  .hello { font-size: 1.7rem; }
  .chapter { grid-template-columns: 1fr; gap: 0; }
  .chap-side { position: static; margin: 0 0 -14px 18px; z-index: 1; }
  .skills { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: min(1180px, 100% - 32px); }
  .topbar-in { height: 62px; gap: 10px; }
  .top-actions .btn span { display: none; }
  .hero { padding: 56px 0 64px; }
  .hero .b1 { width: 420px; height: 420px; right: -200px; top: -80px; }
  .note { left: -12px; font-size: 1.5rem; }
  .sticker strong { font-size: 1.45rem; }
  .sticker > span { font-size: .76rem; }
  .intro { font-size: 1.08rem; }
  .section { padding-top: 80px; }
  .sec-head { margin-bottom: 30px; }
  .chap-body { padding: 26px 22px; box-shadow: var(--pop-sm); }
  .chap-roles li { grid-template-columns: 1fr auto; }
  .chap-roles .at { grid-column: 1; grid-row: 2; white-space: normal; }
  .chap-roles .yr { grid-row: 1 / span 2; grid-column: 2; }
  .power, .quote { box-shadow: var(--pop-sm); padding: 24px; }
  .work .about, .skills { padding: 22px; }
  .history summary { padding: 18px 20px; font-size: 1.15rem; }
  .history-in { padding: 4px 18px 22px; }
  .org { grid-template-columns: 38px minmax(0, 1fr); gap: 0 12px; }
  .logo { width: 38px; height: 38px; border-radius: 11px; font-size: .78rem; }
  .closing { padding: 44px 26px; border-radius: 30px; box-shadow: 6px 6px 0 var(--accent); }
  .for-you { padding-top: 16px; }
  .fy-card { padding: 84px 22px 26px; border-radius: 26px; box-shadow: var(--pop-sm); }
  .fy-stamp { right: auto; left: 20px; top: 18px; flex-direction: row; gap: 6px; align-items: baseline; padding: 6px 12px; transform: rotate(-2deg); max-width: calc(100% - 40px); }
  .fy-stamp strong { font-size: 1rem; }
  .fy-card h2 { max-width: none; }
  .fy-kicker { font-size: 1.35rem; }
  .ct-two { grid-template-columns: 1fr; }
  .ask { right: 8px; left: 8px; bottom: 8px; width: auto; height: min(80vh, 640px); }
  .ask-fab { right: 14px; bottom: 14px; }
  .ask-fab span { display: none; }
  .ask-teaser { right: 14px; bottom: 80px; width: min(250px, calc(100vw - 40px)); }
  .ask-teaser-eg { display: none; }
  .filterbar { left: 14px; right: 14px; transform: none; bottom: 14px; justify-content: space-between; }
}
@media (hover: none) { .fb-clear kbd { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .typed .t-text { transition: opacity .35s ease !important; }
  .reveal { opacity: 1; translate: 0 0; }
  .mq-track { transform: none; }
}
.history .h-open, .history[open] .h-closed { display: none; }
.history[open] .h-open { display: inline; }
h1.big.t-wrap .t-word { white-space: normal; }

/* ---------- notes (blog) ---------- */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.note-card { display: flex; flex-direction: column; background: var(--card); border: var(--b); border-radius: var(--r); box-shadow: var(--pop-sm); overflow: hidden; transition: transform .2s, box-shadow .2s; position: relative; }
.note-card:hover { transform: translate(-2px, -2px); box-shadow: var(--pop); }
.nc-cover { aspect-ratio: 1200 / 630; background: var(--pastel); border-bottom: var(--b); overflow: hidden; }
.nc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.note-card:not(:has(.nc-cover)) { background: var(--pastel); }
.nc-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; }
.nc-meta { margin: 0; font-size: .85rem; color: var(--muted); font-weight: 600; }
.note-card h3 { margin: 0; font: 800 1.35rem/1.2 var(--display); letter-spacing: -.02em; }
.note-card h3 a { color: var(--ink); text-decoration: none; }
.note-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.note-card h3 a:focus-visible { outline: none; }
.note-card:has(a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.note-card p:not(.nc-meta) { margin: 0; color: var(--text-2); font-size: .98rem; }
.notes-all { margin: 28px 0 0; }

.subpage .sub-nav { display: flex; margin: 0 0 0 18px; }
.subpage .nav a.active { background: var(--ink); color: var(--on-ink); }
.notes-page { padding: 56px 0 40px; }
.notes-page .sec-head h1 { margin: 0; font: 800 clamp(2.4rem, 5vw, 4rem)/1 var(--display); letter-spacing: -.03em; }
.note-page { padding: 40px 0 30px; }
.note-col { width: min(760px, 100% - 48px); margin-inline: auto; }
.note-back { display: inline-block; padding: 8px 0; font: 700 .95rem var(--display); color: var(--accent); text-decoration: none; }
.note-back:hover { text-decoration: underline; }
.note-meta { margin: 22px 0 8px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.note-title { margin: 0; font: 800 clamp(2.2rem, 5vw, 3.6rem)/1.04 var(--display); letter-spacing: -.03em; }
.note-lede { margin: 18px 0 0; font-size: 1.25rem; line-height: 1.55; color: var(--text-2); }
.note-cover { margin: 34px auto 0; width: min(1000px, 100% - 48px); }
.note-cover img { width: 100%; height: auto; display: block; border: var(--b); border-radius: var(--r); box-shadow: var(--pop); }
.note-body { margin: 38px 0 0; font-size: 1.12rem; line-height: 1.75; }
.note-body p { margin: 0 0 1.1em; }
.note-body h2 { margin: 1.8em 0 .5em; font: 800 1.75rem/1.2 var(--display); letter-spacing: -.02em; }
.note-body h3 { margin: 1.5em 0 .4em; font: 800 1.3rem/1.25 var(--display); }
.note-body ul, .note-body ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.note-body li { margin: .3em 0; }
.note-body li::marker { color: var(--accent); }
.note-body a { color: var(--accent); text-underline-offset: 3px; }
.note-body blockquote { margin: 1.4em 0; padding: 14px 22px; border-left: 5px solid var(--accent); background: var(--p1); border-radius: 0 16px 16px 0; font: 600 1.2rem/1.5 var(--display); }
.note-body blockquote p:last-child { margin: 0; }
.note-author { display: flex; gap: 18px; align-items: center; margin-top: 44px; padding: 22px 24px; background: var(--p2); border: var(--b); border-radius: var(--r); box-shadow: var(--pop-sm); }
.note-author .na-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: var(--b); flex: none; }
.note-author p { margin: 0 0 6px; }
.note-author .hand { font-size: 1.3rem; color: var(--accent); margin: 0; line-height: 1; }
.note-author span { color: var(--text-2); font-size: .95rem; }
.note-more { margin-top: 70px; }
.note-more h2 { font: 800 2rem var(--display); letter-spacing: -.02em; margin: 0 0 24px; }
.sub-foot { padding: 40px 0 30px; }
.sub-foot a { color: var(--accent); }

/* ---------- recommendation form ---------- */
.rec-page { padding: 50px 0 40px; }
.rec-card { position: relative; overflow: hidden; isolation: isolate; max-width: 760px; margin: 0 auto; background: var(--card); border: var(--b); border-radius: 30px; box-shadow: var(--pop); padding: 40px 44px; }
.rec-card .b4 { width: 320px; height: 320px; right: -150px; top: -150px; background: var(--p1); }
.rec-kicker { margin: 0; font-size: 1.7rem; color: var(--accent); transform: rotate(-2deg); transform-origin: left; display: inline-block; }
.rec-card h1 { margin: 6px 0 12px; font: 800 clamp(1.8rem, 4vw, 2.6rem)/1.1 var(--display); letter-spacing: -.025em; }
.rec-intro { color: var(--text-2); font-size: 1.05rem; }
.rec-intro a { color: var(--accent); }
.rec-form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.rec-form label { display: flex; flex-direction: column; gap: 6px; font: 600 .92rem var(--display); }
.rec-form label small { font: 400 .82rem var(--sans); color: var(--muted); display: inline; }
.rec-form input, .rec-form textarea { width: 100%; border: var(--b); border-radius: 14px; padding: 11px 14px; font: 400 1rem var(--sans); color: var(--ink); background: var(--bg); resize: vertical; }
.rec-form input:focus, .rec-form textarea:focus { outline: none; box-shadow: 0 0 0 4px var(--p1); background: var(--paper); }
.rec-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rec-form .rec-consent { flex-direction: row; align-items: flex-start; gap: 10px; font: 400 .95rem var(--sans); }
.rec-form .rec-consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
@media (max-width: 640px) {
  .rec-card { padding: 28px 22px; border-radius: 24px; box-shadow: var(--pop-sm); }
  .subpage .sub-nav { margin-left: 8px; gap: 0; }
  .subpage .sub-nav a { padding: 6px 9px; font-size: .9rem; }
  .note-author { flex-direction: column; align-items: flex-start; }
  .note-col, .note-cover { width: min(760px, 100% - 32px); }
}
@media (max-width: 980px) {
  .subpage .sub-nav { display: flex; }
  /* on the homepage the bar floats over the hero; on subpages it stays a normal sticky bar */
  .subpage .topbar { position: sticky; background: var(--bg); }
  .subpage .topbar.scrolled { border-bottom: 2px solid var(--ink); }
}
.subpage .sub-nav a { white-space: nowrap; }
@media (max-width: 520px) { .subpage .sub-nav a:first-child { display: none; } /* the initials already link home */ }

/* ---------- voice-overs ---------- */
.voices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 24px; }
.voice { display: flex; gap: 18px; align-items: flex-start; background: var(--pastel); border: var(--b); border-radius: var(--r); box-shadow: var(--pop); padding: 24px; }
.vo-play { flex: none; width: 64px; height: 64px; border-radius: 50%; border: var(--b); background: var(--ink); color: var(--on-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 3px 3px 0 var(--accent); transition: transform .15s; }
.vo-play:hover { transform: scale(1.06); }
.vo-play:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.vo-play .vo-i-play .ic { margin-left: 3px; }
.vo-i-pause, .voice.playing .vo-i-play { display: none; }
.voice.playing .vo-i-pause { display: block; }
.voice.playing .vo-play { background: var(--accent); box-shadow: 3px 3px 0 var(--shade); }
.vo-main { flex: 1; min-width: 0; }
.vo-main h3 { margin: 2px 0 4px; font: 800 1.25rem/1.25 var(--display); letter-spacing: -.01em; }
.vo-main p { margin: 0 0 12px; color: var(--text-2); font-size: .96rem; line-height: 1.5; }
.vo-track { display: flex; align-items: center; gap: 12px; }
.vo-seek { --p: 0%; flex: 1; min-width: 0; height: 22px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.vo-seek::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; border: 2px solid var(--ink); background: linear-gradient(90deg, var(--ink) var(--p), var(--paper) var(--p)); }
.vo-seek::-moz-range-track { height: 4px; border-radius: 99px; border: 2px solid var(--ink); background: linear-gradient(90deg, var(--ink) var(--p), var(--paper) var(--p)); }
.vo-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); }
.vo-seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); }
.vo-seek:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 99px; }
.vo-time { flex: none; font: 600 .85rem var(--sans); color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- project cases ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 28px; }
.case-card { display: flex; flex-direction: column; background: var(--card); border: var(--b); border-radius: var(--r); box-shadow: var(--pop); overflow: hidden; position: relative; transition: transform .2s, box-shadow .2s; }
.case-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--shade); }
.case-card:not(:has(.cc-cover)) { background: var(--pastel); }
.cc-cover { aspect-ratio: 1200 / 630; background: var(--pastel); border-bottom: var(--b); overflow: hidden; }
.cc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cc-meta { margin: 0; font-size: .85rem; color: var(--muted); font-weight: 600; }
.case-card h3 { margin: 0; font: 800 1.4rem/1.2 var(--display); letter-spacing: -.02em; }
.case-card h3 a { color: var(--ink); text-decoration: none; }
.case-card h3 a::after { content: ""; position: absolute; inset: 0; }
.case-card h3 a:focus-visible { outline: none; }
.case-card:has(a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.case-card p:not(.cc-meta) { margin: 0; color: var(--text-2); font-size: .98rem; }
.cc-tags { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cc-tags li { font: 600 .78rem var(--sans); padding: 3px 10px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--paper); }
.cc-more { margin-top: auto; padding-top: 8px; font: 700 .95rem var(--display); color: var(--accent); }
.case-wide { max-width: 860px; }
@media (min-width: 760px) {
  .case-wide:has(.cc-cover) { flex-direction: row; }
  .case-wide .cc-cover { flex: 0 0 44%; aspect-ratio: auto; border-bottom: 0; border-right: var(--b); }
}
.fy-case { margin-top: 30px; }
.fy-case-kicker { font-size: 1.5rem; color: var(--accent); margin: 0 0 10px 6px; transform: rotate(-1.5deg); }
.case-link-sm { display: inline-block; margin: 6px 14px 0 0; font: 700 .95rem var(--display); color: var(--accent); text-decoration: none; }
.case-link-sm:hover { text-decoration: underline; }
.case-tags { margin-top: 18px; }
.case-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 40px; }
.case-step { position: relative; background: var(--pastel); border: var(--b); border-radius: var(--r); box-shadow: var(--pop); padding: 30px 28px 26px; }
.cs-num { position: absolute; top: -20px; left: 22px; margin: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font: 800 1.2rem var(--display); }
.case-step h2 { margin: 6px 0 10px; font: 800 1.45rem/1.2 var(--display); letter-spacing: -.02em; }
.cs-body { font-size: 1.02rem; line-height: 1.65; }
.cs-body p { margin: 0 0 .8em; }
.cs-body p:last-child { margin: 0; }
.cs-body ul, .cs-body ol { margin: 0 0 .8em; padding-left: 1.2em; }
.cs-body li::marker { color: var(--accent); }
.case-gallery { display: grid; gap: 20px; margin-top: 40px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.case-gallery.g1 { grid-template-columns: 1fr; max-width: 1000px; }
.case-gallery figure { margin: 0; }
.case-gallery img { width: 100%; height: auto; display: block; border: var(--b); border-radius: 18px; box-shadow: var(--pop-sm); }
.case-gallery figcaption { margin-top: 8px; font-size: .9rem; color: var(--muted); }
.case-link { margin-top: 32px; }
@media (max-width: 640px) {
  .voice { padding: 20px; gap: 14px; }
  .vo-play { width: 54px; height: 54px; }
  .case-step { padding: 28px 22px 22px; }
}

/* ---------- menu (phones, and "More" when the bar is full) ---------- */
.nav-more { display: inline-flex; align-items: center; gap: 4px; flex: none; margin-left: -12px; padding: 7px 12px; border: 0; border-radius: 999px; background: transparent; font: 600 .98rem var(--display); color: var(--text-2); cursor: pointer; }
.nav-more[hidden] { display: none; }
.nav-more:hover { background: var(--p1); color: var(--ink); }
.nav-more .ic { transform: rotate(0deg); }
.menu-btn { display: none; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 12px; border: var(--b); border-radius: 999px; background: var(--card); color: var(--ink); font: 700 .92rem var(--display); cursor: pointer; box-shadow: 2px 2px 0 var(--shade); }
.burger { display: grid; gap: 3px; width: 16px; }
.burger i { display: block; height: 2px; border-radius: 2px; background: currentColor; }
.menu-dlg { margin: 12px 12px auto auto; width: min(360px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: var(--b); border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 8px 8px 0 var(--shade); overflow: auto; }
.menu-dlg::backdrop { background: rgba(28, 26, 46, .45); backdrop-filter: blur(3px); }
.menu-dlg[open] { animation: dlg-in .25s cubic-bezier(.2, .8, .2, 1); }
.menu-in { padding: 18px 20px 20px; }
.menu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.menu-head .hand { margin: 0; font-size: 1.5rem; color: var(--accent); transform: rotate(-2deg); }
.icon-x { width: 40px; height: 40px; border-radius: 50%; border: var(--b); background: var(--bg); color: var(--ink); font-size: 1rem; cursor: pointer; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list a { display: block; padding: 11px 6px; border-bottom: 1.5px dashed var(--line); font: 800 1.3rem/1.2 var(--display); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.menu-list li:last-child a { border-bottom: 0; }
.menu-list a:hover, .menu-list a:focus-visible { color: var(--accent); }
.menu-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: var(--b); }
@media (max-width: 980px) { .menu-btn { display: inline-flex; } }

/* ---------- what you're looking for / what I bring (application pages) ---------- */
.fy-fit { margin-top: 30px; }
.fy-fit h3 { margin: 0 0 16px; font: 800 clamp(1.5rem, 3vw, 2rem)/1.15 var(--display); letter-spacing: -.02em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.fy-fit h3 .hand { font: 600 1.6rem var(--hand); color: var(--accent); transform: rotate(-1.5deg); }
.fit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fit-list li { display: grid; grid-template-columns: minmax(150px, 30%) auto minmax(0, 1fr); gap: 16px; align-items: center; background: var(--card); border: var(--b); border-radius: 20px; box-shadow: var(--pop-sm); padding: 16px 20px; }
.fit-need { margin: 0; padding: 6px 12px; border-radius: 12px; background: var(--pastel); font: 800 1.05rem/1.3 var(--display); justify-self: start; }
.fit-arrow { font: 800 1.4rem var(--display); color: var(--accent); }
.fit-proof p { margin: 0; line-height: 1.55; }
.fit-proof small { display: block; margin-top: 4px; color: var(--muted); font-size: .84rem; font-weight: 600; }
@media (max-width: 700px) {
  .fit-list li { grid-template-columns: 1fr; gap: 8px; padding: 14px 16px; }
  .fit-arrow { display: none; }
}

/* ---------- light / dark switch ---------- */
.theme-btn { flex: none; width: 38px; height: 38px; display: inline-grid; place-items: center; border: var(--b); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer; box-shadow: 2px 2px 0 var(--shade); transition: transform .15s; }
.theme-btn:hover { transform: rotate(-12deg); }
.theme-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.th-sun { display: none; }
.th-moon, .th-sun { line-height: 0; }
html[data-theme="dark"] .th-moon { display: none; }
html[data-theme="dark"] .th-sun { display: block; }
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .th-moon { display: none; }
  html[data-theme="auto"] .th-sun { display: block; }
}

/* ---------- video ---------- */
.videos { display: grid; gap: 24px; }
.videos.n2 { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.vid { margin: 0; }
.vid video { display: block; width: 100%; max-height: 78vh; border-radius: var(--r); background: #111; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.videos.n1 .vid { max-width: 880px; }
.vid figcaption { margin-top: 12px; color: var(--text-2); max-width: 66ch; }
.fy-video { margin-top: 18px; max-width: 640px; }
.fy-video video { box-shadow: 4px 4px 0 var(--ink); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.faq { background: var(--pastel); border: var(--b); border-radius: calc(var(--r) * .7); box-shadow: var(--pop-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; font: 700 1.1rem/1.35 var(--display); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font: 700 1.5rem/1 var(--display); transition: transform .2s; }
.faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: inherit; }
.faq-a { padding: 0 22px 18px; color: var(--text-2); max-width: 70ch; }
.faq-a p { margin: 0 0 .6em; }

/* An open window: freeze the page behind it (no blob, marquee or caret animation under the blurred backdrop). */
html.modal-open body > :not(dialog), html.modal-open body > :not(dialog) * { animation-play-state: paused !important; }

/* ---------- blog ---------- */
.blog-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px 40px; flex-wrap: wrap; margin-bottom: 26px; }
.blog-head h1 { margin: 0; font: 800 clamp(2.6rem, 6vw, 4.6rem)/1 var(--display); letter-spacing: -.03em; }
.blog-head .hand { margin: 4px 0 0; font-size: 1.4rem; color: var(--accent); }
.blog-intro { margin: 0; max-width: 420px; color: var(--text-2); font-size: 1.05rem; }
.rss-link { display: inline-block; margin-left: 4px; color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.tag-filter a { padding: 7px 14px; border: var(--b); border-radius: 99px; background: var(--card); color: var(--ink); text-decoration: none; font: 700 .92rem var(--display); }
.tag-filter a small { font: 600 .78rem var(--sans); color: var(--muted); margin-left: 2px; }
.tag-filter a:hover { background: var(--p1); }
.tag-filter a.on { background: var(--ink); color: var(--on-ink); }
.tag-filter a.on small { color: inherit; opacity: .75; }
.note-card.note-hero { flex-direction: row; margin-bottom: 30px; background: var(--card); }
.note-hero .nc-cover { flex: 1.15; aspect-ratio: auto; min-height: 300px; border-bottom: 0; border-right: var(--b); }
.note-hero .nc-body { flex: 1; padding: 34px 36px; justify-content: center; gap: 12px; }
.note-hero h2 { margin: 0; font: 800 clamp(1.7rem, 3vw, 2.4rem)/1.1 var(--display); letter-spacing: -.025em; }
.note-hero h2 a { color: var(--ink); text-decoration: none; }
.note-hero h2 a::after { content: ""; position: absolute; inset: 0; }
.note-hero p:not(.nc-meta):not(.nc-tags) { font-size: 1.08rem; }
.note-card.note-hero:not(:has(.nc-cover)) { background: var(--p1); }
.nc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.nc-tags span { padding: 2px 9px; border-radius: 99px; background: var(--p3); border: 1.5px solid var(--ink); font: 700 .74rem var(--display); color: var(--ink); }
.note-card:not(:has(.nc-cover)) .nc-tags span { background: var(--card); }
.blog-pages { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 40px 0 0; font-weight: 600; color: var(--muted); }

.read-progress { position: fixed; inset: 0 0 auto; height: 4px; z-index: 60; pointer-events: none; }
.read-progress i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.preview-bar { margin: 0; padding: 10px 16px; background: var(--p3); border-bottom: var(--b); text-align: center; font-weight: 700; }
.note-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 12px; }
.note-tags a { padding: 4px 12px; border: var(--b); border-radius: 99px; background: var(--p1); color: var(--ink); font: 700 .85rem var(--display); text-decoration: none; }
.note-tags a:hover { background: var(--p3); }
.note-tags.end { margin: 34px 0 0; }
.note-byline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 26px 0 0; padding: 14px 0; border-top: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); border-bottom: 1.5px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.note-byline .nb-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: var(--b); }
.note-byline p { margin: 0; display: flex; flex-direction: column; line-height: 1.3; }
.note-byline p span { color: var(--muted); font-size: .9rem; font-weight: 600; }
.share { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.share-top { margin-left: auto; }
.share-l { font: 700 .85rem var(--display); color: var(--muted); margin-right: 2px; }
.share a, .share button { display: inline-flex; align-items: center; gap: 6px; height: 38px; min-width: 38px; justify-content: center; padding: 0 10px; border: var(--b); border-radius: 99px; background: var(--card); color: var(--ink); font: 700 .85rem var(--display); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { background: var(--p1); }
.share-top button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.share-end { margin: 26px 0 0; padding: 18px 20px; border: var(--b); border-radius: var(--r); background: var(--p2); box-shadow: var(--pop-sm); }
.share-end .share-l { color: var(--ink); font-size: 1rem; margin-right: 6px; }
.note-toc { margin: 34px 0 0; padding: 20px 24px; border: var(--b); border-radius: var(--r); background: var(--p4); box-shadow: var(--pop-sm); }
.note-toc p { margin: 0 0 8px; font: 800 1.05rem var(--display); }
.note-toc ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 4px; }
.note-toc a { color: var(--ink); text-underline-offset: 3px; font-weight: 600; }
.note-toc li::marker { color: var(--accent); font-weight: 800; }
.note-body h2 { scroll-margin-top: 90px; }
.note-fig { margin: 1.8em 0; }
.note-fig img { display: block; width: 100%; height: auto; border: var(--b); border-radius: calc(var(--r) * .7); box-shadow: var(--pop-sm); }
.note-fig figcaption { margin-top: 10px; text-align: center; font-size: .92rem; color: var(--muted); }
.note-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.note-pn a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: var(--b); border-radius: var(--r); background: var(--card); color: var(--ink); text-decoration: none; box-shadow: var(--pop-sm); transition: transform .2s, box-shadow .2s; }
.note-pn a:hover { transform: translate(-2px, -2px); box-shadow: var(--pop); }
.note-pn small { color: var(--accent); font: 700 .85rem var(--display); }
.note-pn b { font: 800 1.05rem/1.3 var(--display); }
.note-pn .pn-next { text-align: right; grid-column: 2; }
@media (max-width: 760px) {
  .note-card.note-hero { flex-direction: column; }
  .note-hero .nc-cover { aspect-ratio: 1200 / 630; min-height: 0; border-right: 0; border-bottom: var(--b); }
  .note-hero .nc-body { padding: 22px 24px 26px; }
  .share-top { margin-left: 0; width: 100%; }
  .note-pn { grid-template-columns: 1fr; }
  .note-pn .pn-next { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .note-pn a, .note-card { transition: none; } }
html[data-theme="dark"] .note-author .hand { color: var(--ink); }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .note-author .hand { color: var(--ink); } }

/* iPhones zoom in on form fields under 16px */
@media (max-width: 760px), (pointer: coarse) { input:not([type=checkbox]):not([type=radio]), textarea, select { font-size: 16px !important; } }

/* ---------- Always learning (spotlighted courses & certificates) ---------- */
.learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; align-items: start; }
.learn { background: var(--pastel); border: var(--b); border-radius: var(--r); box-shadow: var(--pop); padding: 28px; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.learn:nth-child(3n+1) { transform: rotate(-.8deg); } .learn:nth-child(3n+2) { transform: rotate(.6deg); }
.learn:hover { transform: rotate(0) translateY(-6px); }
.learn-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.learn-head .logo { flex: none; }
.learn-kind { display: inline-flex; align-items: center; gap: 6px; font: 700 .78rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.learn-org { margin: 4px 0 0; font-weight: 600; }
.learn-org a { color: inherit; }
.learn h3 { margin: 0 0 6px; font: 800 1.45rem/1.15 var(--display); letter-spacing: -.02em; }
.learn-when { margin: 0 0 10px; color: var(--text-2); font-size: .92rem; }
.learn-desc { color: var(--text-2); }
.learn-desc p { margin: 0 0 6px; }
.learn-desc ul, .learn-desc ol { margin: 4px 0 8px; padding-left: 22px; }
.learn-desc.clamp { max-height: 6.2em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
.learn-verify { display: inline-flex; align-items: center; gap: 7px; margin-top: 14px; padding: 8px 14px; border: var(--b); border-radius: 999px; background: var(--paper); color: var(--ink); font: 600 .9rem var(--display); box-shadow: 3px 3px 0 var(--shade); text-decoration: none; }
.learn-verify:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--shade); }
.learn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.learn-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; background: var(--paper); border: var(--b); border-radius: 14px; }
.learn-list strong { display: block; font: 700 1rem/1.25 var(--display); }
.learn-list span { color: var(--text-2); font-size: .85rem; }
.learn-list a { flex: none; display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 600; font-size: .85rem; text-decoration: none; }
.learn-list a span { color: inherit; font-size: inherit; }
@media (max-width: 640px) { .learn { box-shadow: var(--pop-sm); padding: 22px; } }
@media (prefers-reduced-motion: reduce) { .learn, .learn:nth-child(n) { transform: none; transition: none; } }

/* ---------- Certificate badges (clickable to the verification page) ---------- */
.badge-wrap { flex: none; display: inline-block; line-height: 0; border-radius: 12px; transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
a.badge-wrap:hover { transform: scale(1.07) rotate(-3deg); }
a.badge-wrap:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.badge-img { width: 64px; height: 64px; object-fit: contain; }
.badge-img.lg { width: 72px; height: 72px; }
.learn-list li .badge-wrap { order: -1; }
.learn-list li .badge-img { width: 52px; height: 52px; }
.learn-list li > div { flex: 1; min-width: 0; }
/* Timeline: a badge in the logo spot (single item), or next to each course in a company group */
.badge-img.logo-size { width: 46px; height: 46px; }
.org > .badge-wrap { align-self: start; }
.role.has-badge { padding-left: 76px; min-height: 44px; }
.role .badge-wrap { position: absolute; left: 24px; top: 0; }
.role-badge { width: 40px; height: 40px; }
@media (max-width: 640px) { .badge-img.logo-size { width: 38px; height: 38px; } .role.has-badge { padding-left: 68px; } }

/* ---------- Course with modules ---------- */
.mod-progress { display: flex; align-items: center; gap: 6px; margin: 14px 0 10px; font: 700 .85rem/1.2 var(--display); color: var(--accent); }
.learn .mod-progress { margin-top: 16px; }
.mod-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mod-list li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; }
.mod-list li > div { flex: 1; min-width: 0; }
.mod-list strong { display: block; font: 700 .95rem/1.25 var(--display); }
.mod-list span { color: var(--text-2); font-size: .82rem; }
.mod-list .badge-wrap { order: -1; }
.mod-list .badge-img { width: 40px; height: 40px; }
.mod-list .chk { flex: none; display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 600; font-size: .82rem; text-decoration: none; }
.mod-list .chk span { color: inherit; font-size: inherit; }

/* ---------- Badge pop-up ---------- */
.badge-dlg { padding: 18px; border: 0; background: transparent; overflow: visible; max-width: calc(100vw - 16px); }
.badge-dlg::backdrop { background: rgba(28, 26, 46, .55); backdrop-filter: blur(3px); }
.bdg { position: relative; width: min(380px, calc(100vw - 52px)); background: var(--paper); color: var(--ink); border: var(--b); border-radius: var(--r); box-shadow: var(--pop); padding: 34px 28px 28px; text-align: center; }
.badge-dlg[open] .bdg { animation: card-in .35s cubic-bezier(.2, .8, .2, 1); }
.bdg-img { display: block; width: min(280px, 100%); height: auto; aspect-ratio: 1; object-fit: contain; margin: 0 auto 18px; }
.bdg h3 { margin: 0 0 6px; font: 800 1.3rem/1.2 var(--display); letter-spacing: -.01em; }
.bdg-sub { margin: 0; color: var(--text-2); font-size: .92rem; }
.bdg-verify { margin-top: 20px; }
a.badge-wrap { cursor: zoom-in; }
@media (prefers-reduced-motion: reduce) { .badge-dlg[open] .bdg { animation: none; } }
