/* Layout idea: a Nordic broadsheet. Big condensed name, a red rule, then four clear sections: Work, Talks, Books, Contact. */
:root {
  --paper: #f4f5f6;
  --surface: #ffffff;
  --ink: #14202e;
  --muted: #56616e;
  --line: #d9dde2;
  --accent: #c8102e; /* Danish red */
  --accent-ink: #ffffff;
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1720;
    --surface: #17212c;
    --ink: #e9edf1;
    --muted: #9aa6b2;
    --line: #2a3644;
    --accent: #ef4056;
    --accent-ink: #ffffff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1720;
  --surface: #17212c;
  --ink: #e9edf1;
  --muted: #9aa6b2;
  --line: #2a3644;
  --accent: #ef4056;
  --accent-ink: #ffffff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* Nav */
.nav { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; font-stretch: 85%; letter-spacing: .02em; text-transform: uppercase; text-decoration: none; font-size: 1rem; }
.brand span { color: var(--accent); }
.nav ul { list-style: none; display: flex; gap: clamp(12px, 3vw, 28px); margin: 0; padding: 0; flex-wrap: wrap; }
.nav ul a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav ul a:hover { color: var(--ink); }

/* Hero */
.hero { padding: clamp(48px, 9vw, 96px) 0 clamp(36px, 6vw, 64px); }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: clamp(24px, 5vw, 64px); align-items: end; }
.place { font-size: .9rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
h1 {
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 75%;
  text-transform: uppercase;
  font-size: clamp(3.4rem, 12vw, 8.5rem);
  line-height: .86;
  letter-spacing: -.01em;
  margin: 0;
}
.rule { width: 96px; height: 6px; background: var(--accent); margin: 28px 0 24px; border: 0; }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.45; max-width: 34ch; margin: 0; text-wrap: balance; }
.roles { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.roles li { border: 1px solid var(--line); background: var(--surface); padding: 4px 12px; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-block; text-decoration: none; font-weight: 600; padding: 12px 22px; border-radius: 4px; border: 2px solid var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { transform: translateY(-1px); }

.portrait {
  width: clamp(190px, 27vw, 300px);
  aspect-ratio: 4 / 5;
  margin: 0;
  background: transparent;
  position: relative;
  overflow: hidden;
}
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.portrait::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 8px; background: var(--accent); }

/* Numbers band */
.numbers { background: var(--ink); color: var(--paper); }
.numbers .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { padding: 28px 20px 28px 0; border-right: 1px solid color-mix(in srgb, var(--paper) 18%, transparent); padding-left: 20px; }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-stretch: 80%; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 8px; font-size: .92rem; line-height: 1.35; opacity: .78; }

/* Sections */
section.block { padding: clamp(56px, 8vw, 96px) 0; border-bottom: 1px solid var(--line); }
.sec-head { display: grid; grid-template-columns: 220px 1fr; gap: clamp(20px, 4vw, 48px); }
.label { font-family: var(--display); font-weight: 800; font-stretch: 85%; text-transform: uppercase; letter-spacing: .06em; font-size: .95rem; color: var(--accent); margin: 6px 0 0; }
h2 { font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.05; margin: 0 0 18px; text-wrap: balance; }
h3 { font-family: var(--display); font-weight: 700; font-stretch: 90%; font-size: 1.3rem; line-height: 1.2; margin: 0 0 8px; }
p { max-width: 65ch; margin: 0 0 14px; }
.muted { color: var(--muted); }

/* Work timeline */
.timeline { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.timeline .when { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .95rem; }
.timeline .what b { display: block; }
.timeline .what span { color: var(--muted); font-size: .97rem; }
.timeline li.now .when { color: var(--accent); font-weight: 600; }
.timeline li { grid-template-columns: 88px 1fr auto; align-items: center; }
.logo {
  width: 88px; height: 56px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--display); font-weight: 800; font-stretch: 80%;
  font-size: 1.05rem; letter-spacing: .02em; color: var(--ink);
  overflow: hidden;
}
.logo img { display: block; width: auto; height: auto; max-width: 74px; max-height: 44px; object-fit: contain; }
.logo.has-img { background: #ffffff; border-color: var(--line); }
.timeline li.now .logo { border-color: var(--accent); color: var(--accent); }
.timeline .what b { font-size: 1.05rem; line-height: 1.3; }
.timeline .what span { display: block; margin-top: 2px; }
.timeline .when { text-align: right; white-space: nowrap; }

/* Talks */
.talk-card { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--accent); padding: clamp(22px, 4vw, 36px); margin-top: 8px; }
.talk-title { font-family: var(--display); font-weight: 900; font-stretch: 75%; text-transform: uppercase; font-size: clamp(2.4rem, 6vw, 3.8rem); line-height: .9; margin: 0 0 6px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 26px 0 0; padding: 0; list-style: none; }
.facts li { border-top: 2px solid var(--ink); padding-top: 10px; font-size: .97rem; }
.facts li b { display: block; font-family: var(--display); font-stretch: 85%; font-size: 1.1rem; }
blockquote { margin: 24px 0 0; padding: 0; font-family: var(--display); font-stretch: 90%; font-weight: 600; font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.3; max-width: 30ch; text-wrap: balance; }

/* Books */
.books { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 40px); align-items: start; }
.shelf { display: flex; gap: 10px; align-items: end; height: 190px; padding: 0 0 0 4px; border-bottom: 6px solid var(--ink); }
.spine { width: 44px; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--display); font-weight: 800; font-stretch: 80%; text-transform: uppercase; font-size: .85rem; letter-spacing: .06em; color: #fff; }
.spine:nth-child(1) { height: 92%; background: #c8102e; }
.spine:nth-child(2) { height: 80%; background: #1f5f8b; }
.spine:nth-child(3) { height: 96%; background: #2f7d5b; }
.spine:nth-child(4) { height: 86%; background: #d98a1c; }
.spine:nth-child(5) { height: 74%; background: #5b4a8b; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.tags li { background: var(--surface); border: 1px solid var(--line); padding: 3px 10px; font-size: .88rem; border-radius: 3px; }

/* Contact */
.contact { background: var(--accent); color: var(--accent-ink); border-bottom: 0; }
.contact .label { color: var(--accent-ink); opacity: .85; }
.contact-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.contact-list li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid color-mix(in srgb, var(--accent-ink) 35%, transparent); font-size: 1.1rem; }
.contact-list li span:first-child { opacity: .8; font-size: .95rem; }
.todo { border-bottom: 1px dashed currentColor; opacity: .85; }

footer { padding: 28px 0 40px; color: var(--muted); font-size: .9rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { order: -1; width: 160px; }
  .numbers .wrap { grid-template-columns: 1fr 1fr; }
  .stat { padding: 22px 16px; border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--paper) 18%, transparent); }
  .stat:first-child { padding-left: 16px; }
  .sec-head { grid-template-columns: 1fr; gap: 8px; }
  .facts { grid-template-columns: 1fr; }
  .books { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .timeline li { grid-template-columns: 72px 1fr; gap: 4px 14px; }
  .logo { width: 72px; height: 48px; grid-row: span 2; }
  .logo img { max-width: 60px; max-height: 38px; }
  .timeline .when { text-align: left; grid-column: 2; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
  .numbers .wrap { grid-template-columns: 1fr; }
}

/* ---------- Sub-pages ---------- */
.nav ul a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); padding-bottom: 4px; }
.page-hero { padding: clamp(44px, 8vw, 88px) 0 clamp(32px, 5vw, 56px); }
.page-hero .kicker { font-size: .9rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.page-hero .kicker a { color: var(--muted); }
.page-hero h1 { font-size: clamp(2.8rem, 10.5vw, 7.5rem); }
.page-hero .lede { max-width: 40ch; }

.signs { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.signs li { background: var(--surface); border: 1px solid var(--line); padding: 18px 20px; }
.signs li b { display: block; font-family: var(--display); font-stretch: 88%; font-size: 1.08rem; margin-bottom: 4px; }
.signs li span { color: var(--muted); font-size: .98rem; }

.agenda { list-style: none; margin: 24px 0 0; padding: 0; counter-reset: step; }
.agenda li { counter-increment: step; display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.agenda li::before { content: counter(step, decimal-leading-zero); font-family: var(--display); font-weight: 900; font-stretch: 75%; font-size: 2.2rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.agenda li b { display: block; font-family: var(--display); font-stretch: 88%; font-size: 1.15rem; margin-bottom: 2px; }
.agenda li span { color: var(--muted); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 40px); }
.panel { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--ink); padding: 22px 24px; }
.panel.red { border-top-color: var(--accent); }
.panel ul { margin: 10px 0 0; padding-left: 20px; }
.panel li { margin: 4px 0; }

.topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.topic { background: var(--surface); border: 1px solid var(--line); padding: 0 0 18px; overflow: hidden; }
.topic i { display: block; height: 10px; margin-bottom: 16px; }
.topic b, .topic span { padding: 0 18px; display: block; }
.topic b { font-family: var(--display); font-stretch: 85%; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.topic span { color: var(--muted); font-size: .97rem; }

.shelf.big { height: 260px; gap: 12px; }
.shelf.big .spine { width: 60px; font-size: 1rem; }

.puzzles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.puzzle { background: #ffffff; color: #14202e; border: 1px solid var(--line); padding: 18px; }
.puzzle b { display: block; font-family: var(--display); font-stretch: 85%; font-size: 1.15rem; margin-top: 12px; }
.puzzle span { color: #56616e; font-size: .95rem; }
.puzzle svg { display: block; width: 100%; height: auto; }

.todo-card { border: 2px dashed var(--line); padding: 22px 24px; color: var(--muted); margin-top: 24px; }

@media (max-width: 820px) {
  .signs, .two-col, .puzzles { grid-template-columns: 1fr; }
  .topics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .topics { grid-template-columns: 1fr; }
  .shelf.big .spine { width: 44px; font-size: .8rem; }
}

/* ---------- Carousel ---------- */
.carousel { margin-top: 28px; }
.car-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.car-count { margin: 0; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.car-count b { color: var(--accent); font-family: var(--display); font-size: 1.3rem; }
.car-btns { display: flex; gap: 8px; }
.car-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.car-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.car-btn:disabled { opacity: .35; cursor: default; }
.car-track { list-style: none; margin: 0; padding: 0 0 12px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 42%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: thin; }
.car-track:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.slide { scroll-snap-align: start; }
.slide img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: #14202e; }
.car-hint { font-size: .92rem; margin: 6px 0 0; }
@media (prefers-reduced-motion: reduce) { .car-track { scroll-behavior: auto; } }
@media (max-width: 820px) { .car-track { grid-auto-columns: 78%; } }
.sec-head > * { min-width: 0; }

/* ---------- Book covers ---------- */
.books-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 2vw, 20px); margin-top: 28px; }
.book { background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; }
.book img { display: block; width: 100%; height: auto; aspect-ratio: 0.645; object-fit: cover; object-position: center top; }
.book-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.book-series { margin: 0; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.book h3 { margin: 2px 0 0; font-size: 1.02rem; line-height: 1.25; }
.book-meta { margin: 0; color: var(--muted); font-size: .85rem; }
.book-btn { margin-top: auto; text-align: center; padding: 10px 16px; }
@media (max-width: 1000px) { .books-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 820px) { .books-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .books-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Activity cards ---------- */
.acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2.4vw, 24px); margin-top: 28px; }
.act { --tone: #c8102e; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.act-words { --tone: #1f5f8b; }
.act-maze { --tone: #2f7d5b; }
.act-stage {
  padding: 26px 22px 22px;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--tone) 28%, transparent) 1px, transparent 1.5px) 0 0 / 14px 14px,
    color-mix(in srgb, var(--tone) 14%, var(--surface));
  border-bottom: 4px solid var(--tone);
  display: flex; align-items: center; justify-content: center;
}
.act-sheet {
  background: #ffffff; color: #14202e;
  border-radius: 4px;
  padding: 12px 12px 10px;
  box-shadow: 0 1px 2px rgba(20,32,46,.12), 0 14px 28px -16px rgba(20,32,46,.45);
  transform: rotate(-1.6deg);
  transition: transform .25s ease;
}
.act-words .act-sheet { transform: rotate(1.2deg); }
.act-maze .act-sheet { transform: rotate(-0.8deg); }
.act:hover .act-sheet { transform: rotate(0deg) translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .act-sheet, .act:hover .act-sheet { transition: none; } }
.act-sheet { width: 100%; max-width: 230px; }
.act-sheet svg { display: block; width: 100%; height: 170px; margin: 8px 0 6px; }
.act-sheet-head { display: flex; justify-content: space-between; align-items: center; margin: 0; padding-bottom: 7px; border-bottom: 1.5px solid #14202e; font-family: var(--display); font-stretch: 85%; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; gap: 6px; }
.act-sheet-head span:first-child { color: #c8102e; }
.act-sheet-head span:last-child { color: #56616e; }
.act-sheet-foot { margin: 0; text-align: right; font-size: .68rem; color: #9aa3ad; font-style: italic; }
.act-body { padding: 16px 18px 20px; }
.act-body h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.act-body h3::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--tone); flex: none; }
.act-body p { margin: 0; color: var(--muted); font-size: .97rem; }
@media (max-width: 820px) { .acts { grid-template-columns: 1fr; max-width: 420px; } }

/* ---------- Gashlight books ---------- */
.gl-books { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 28px); margin-top: 26px; }
.gl-book { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.gl-book img { display: block; width: 100%; height: auto; align-self: start; }
.gl-book-body { min-width: 0; padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.gl-book-body h3 { margin: 0; font-size: 1.2rem; line-height: 1.2; }
.gl-book-body p { margin: 0; font-size: .95rem; color: var(--muted); }
.gl-book-body .btn { margin-top: auto; padding: 10px 16px; font-size: .95rem; }
.pill { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.pill-live { background: var(--accent); color: var(--accent-ink); }
.pill-soon { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
@media (max-width: 1000px) { .gl-books { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .gl-book { grid-template-columns: 1fr; } .gl-book img { max-height: 420px; object-position: top; } }

/* ---------- Work intro ---------- */
#work strong { color: var(--ink); font-weight: 600; }
.motto { font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.15; color: var(--accent); margin: 18px 0 10px; }
.closing { font-style: italic; color: var(--muted); border-left: 4px solid var(--accent); padding-left: 14px; margin-bottom: 8px; }

/* ---------- Work memories ---------- */
.mem-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; grid-auto-flow: dense; gap: clamp(10px, 1.6vw, 16px); }
.mem { margin: 0; position: relative; overflow: hidden; border-radius: 6px; background: var(--ink); cursor: zoom-in; }
.mem.wide { grid-column: span 2; }
.mem.tall { grid-row: span 2; }
.mem img, .mem-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mem img { transition: transform .5s ease; }
.mem:hover img, .mem:focus-visible img { transform: scale(1.04); }
.mem:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.mem figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; color: #fff; background: linear-gradient(to top, rgba(10,16,24,.85), rgba(10,16,24,0)); display: flex; flex-direction: column; gap: 2px; }
.mem figcaption b { font-family: var(--display); font-stretch: 88%; font-size: 1.1rem; }
.mem figcaption span { font-size: .9rem; opacity: .85; }
.mem::after { content: ""; position: absolute; left: 0; top: 0; width: 44px; height: 5px; background: var(--accent); }
/* empty slots */
.mem.is-empty { cursor: default; background: var(--surface); border: 2px dashed var(--line); }
.mem.is-empty::after { display: none; }
.mem.is-empty .mem-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--line) 45%, transparent) 14px 15px); }
.mem-num { font-family: var(--display); font-weight: 900; font-stretch: 75%; font-size: 2.6rem; line-height: 1; color: var(--accent); opacity: .85; }
.mem-add { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.mem.is-empty figcaption { background: none; color: var(--ink); padding: 12px 14px; }
.mem.is-empty figcaption span { color: var(--muted); opacity: 1; }
@media (max-width: 820px) { .mem-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; } }
@media (max-width: 480px) { .mem-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; } .mem.wide { grid-column: span 1; } .mem.tall { grid-row: span 1; } }
/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(8,12,18,.92); display: flex; align-items: center; justify-content: center; padding: 56px 64px; }
.lightbox[hidden] { display: none; }
.lb-fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-fig img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; border-radius: 4px; }
.lb-fig figcaption { color: #e9edf1; font-size: 1rem; text-align: center; }
.lb-close, .lb-nav { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; width: 46px; height: 46px; font-size: 1.4rem; cursor: pointer; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.22); }
.mem.is-empty .mem-photo { bottom: 64px; height: auto; }
.mem.is-empty figcaption { border-top: 1px dashed var(--line); }
/* memory that is a whole post screenshot: show it all */
.mem.mem-post { background: #ffffff; border: 1px solid var(--line); grid-row: span 3; }
.mem.mem-post { display: flex; flex-direction: column; }
.mem.mem-post img { position: static; flex: 1 1 auto; min-height: 0; object-fit: contain; object-position: center top; padding: 10px; }
.mem.mem-post figcaption { position: static; }
.mem.mem-post:hover img, .mem.mem-post:focus-visible img { transform: none; }
.mem.mem-post figcaption { background: var(--ink); padding: 12px 16px; }
@media (max-width: 480px) { .mem.mem-post { grid-row: span 3; } }

/* ---------- Memories: masonry for full posts ---------- */
.mem-grid.masonry { display: block; column-count: 3; column-gap: clamp(10px, 1.6vw, 16px); }
.masonry .mem { break-inside: avoid; display: block; margin: 0 0 clamp(10px, 1.6vw, 16px); }
.masonry .mem.mem-post { display: flex; flex-direction: column; }
.masonry .mem.mem-post img { position: static; width: 100%; height: auto; flex: none; padding: 8px; }
.masonry .mem.is-empty { height: 220px; }
@media (max-width: 820px) { .mem-grid.masonry { column-count: 2; } }
@media (max-width: 480px) { .mem-grid.masonry { column-count: 1; } }
.masonry .mem.mem-pic { position: relative; }
.masonry .mem.mem-pic img { position: static; display: block; width: 100%; height: auto; }
.masonry .mem.mem-pic { display: flex; flex-direction: column; }
.masonry .mem.mem-pic figcaption { position: static; background: var(--ink); padding: 12px 16px; }

/* ---------- QA fixes ---------- */
/* Fill colour for red areas that carry white text: keeps 4.5:1 in dark mode */
:root { --accent-fill: #c8102e; }
.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); }
.contact { background: var(--accent-fill); }
.pill-live { background: var(--accent-fill); }
.contact a { color: #ffffff; }
.btn-onred { border-color: #ffffff; color: #ffffff; }
.btn-onred:hover { background: #ffffff; color: #c8102e; }
.cta-mail { margin: 0 0 14px; }
.mail-hint { font-size: .92rem; opacity: .9; margin-bottom: 18px; }
.act-sheet-foot { color: #66707b; }
/* skip link */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 4px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
/* tap targets in the menu */
.nav ul a { display: inline-block; padding: 10px 2px; }
.nav ul a[aria-current="page"] { padding-bottom: 7px; }
/* topic colour bars without inline styles */
.t-red { background: #c8102e; } .t-blue { background: #1f5f8b; } .t-green { background: #2f7d5b; } .t-amber { background: #d98a1c; }
@media (max-width: 480px) { .nav .wrap { padding-top: 6px; padding-bottom: 6px; } .nav ul { gap: 4px 14px; } }
@media (max-width: 480px) {
  .nav { position: static; }
  .nav ul a { padding: 7px 0; font-size: .92rem; }
  .nav ul { gap: 2px 14px; }
}

/* Gashlight practical details */
.details { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 28px; margin: 20px 0 8px; }
.details div { border-top: 1px solid var(--line); padding: 12px 0; }
.details dt { font-family: var(--display); font-stretch: 85%; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; color: var(--accent); }
.details dd { margin: 4px 0 0; }
.takeaway-head { margin-top: 26px; }
.takeaways { margin: 8px 0 22px; padding-left: 20px; max-width: 62ch; }
.takeaways li { margin: 6px 0; }
@media (max-width: 560px) { .details { grid-template-columns: 1fr; } }
/* Lighthouse contrast fixes */
.contact-list li span:first-child { opacity: 1; color: #ffffff; font-weight: 600; }
.contact .label { opacity: 1; }
.mail-hint { opacity: 1; }
.spine:nth-child(4) { background: #9a5a0c; }
/* accessible open-photo button covering each memory */
.mem-open { position: absolute; inset: 0; z-index: 2; background: transparent; border: 0; padding: 0; cursor: zoom-in; }
.mem-open:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.mem { position: relative; }
/* copy-email button */
.copy-email { background: transparent; cursor: pointer; font: inherit; font-weight: 600; color: var(--ink); }
.contact .copy-email { border-color: #ffffff; color: #ffffff; }
.contact .copy-email:hover { background: #ffffff; color: #c8102e; }
.copy-status { align-self: center; font-size: .95rem; font-weight: 600; }

/* ---------- Certifications ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 18px); margin-top: 26px; }
.cert-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--ink); border-radius: 6px; padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; }
.c-kind { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.cert-card h3 { margin: 2px 0 4px; font-size: 1.08rem; line-height: 1.25; }
.c-meta { margin: 0; color: var(--muted); font-size: .93rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.c-id { margin: 4px 0 0; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; word-break: break-all; }
.pill-v, .pill-x { font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; letter-spacing: .02em; }
.pill-v { color: #1d6b49; border: 1.5px solid #2f7d5b; }
.pill-x { color: var(--muted); border: 1.5px solid var(--line); }
:root[data-theme="dark"] .pill-v { color: #6fd3a5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill-v { color: #6fd3a5; } }
.cert-tools { margin: 22px 0 8px; display: flex; flex-direction: column; gap: 14px; }
.search input { width: 100%; max-width: 520px; font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.search input:focus { outline: none; border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .92rem; font-weight: 600; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip span { color: var(--muted); font-weight: 400; margin-left: 4px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip[aria-pressed="true"] span { color: inherit; opacity: .75; }
.chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cert-result { margin: 0; color: var(--muted); font-size: .92rem; }
.cert-year { margin-top: 26px; }
.cert-year h3 { display: flex; align-items: baseline; gap: 10px; font-size: 1.6rem; margin: 0 0 6px; }
.y-count { font-family: var(--body); font-size: .9rem; font-weight: 600; color: var(--muted); }
.cert-list { list-style: none; margin: 0; padding: 0; }
.cert-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 11px 0; border-top: 1px solid var(--line); }
.cert-row[hidden], .cert-year[hidden] { display: none; }
.r-title { font-weight: 600; }
.r-meta { color: var(--muted); font-size: .9rem; text-align: right; white-space: nowrap; }
.r-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .74rem; font-weight: 600; padding: 1px 8px; border-radius: 3px; background: color-mix(in srgb, var(--line) 55%, transparent); color: var(--ink); }
.cert-empty { margin-top: 18px; color: var(--muted); }
@media (max-width: 1000px) { .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cert-grid { grid-template-columns: 1fr; } .cert-row { grid-template-columns: 1fr; } .r-meta { text-align: left; white-space: normal; } }
.page-hero h1.h1-long { font-size: clamp(2.4rem, 8.6vw, 6.4rem); }
/* certificate details + viewer */
.r-extra { grid-column: 1 / -1; color: var(--muted); font-size: .88rem; }
.r-id { font-variant-numeric: tabular-nums; word-break: break-all; font-size: .8rem; }
.r-view { grid-column: 1 / -1; justify-self: start; margin-top: 4px; font: inherit; font-size: .88rem; font-weight: 600; padding: 6px 12px; border-radius: 4px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: zoom-in; }
.r-view:hover { background: var(--ink); color: var(--paper); }
.r-view:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.cert-dialog { border: 0; padding: 0; border-radius: 8px; max-width: min(1000px, 94vw); width: 100%; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.cert-dialog::backdrop { background: rgba(8,12,18,.8); }
.cd-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.cd-head p { margin: 0; font-weight: 600; }
.cd-close { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font-size: 1.3rem; cursor: pointer; flex: none; }
.cert-dialog img { display: block; width: 100%; height: auto; }
.c-extra { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.cert-card .c-view { margin-top: 10px; align-self: flex-start; }
/* merged list: highlight credentials */
.cert-row.is-cred { border-left: 4px solid var(--accent); padding-left: 12px; background: color-mix(in srgb, var(--accent) 5%, transparent); }
.r-kind { display: block; margin: 0 0 2px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); vertical-align: 2px; }
.r-credid { grid-column: 1 / -1; color: var(--muted); }
.r-meta .pill-v, .r-meta .pill-x { margin-left: 4px; }

/* ---------- Travel ---------- */
:root { --work: #c8102e; --private: #1f5f8b; --land: #d7dce2; --land-line: #f4f5f6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --work: #ef4056; --private: #5aa3d6; --land: #2a3644; --land-line: #0f1720; } }
:root[data-theme="dark"] { --work: #ef4056; --private: #5aa3d6; --land: #2a3644; --land-line: #0f1720; }
.subnav { display: flex; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.subnav a { text-decoration: none; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); background: var(--surface); }
.subnav a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.map-block { padding-top: clamp(28px, 4vw, 48px); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 14px; padding: 0; font-weight: 600; }
.legend li { display: flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 18px; height: 18px; border-radius: 3px; vertical-align: -3px; margin-right: 6px; }
.legend .sw { margin-right: 0; }
.sw-work-k { background: var(--work); }
.sw-private-k { background: var(--private); }
.sw-both-k { background: repeating-linear-gradient(45deg, var(--work) 0 4px, var(--private) 4px 8px); }
.map-wrap { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: clamp(6px, 1.5vw, 16px); }
.world { display: block; width: 100%; height: auto; }
.cty { fill: var(--land); stroke: var(--land-line); stroke-width: .4; transition: opacity .15s; }
.cty:hover { opacity: .8; }
.st-work { fill: var(--work); }
.st-private { fill: var(--private); }
.st-both { fill: url(#both-stripes); }
.sw-work { fill: var(--work); } .sw-private { fill: var(--private); }
.dot { display: none; stroke: var(--surface); stroke-width: 1; }
.dot.st-work, .dot.st-private, .dot.st-both { display: inline; }
.is-editing .dot { display: inline; fill: var(--muted); opacity: .55; }
.is-editing .dot.st-work, .is-editing .dot.st-private, .is-editing .dot.st-both { opacity: 1; }
.is-editing .cty, .is-editing .dot { cursor: pointer; }
.map-tip { position: absolute; transform: translate(-50%, calc(-100% - 12px)); background: var(--ink); color: var(--paper); font-size: .88rem; font-weight: 600; padding: 6px 10px; border-radius: 4px; pointer-events: none; white-space: nowrap; }
.cty-lists { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; margin-top: 12px; }
.cty-group h3 { display: flex; align-items: center; gap: 4px; font-size: 1.15rem; }
.cty-group ul { margin: 8px 0 0; padding: 0; list-style: none; }
.cty-group li { padding: 6px 0; border-top: 1px solid var(--line); }
.editor { margin-top: 24px; background: var(--surface); border: 2px dashed var(--accent); border-radius: 8px; padding: 18px 20px; }
.editor h2 { font-size: 1.4rem; }
.ed-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.ed-row input, .ed-row select { font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); min-width: 0; }
.ed-row label { font-weight: 600; }
#ed-out { width: 100%; font: .92rem/1.5 ui-monospace, Menlo, Consolas, monospace; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); }
@media (max-width: 820px) { .cty-lists { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .cty-lists { grid-template-columns: 1fr; } }
.map-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.map-bar .legend { margin: 0; }
.map-view { display: flex; gap: 6px; }
.cty, .dot { vector-effect: non-scaling-stroke; }
.cty { stroke-width: .7px; }

/* Travel: neon palette on a dark map panel (same in light and dark mode) */
:root, :root[data-theme="dark"] { --work: #39ff14; --private: #ffea00; --land: #2b3a4c; --land-line: #0e1724; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --work: #39ff14; --private: #ffea00; --land: #2b3a4c; --land-line: #0e1724; } }
.map-wrap { background: #0e1724; border-color: #0e1724; }
.cty.st-work, .cty.st-private, .cty.st-both { stroke: #0e1724; stroke-width: .9px; filter: drop-shadow(0 0 2px rgba(57,255,20,.35)); }
.cty.st-private { filter: drop-shadow(0 0 2px rgba(255,234,0,.35)); }
.map-tip { background: #ffffff; color: #0e1724; }
.city circle { fill: var(--work); stroke: #0e1724; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.city.st-private circle { fill: var(--private); }
.city text { fill: #ffffff; font: 700 9px var(--body); paint-order: stroke; stroke: #0e1724; stroke-width: 2.5px; }
.sw-work-k, .sw-private-k, .sw-both-k { box-shadow: inset 0 0 0 1px rgba(14,23,36,.35); }
.city-note { margin-top: 18px; color: var(--muted); }
.city circle, .city.st-private circle { fill: #ffffff; stroke: #0e1724; stroke-width: 2px; }
.lbl { display: none; fill: #ffffff; font-family: var(--body); font-weight: 700; text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: #0e1724; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; vector-effect: non-scaling-stroke; letter-spacing: .02em; }
.lbl.on { display: inline; }
.city text { font-weight: 600; fill: #ffffff; stroke-width: 3px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.city circle { vector-effect: non-scaling-stroke; }
.city { pointer-events: none; }
.city { pointer-events: auto; cursor: default; }
.city text { pointer-events: none; }
@media (max-width: 700px) { .city text { display: none !important; } .lbl { font-weight: 800; } }
.cert-dialog img { width: auto; max-width: 100%; max-height: calc(100vh - 110px); margin: 0 auto; object-fit: contain; }

/* ---------- Core competencies ---------- */
.comp-cloud { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; max-width: 980px; }
.comp-cloud li { font-size: .9rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.comp-count { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.comp-intro { font-size: 1.15rem; margin-bottom: 18px; }
.comp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 16px); }
.comp { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 16px 18px; }
.comp h3 { margin: 0 0 6px; font-size: 1.1rem; line-height: 1.25; }
.comp p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 640px) { .comp-grid { grid-template-columns: 1fr; } }
/* education, languages, values */
.sub-h { font-size: 1.3rem; margin: 0 0 10px; }
.edu-list { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.edu-list li { display: flex; justify-content: space-between; gap: 6px 18px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.edu-title { font-weight: 600; }
.edu-meta { color: var(--muted); font-size: .93rem; }
.small-note { font-size: .92rem; margin-top: 14px; }
.lang-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; max-width: 560px; }
.lang-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.lang-top span { color: var(--muted); }
.lang-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.lang-bar i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 999px; }
.values { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.values li { font-family: var(--display); font-weight: 800; font-stretch: 85%; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(1rem, 2.2vw, 1.35rem); padding: 10px 18px; border: 2px solid var(--ink); border-radius: 6px; }
.values li:nth-child(odd) { background: var(--ink); color: var(--paper); }
@media (max-width: 400px) { .page-hero h1.h1-long { font-size: 2.15rem; } }

/* ---------- Mobile menu ---------- */
.nav-toggle { display: none; }
@media (max-width: 1100px) { .nav ul { gap: 4px 18px; } .nav ul a { font-size: .92rem; } }
@media (max-width: 1000px) {
  .nav.has-toggle .wrap { flex-wrap: nowrap; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; color: var(--ink); background: transparent; border: 1.5px solid var(--line); border-radius: 6px; padding: 8px 12px; cursor: pointer; min-height: 40px; }
  .nav-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .nav-bars, .nav-bars::before, .nav-bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, opacity .2s; }
  .nav-bars::before, .nav-bars::after { content: ""; position: absolute; left: 0; }
  .nav-bars::before { top: -6px; } .nav-bars::after { top: 6px; }
  .nav.open .nav-bars { background: transparent; }
  .nav.open .nav-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav.open .nav-bars::after { transform: translateY(-6px) rotate(-45deg); }
  .nav.has-toggle ul { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 6px clamp(16px, 4vw, 40px) 14px; box-shadow: 0 14px 24px -18px rgba(0,0,0,.4); }
  .nav.has-toggle.open ul { display: flex; }
  .nav.has-toggle ul a { display: block; padding: 12px 0; font-size: 1.05rem; border-top: 1px solid var(--line); }
  .nav.has-toggle ul li:first-child a { border-top: 0; }
  .nav.has-toggle ul a[aria-current="page"] { box-shadow: none; color: var(--accent); }
  .nav { position: sticky; }
}
@media (prefers-reduced-motion: reduce) { .nav-bars, .nav-bars::before, .nav-bars::after { transition: none; } }

/* ---------- References ---------- */
.ref-lead { background: var(--ink); color: var(--paper); padding: clamp(36px, 6vw, 64px) 0; }
.ref-lead figure { margin: 0; }
.ref-lead blockquote { margin: 0; }
.ref-lead blockquote p { font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: clamp(1.8rem, 5vw, 3.4rem); line-height: 1.05; max-width: 30ch; margin: 0; text-wrap: balance; }
.ref-lead figcaption { margin-top: 18px; opacity: .85; }
.ref-lead figcaption b { color: #ff6b7d; }
.ref-grid { columns: 3; column-gap: clamp(12px, 2vw, 18px); }
.ref { break-inside: avoid; margin: 0 0 clamp(12px, 2vw, 18px); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 18px 16px; position: relative; }
.ref::before { content: "“"; position: absolute; top: -6px; left: 14px; font-family: var(--display); font-weight: 900; font-size: 4rem; line-height: 1; color: var(--accent); opacity: .9; }
.ref blockquote { margin: 18px 0 14px; }
.ref blockquote p { margin: 0; font-size: 1.02rem; line-height: 1.5; }
.ref.ref-big blockquote p { font-size: 1.15rem; font-weight: 600; }
.ref figcaption { display: grid; grid-template-columns: 40px 1fr; gap: 2px 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.ref-avatar { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
.ref-who b { display: block; }
.ref-who span { display: block; color: var(--muted); font-size: .88rem; line-height: 1.3; }
.ref-src { grid-column: 2; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.recog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: clamp(20px, 4vw, 40px); align-items: start; }
.recog-q { margin: 18px 0; padding: 14px 18px; border-left: 4px solid var(--accent); background: var(--surface); }
.recog-q p { margin: 0 0 8px; font-size: 1.08rem; font-style: italic; }
.recog-q footer { font-size: .85rem; color: var(--muted); }
.recog-img { margin: 0; background: #ffffff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.recog-img img { display: block; width: 100%; height: auto; }
@media (max-width: 1000px) { .ref-grid { columns: 2; } }
@media (max-width: 820px) { .recog { grid-template-columns: 1fr; } .recog-img { max-width: 420px; } }
@media (max-width: 560px) { .ref-grid { columns: 1; } }
/* Gashlight: on stage & training */
.stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 18px); margin-top: 20px; }
.stage-item { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.stage-img { aspect-ratio: 4 / 3; background: #ffffff; overflow: hidden; border-bottom: 3px solid var(--accent); }
.stage-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.stage-item figcaption { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.stage-item figcaption b { font-size: 1rem; line-height: 1.25; }
.stage-item figcaption span { color: var(--muted); font-size: .9rem; line-height: 1.35; }
@media (max-width: 900px) { .stage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stage-grid { grid-template-columns: 1fr; } }
.stage-img.pos-speaker img { object-fit: cover; object-position: 30% 0; transform: scale(1.35); transform-origin: 32% 0; }
.stage-img.pos-badge img { object-position: center 62%; }

/* Connected stars behind page headers: people connected across the network */
.hero, .page-hero { background: var(--paper) url("../img/stars-light.svg") right center / cover no-repeat; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero, :root:not([data-theme="light"]) .page-hero { background-image: url("../img/stars-dark.svg"); } }
:root[data-theme="dark"] .hero, :root[data-theme="dark"] .page-hero { background-image: url("../img/stars-dark.svg"); }
.hero > .wrap, .page-hero > .wrap { position: relative; }
.hero, .page-hero { position: relative; isolation: isolate; }
.hero::before, .page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--paper) 0%, color-mix(in srgb, var(--paper) 88%, transparent) 38%, color-mix(in srgb, var(--paper) 25%, transparent) 70%, transparent 100%); }
@media (max-width: 820px) { .hero::before, .page-hero::before { background: color-mix(in srgb, var(--paper) 78%, transparent); } }

/* HS. mark in the classic design */
.brand { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.hs-mark, .hs-big { font-family: "Kaushan Script", "Brush Script MT", cursive; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--accent); }
.hs-mark { font-size: 1.45rem; line-height: 1; }
.hs-lockup { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.hs-big { font-size: .9em; line-height: .9; padding-right: clamp(14px, 2.4vw, 28px); border-right: 4px solid var(--ink); }
@media (max-width: 560px) { .hs-lockup { flex-direction: column; align-items: flex-start; gap: 6px; } .hs-big { font-size: .7em; border-right: 0; padding: 0; } }
.nav .wrap { flex-wrap: nowrap; }
.nav ul { gap: 4px 20px; }
.nav ul a { font-size: .93rem; }
.brand-name span { color: var(--accent); }
@media (max-width: 1180px) and (min-width: 1001px) { .nav ul { gap: 4px 13px; } .nav ul a { font-size: .88rem; } }
@media (max-width: 1000px) { .nav-toggle { display: inline-flex; } }
.hero h1.hs-lockup { font-size: clamp(2.8rem, 7vw, 6.2rem); }
.brand span.brand-name { color: var(--ink); }
.brand span.brand-name span { color: var(--accent); }
/* Natali Asks: characters standing on top of the book shelf */
.shelf-scene { display: flex; flex-direction: column; align-items: flex-start; }
.shelf-scene .shelf.big { height: 200px; align-items: flex-end; }
.shelf-scene .spine { height: 100% !important; }
.shelf-toys { display: flex; align-items: flex-end; gap: 0; margin-bottom: -2px; padding-left: 4px; }
.toy { display: block; height: auto; filter: drop-shadow(0 6px 6px rgba(20,32,46,.18)); }
.toy-natali { width: 88px; }
.toy-man { width: 62px; margin-left: 6px; }
.toy-dog { width: 92px; margin-left: -4px; }
.toy-cat { width: 86px; margin-left: -6px; }
@media (max-width: 480px) { .toy-natali { width: 70px; } .toy-man { width: 50px; } .toy-dog { width: 72px; } .toy-cat { width: 68px; } .shelf-scene .shelf.big { height: 160px; } }
.shelf-toys { display: grid; grid-template-columns: repeat(5, 60px); column-gap: 12px; align-items: end; justify-items: center; }
.toy { margin-left: 0 !important; }
.toy-natali { width: 84px; } .toy-man { width: 58px; } .toy-dog { width: 78px; } .toy-cat { width: 74px; }
@media (max-width: 480px) { .shelf-toys { grid-template-columns: repeat(5, 44px); } .toy-natali { width: 62px; } .toy-man { width: 44px; } .toy-dog { width: 58px; } .toy-cat { width: 56px; } }
.toy-mom { width: 54px; }
@media (max-width: 480px) { .toy-mom { width: 40px; } }
.toy-mom { width: 42px; }
@media (max-width: 480px) { .toy-mom { width: 31px; } }
/* small shelf on the front page */
.shelf-scene.small .shelf { height: 150px; align-items: flex-end; }
.shelf-scene.small .shelf-toys { grid-template-columns: repeat(5, 44px); column-gap: 10px; }
.shelf-scene.small .toy-natali { width: 62px; } .shelf-scene.small .toy-mom { width: 31px; } .shelf-scene.small .toy-man { width: 43px; }
.shelf-scene.small .toy-dog { width: 58px; } .shelf-scene.small .toy-cat { width: 55px; }
/* Strengthscope strengths */
.strengths { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 24px; counter-reset: none; }
.strengths li { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.strengths li:first-child { grid-column: 1 / -1; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; padding: 18px; }
.s-num { font-family: var(--display); font-weight: 900; font-stretch: 75%; font-size: 2.3rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.strengths h3 { margin: 0 0 4px; font-size: 1.12rem; }
.strengths p { margin: 0; color: var(--muted); font-size: .96rem; }
@media (max-width: 640px) { .strengths { grid-template-columns: 1fr; } }
/* strengths: identical cards so numbers and text line up */
.strengths { list-style: none; padding: 0; gap: 14px; align-items: stretch; }
.strengths li, .strengths li:first-child { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 14px; align-items: start; margin: 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 6px; }
.strengths li:first-child { grid-column: 1 / -1; }
.s-num { width: 44px; text-align: center; line-height: 1; padding-top: 2px; }
