/* kyriakos.gold. A dark screening room with three sensory modes chosen by the reader. */
:root {
  --ground: #0B0B0C; --ground-2: #17171A; --ground-3: #222226; --text: #FFFFFF; --muted: #BDBDC1; --dim: #8A8A8E;
  --accent: #F5C330; --on-accent: #0B0B0C; --line: #3A3A3D; --paper: #FFFFFF; --ink: #141414;
  --img-filter: none;
  --display: 'Inter Tight', 'Arial Narrow', Arial, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: max(16px, 4vw);
  --measure: 66ch;
  color-scheme: dark;
}
:root[data-mode="calm"] { --ground: #1C1D20; --ground-2: #25262A; --ground-3: #2E2F34; --text: #E8E6E1; --muted: #B6B4AE; --dim: #8D8B86; --accent: #D9C27E; --on-accent: #1C1D20; --line: #3A3B40; --img-filter: saturate(.5) brightness(.92); }
:root[data-mode="contrast"] { --ground: #000000; --ground-2: #000000; --ground-3: #000000; --text: #FFFFFF; --muted: #FFFFFF; --dim: #FFFFFF; --accent: #FFE600; --on-accent: #000000; --line: #FFFFFF; }
:root[data-size="large"] { font-size: 112.5%; }
:root[data-size="larger"] { font-size: 125%; }
* { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--body); font-size: 1.125rem; line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; display: block; filter: var(--img-filter); }
a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:root[data-mode="contrast"] a { text-decoration: underline !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.label { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 10px 16px; font-weight: 700; }
.skip-link:focus { top: 8px; }
.plain { display: none; }
:root[data-text="plain"] .full { display: none; }
:root[data-text="plain"] .plain { display: revert; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.03em; line-height: 1; text-wrap: balance; margin: 0; }
.dot { color: var(--accent); }

/* Top controls */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) 14px max(var(--gutter), env(safe-area-inset-left, 0px)); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.mini-sig { display: block; line-height: 0; color: #FFFFFF; transition: opacity .3s, transform .3s; }
.mini-sig svg { height: 54px; width: auto; display: block; }
.page-home .mini-sig { opacity: 0; transform: translateY(-8px); }
.page-home.scrolled .mini-sig, .page-inner .mini-sig { opacity: 1; transform: none; }
.page-inner .mini-sig { color: var(--text); }
.top-actions { display: flex; gap: 8px; }
.top-btn { font: 700 1rem/1 var(--body); color: #FFFFFF; background: rgba(11, 11, 12, .66); border: 1px solid rgba(255, 255, 255, .72); min-height: 46px; padding: 0 18px; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.top-btn:hover, .top-btn[aria-expanded="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
:root[data-mode="contrast"] .top-btn { background: #000; border-color: #FFF; }
.burger { display: inline-grid; gap: 4px; }
.burger i { display: block; width: 18px; height: 2px; background: currentColor; }

/* Settings */
.settings { position: fixed; z-index: 40; top: calc(72px + env(safe-area-inset-top, 0px)); right: max(var(--gutter), env(safe-area-inset-right, 0px)); width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 90px); overflow-y: auto; background: var(--ground-2); border: 1px solid var(--text); padding: 22px; display: grid; gap: 18px; }
.settings[hidden] { display: none; }
.settings h2 { font-size: 1.6rem; }
.settings p { margin: 0; color: var(--muted); font-size: .95rem; }
.settings fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.settings legend { padding: 0; margin-bottom: 8px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; font-size: .95rem; font-weight: 500; border: 1px solid var(--line); }
.seg input:checked + span { border-color: var(--text); background: var(--text); color: var(--ground); font-weight: 700; }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Menu */
.menu { position: fixed; inset: 0; z-index: 35; background: var(--ground); display: grid; grid-template-rows: auto 1fr auto; overflow-y: auto; padding: calc(88px + env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) calc(32px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px)); }
.menu[hidden] { display: none; }
.menu ol { list-style: none; margin: 0; padding: 0; align-self: center; }
.menu li { border-top: 1px solid var(--line); }
.menu li:last-child { border-bottom: 1px solid var(--line); }
.menu a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 32px; padding: 12px 0 14px; text-decoration: none; }
.menu b { font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 8.5vw, 8.5rem); line-height: .9; letter-spacing: -.055em; }
.menu a span { color: var(--muted); font-size: 1.05rem; text-align: right; max-width: 32ch; }
.menu a:hover b, .menu a[aria-current] b { color: var(--accent); }
@media (max-width: 700px) { .menu a { grid-template-columns: 1fr; } .menu a span { text-align: left; } }
:root[data-motion="on"] .menu:not([hidden]) li { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
:root[data-motion="on"] .menu li:nth-child(2) { animation-delay: .04s; }
:root[data-motion="on"] .menu li:nth-child(3) { animation-delay: .08s; }
:root[data-motion="on"] .menu li:nth-child(4) { animation-delay: .12s; }
:root[data-motion="on"] .menu li:nth-child(5) { animation-delay: .16s; }
:root[data-motion="on"] .menu li:nth-child(6) { animation-delay: .2s; }
@keyframes rise { from { transform: translateY(40px); } to { transform: none; } }
.menu-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; color: var(--muted); font-size: .95rem; padding-top: 28px; }
html.menu-open body { overflow: hidden; }

/* Home hero */
.hero { position: relative; height: max(640px, 100svh); overflow: hidden; background: var(--ground-2); color: #FFFFFF; }
.hero-img { position: absolute; top: 0; left: 0; width: 128%; max-width: none; height: 115%; object-fit: cover; object-position: 38% 24%; will-change: transform; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 46%, rgba(0,0,0,.82) 100%); }
:root[data-mode="contrast"] .hero-shade { background: linear-gradient(180deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.25) 30%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.95) 100%); }
.hero-top { position: absolute; top: calc(84px + env(safe-area-inset-top, 0px)); right: max(var(--gutter), env(safe-area-inset-right, 0px)); max-width: 34ch; text-align: right; margin: 0; font-size: .95rem; }
.hero-sig { position: absolute; left: max(var(--gutter), env(safe-area-inset-left, 0px)); top: calc(76px + env(safe-area-inset-top, 0px)); width: min(36vw, 54vh); line-height: 0; color: #FFFFFF; display: block; }
.hero-sig svg { width: 100%; height: auto; display: block; overflow: visible; }
html.intro-running .hero-sig { visibility: hidden; }
.hero-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) clamp(28px, 4vh, 48px) max(var(--gutter), env(safe-area-inset-left, 0px)); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 40px; }
.hero-titleblock { order: 2; margin-left: auto; display: grid; gap: 16px; justify-items: end; }
.hero-title { font-weight: 900; font-size: clamp(2.6rem, 6.4vw, 7.2rem); line-height: .86; letter-spacing: -.055em; text-align: right; max-width: 11ch; }
.play { display: inline-flex; align-items: center; gap: 18px; min-height: 76px; padding: 0 34px 0 26px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 1.3rem; text-decoration: none; border: 0; cursor: pointer; font-family: var(--body); }
.play:hover { color: var(--on-accent); background: #FFFFFF; }
.play svg { flex: none; }
@media (max-width: 700px) {
  .hero-sig { width: 62vw; top: calc(70px + env(safe-area-inset-top, 0px)); }
  .hero-img { width: 100%; top: 26vh; height: 100%; object-position: 40% 0%; }
  .hero-top { top: calc(92px + 43vw + env(safe-area-inset-top, 0px)); left: max(var(--gutter), env(safe-area-inset-left, 0px)); text-align: left; }
  .hero-titleblock { order: 0; margin-left: 0; justify-items: start; }
  .hero-title { text-align: left; }
}

/* Player */
.player-wrap { padding-block: 0; }
.player { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: var(--ground-2); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 128px); border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-weight: 900; font-size: clamp(2.4rem, 6vw, 6.4rem); line-height: .9; letter-spacing: -.05em; }
.section-head p { margin: 0; color: var(--muted); max-width: 46ch; }
.split { display: grid; gap: 32px; }
@media (min-width: 960px) { .split { grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; } }
.lede { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 2.3rem); line-height: 1.18; letter-spacing: -.015em; max-width: 30ch; }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1em; }
.links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--text); }
.links li { border-bottom: 1px solid var(--text); }
.links a { display: flex; justify-content: space-between; gap: 16px; padding: 17px 0; font-weight: 700; text-decoration: none; }
.links a span { font-weight: 400; color: var(--muted); text-align: right; }
.statement p { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 6.6vw, 7rem); line-height: .98; letter-spacing: -.045em; max-width: 16ch; }
.statement .w { transition: color .25s linear; }
:root[data-motion="on"] .statement .w { color: var(--dim); }
:root[data-motion="on"] .statement .w.lit { color: var(--text); }
.statement cite { display: block; margin-top: 32px; font-style: normal; color: var(--muted); }

/* Inner page head */
.page-head { padding-top: calc(150px + env(safe-area-inset-top, 0px)); padding-bottom: clamp(48px, 7vw, 96px); }
.page-head h1 { font-weight: 900; font-size: clamp(3.6rem, 13vw, 13rem); line-height: .82; letter-spacing: -.06em; }
.page-head .intro-copy { margin: clamp(24px, 3vw, 40px) 0 0; font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem, 2.3vw, 2.1rem); line-height: 1.2; letter-spacing: -.015em; max-width: 34ch; }
.page-head .orient { margin: 18px 0 0; color: var(--muted); font-size: .95rem; }

/* Lists of work */
.index { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--text); }
.index li { border-bottom: 1px solid var(--line); }
.index a { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 6px 28px; padding: 22px 0 24px; text-decoration: none; }
.index .meta { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; padding-top: .4em; }
.index .t { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 2.8vw, 2.6rem); line-height: 1.02; letter-spacing: -.03em; }
.index .s { display: block; margin-top: 8px; color: var(--muted); max-width: 60ch; }
.index a:hover .t { color: var(--accent); }
@media (max-width: 700px) { .index a { grid-template-columns: 1fr; } }
.thread-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin: 56px 0 18px; }
.thread-head:first-child { margin-top: 0; }
.thread-head h3 { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.4rem); }

/* Video cards */
.reels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px 24px; }
.vid { display: grid; gap: 10px; align-content: start; }
.vid .frame { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: var(--ground-3); overflow: hidden; }
.vid .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid .frame .slate { position: absolute; inset: 0; display: flex; align-items: flex-start; padding: 16px 16px 64px; font-family: var(--display); font-weight: 800; font-size: 1.3rem; line-height: 1.05; letter-spacing: -.02em; color: var(--accent); }
.vid .frame img + .slate { display: none; }
.vid .playbtn { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 14px; background: var(--accent); color: var(--on-accent); border: 0; font: 700 .95rem/1 var(--body); cursor: pointer; }
.vid .playbtn:hover { background: #FFFFFF; }
.vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid h4 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.25rem; line-height: 1.1; letter-spacing: -.02em; }
.vid .info { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: .9rem; }
.vid .info a { color: var(--muted); }
.series { margin-top: clamp(56px, 7vw, 96px); }
.series:first-of-type { margin-top: 0; }
.series-head { display: grid; gap: 12px; margin-bottom: 28px; padding-top: 24px; border-top: 3px solid var(--accent); }
.series-head h3 { font-weight: 900; font-size: clamp(2rem, 4.4vw, 4rem); letter-spacing: -.045em; }
.series-head p { margin: 0; color: var(--muted); max-width: 62ch; }
details.archive { margin-top: 28px; border-top: 1px solid var(--line); }
details.archive summary { cursor: pointer; padding: 18px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details.archive summary::-webkit-details-marker { display: none; }
details.archive summary::after { content: "Show"; color: var(--accent); }
details.archive[open] summary::after { content: "Hide"; }

/* Episodes */
.episodes { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--accent); }
.episodes li { border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: 6px 24px; padding: 22px 0; align-items: baseline; }
.episodes .n { font-family: var(--display); font-weight: 900; font-size: 2rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.episodes .t { font-family: var(--display); font-weight: 800; font-size: clamp(1.3rem, 2.4vw, 2rem); line-height: 1.05; letter-spacing: -.025em; }
.episodes .s { display: block; margin-top: 6px; color: var(--muted); max-width: 64ch; }
.episodes .r { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.episodes .r a { display: block; margin-top: 6px; color: var(--text); font-weight: 700; }
@media (max-width: 700px) { .episodes li { grid-template-columns: 3rem minmax(0, 1fr); } .episodes .r { grid-column: 2; } }
.listen { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px; border: 1px solid var(--text); font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.solid { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Threads */
.thread-grid { display: grid; gap: 0; border-top: 3px solid var(--text); }
.thread-card { display: grid; gap: 14px; padding: 34px 0 38px; border-bottom: 1px solid var(--line); }
@media (min-width: 960px) { .thread-card { grid-template-columns: 5fr 7fr; gap: 56px; } }
.thread-card h2 { font-weight: 900; font-size: clamp(2.4rem, 5vw, 5rem); letter-spacing: -.05em; }
.thread-card p { margin: 0 0 18px; color: var(--muted); max-width: 54ch; }
.thread-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.thread-items a { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; text-decoration: none; }
.thread-items .k { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); padding-top: .35em; }
.thread-items .x { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--text); font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; text-decoration: none; }
.chip:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Projects */
.project { padding: 48px 0 56px; border-bottom: 1px solid var(--line); display: grid; gap: 20px; }
.project:first-child { border-top: 3px solid var(--text); }
@media (min-width: 960px) { .project { grid-template-columns: 5fr 7fr; gap: 56px; } }
.project h2 { font-weight: 900; font-size: clamp(2.2rem, 4.6vw, 4.6rem); letter-spacing: -.05em; }
.project .body p { margin: 0 0 18px; max-width: 62ch; }

/* About */
.portrait { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: 62% 30%; }
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 3px solid var(--accent); }
.values li { display: grid; gap: 8px; padding: 26px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 960px) { .values li { grid-template-columns: 5fr 7fr; gap: 56px; } }
.values b { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.045em; line-height: 1; }
.values span { color: var(--muted); max-width: 54ch; padding-top: .4em; }
.honours { width: 100%; border-collapse: collapse; }
.honours th { text-align: left; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 0 16px 12px 0; border-bottom: 3px solid var(--text); }
.honours td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.honours td:first-child { font-family: var(--display); font-weight: 900; font-size: 1.5rem; color: var(--accent); font-variant-numeric: tabular-nums; width: 5.5rem; }
.honours td:nth-child(2) { font-weight: 700; width: 34%; }
.honours td:last-child { color: var(--muted); }
@media (max-width: 700px) { .honours, .honours tbody, .honours tr, .honours td { display: block; width: auto !important; } .honours thead { display: none; } .honours tr { padding: 14px 0; border-bottom: 1px solid var(--line); } .honours td { border: 0; padding: 2px 0; } }
.quote-big { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5vw, 5rem); line-height: 1; letter-spacing: -.045em; max-width: 18ch; }

/* Contact */
.email-big { display: inline-block; font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 7.6vw, 8rem); line-height: .95; letter-spacing: -.05em; text-decoration: none; overflow-wrap: anywhere; }
.copy-btn { margin-top: 24px; font: 700 1rem/1 var(--body); color: var(--text); background: none; border: 1px solid var(--text); min-height: 48px; padding: 0 20px; cursor: pointer; }
.copy-btn:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Footer */
.site-footer { border-top: 3px solid var(--text); }
.site-footer .inner { padding-block: 48px calc(56px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 36px; }
.foot-sig { color: var(--text); }
.foot-sig { justify-self: start; }
.foot-sig svg { width: 200px; max-width: 50vw; height: auto; display: block; overflow: visible; }
.foot-grid { display: grid; gap: 28px; color: var(--muted); font-size: .95rem; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 6fr 3fr 3fr; } }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-grid p { margin: 0 0 10px; }
.replay { font: inherit; font-weight: 700; color: var(--text); background: none; border: 1px solid var(--text); min-height: 44px; padding: 0 16px; cursor: pointer; justify-self: start; }
.replay:hover { background: var(--text); color: var(--ground); }

/* The opening */
.intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow: hidden; pointer-events: none; }
.intro[hidden] { display: none !important; }
.intro-ground { position: absolute; inset: 0; background: var(--paper); pointer-events: auto; }
.intro-sig { position: relative; width: min(126vw, 128vh); flex: none; transform-origin: 0 0; color: var(--ink); transition: color .7s ease; }
.intro-sig.lift { color: #FFFFFF; }
.intro-sig svg { display: block; width: 100%; height: auto; overflow: visible; }
.skip { position: absolute; right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px)); pointer-events: auto; font: 700 1rem/1 var(--body); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); min-height: 44px; padding: 0 18px; cursor: pointer; }
html.intro-running body { overflow: hidden; }
.ink path { stroke-dasharray: 1 2; stroke-dashoffset: 1; stroke-width: 0; }
.signing .ink path { animation-name: write; animation-timing-function: ease-in-out; animation-fill-mode: both; }
.signed .ink path { stroke-width: 14; stroke-dashoffset: 0; animation: none; }
.ink { transition: opacity .5s ease; }
.signed .ink { opacity: 1; }
.pen-dot { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.signing .pen-dot { animation: tap .32s cubic-bezier(.3,1.6,.5,1) both; animation-delay: var(--dot-at); }
.signed .pen-dot { transform: none; animation: none; }
@keyframes write { 0% { stroke-dashoffset: 1; stroke-width: 0; } 0.2% { stroke-width: 14; } 100% { stroke-dashoffset: 0; stroke-width: 14; } }
@keyframes tap { 0% { transform: scale(0); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
@media print { .topbar, .menu, .settings, .intro { display: none !important; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mini-sig { --sig-stroke: 26px; }
.foot-sig { --sig-stroke: 22px; }
.hero-sig { --sig-stroke: 12px; }

/* Thread colours: a tinted window and a bright edge for each line of thought */
.t-autism { --t: #F5C330; --tb: #231E0C; }
.t-cohesion { --t: #5BBBEA; --tb: #0C1C26; }
.t-queer { --t: #EC7BC0; --tb: #25101F; }
.t-greek { --t: #8AA2FF; --tb: #10173A; }
.t-enterprise { --t: #63D08F; --tb: #0D2116; }
.t-public { --t: #FF8A66; --tb: #29130D; }
.t-intercultural { --t: #45D3C7; --tb: #0A2220; }
:root[data-mode="calm"] .window, :root[data-mode="calm"] .essay { --tb: var(--ground-2); }
:root[data-mode="calm"] [class*="t-"] { --t: var(--accent); }
:root[data-mode="contrast"] [class*="t-"] { --t: #FFE600; --tb: #000000; }

/* Portal */
.portal { padding-bottom: clamp(64px, 9vw, 128px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 48px); }
.filter { font: 700 .95rem/1 var(--body); color: var(--text); background: transparent; border: 1px solid var(--line); min-height: 44px; padding: 0 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.filter span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.filter:hover { border-color: var(--t, var(--text)); }
.filter[aria-pressed="true"] { background: var(--t, var(--text)); border-color: var(--t, var(--text)); color: #0B0B0C; }
.filter[aria-pressed="true"] span { color: inherit; }
:root[data-mode="contrast"] .filter { border-color: #FFF; }

.windows { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); grid-auto-flow: dense; }
@media (min-width: 720px) { .windows { grid-template-columns: repeat(12, minmax(0, 1fr)); } .w4 { grid-column: span 6; } .w6 { grid-column: span 6; } .w8, .w12 { grid-column: span 12; } }
@media (min-width: 1100px) { .w4 { grid-column: span 4; } .w8 { grid-column: span 8; } }
.window { position: relative; display: flex; flex-direction: column; gap: 22px; min-height: 340px; padding: clamp(20px, 2.4vw, 32px); background: var(--tb); color: var(--text); text-decoration: none; border-top: 4px solid var(--t); overflow: hidden; }
:root[data-mode="contrast"] .window { border: 2px solid #FFF; border-top: 6px solid var(--t); }
.window:hover { color: var(--text); }
.window:hover .w-title { color: var(--t); }
.window:focus-visible { outline-offset: 4px; }
:root[data-motion="on"] .window { transition: transform .35s cubic-bezier(.2,.7,.2,1), background-color .35s; }
:root[data-motion="on"] .window:hover { transform: translateY(-4px); }
.w-top { display: flex; justify-content: space-between; gap: 12px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.w-thread { color: var(--t); }
.w-main { display: grid; gap: 12px; }
.w-title { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; font-size: clamp(1.55rem, 2.2vw, 2.1rem); text-wrap: balance; transition: color .25s; }
.w6 .w-title { font-size: clamp(1.8rem, 3vw, 2.8rem); }
.w8 .w-title { font-size: clamp(2rem, 4vw, 3.6rem); max-width: 16ch; }
.w-dek { color: var(--muted); max-width: 52ch; }
.w-series { font-size: .85rem; font-weight: 700; color: var(--t); }
.w-quote { margin: 0; padding-left: 18px; border-left: 3px solid var(--t); font-family: var(--display); font-weight: 700; font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.25; letter-spacing: -.01em; max-width: 40ch; }
.w-foot { margin-top: auto; display: flex; gap: 16px; align-items: center; font-size: .88rem; color: var(--muted); }
.w-listen { color: var(--t); font-weight: 700; }
.w-go { margin-left: auto; font-weight: 700; color: var(--text); }
.w-go::after { content: ' \2192'; }
.lead-wrap { margin-bottom: 12px; }
.window.lead { min-height: 0; padding: clamp(24px, 4vw, 64px); justify-content: space-between; display: grid; grid-template-rows: auto 1fr auto; }
.window.lead .w-main { align-self: end; }
.window.lead .w-title { font-size: clamp(2.6rem, 7.6vw, 7rem); max-width: 14ch; line-height: .95; }
.window.lead .w-dek { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--text); max-width: 46ch; }
.window.lead .w-quote { font-size: clamp(1.3rem, 2.4vw, 2rem); max-width: 30ch; margin: 8px 0; }
@media (min-width: 1100px) { .window.lead { grid-template-columns: 7fr 5fr; grid-template-rows: auto 1fr auto; column-gap: 64px; } .window.lead .w-top, .window.lead .w-foot { grid-column: 1 / -1; } .window.lead .w-quote { align-self: end; } }
.archive-head { margin: clamp(64px, 9vw, 120px) 0 24px; padding-top: 28px; border-top: 3px solid var(--text); display: grid; gap: 10px; }
.archive-head h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
.archive-head p { margin: 0; color: var(--muted); max-width: 60ch; }
.archive .window { min-height: 260px; }
.filter-empty { color: var(--muted); }
[data-hidden-by-filter] { display: none !important; }

/* Essay pages */
.essay-head { padding-top: calc(150px + env(safe-area-inset-top, 0px)); padding-bottom: clamp(36px, 5vw, 64px); border-bottom: 4px solid var(--t); background: linear-gradient(180deg, var(--tb), var(--ground)); }
.crumbs { color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.crumbs a { color: var(--t); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.essay-head h1 { font-size: clamp(2.5rem, 7vw, 6.4rem); line-height: .97; max-width: 18ch; }
.essay-dek { font-size: clamp(1.15rem, 1.8vw, 1.5rem); line-height: 1.4; max-width: 46ch; margin: 24px 0 0; }
.essay-meta { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: .95rem; margin: 22px 0 0; font-variant-numeric: tabular-nums; }
.essay-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.series { margin-top: 30px; max-width: 60ch; }
.series .label { color: var(--t); margin: 0 0 10px; }
.series ol { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.series a[aria-current="page"] { color: var(--t); font-weight: 700; text-decoration: none; }
.essay-body { max-width: 68ch; margin: 0 auto; padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); font-size: clamp(1.12rem, 1.25vw, 1.25rem); line-height: 1.72; }
.essay-body p { margin: 0 0 1.15em; }
.essay-body h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); line-height: 1.1; margin: 1.8em 0 .6em; }
.essay-body h3 { font-size: 1.4rem; margin: 1.6em 0 .5em; }
.essay-body blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--t); font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.3; letter-spacing: -.01em; }
.essay-body blockquote p { margin: 0; }
.essay-body ul, .essay-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.essay-body li { margin-bottom: .4em; }
.essay-body img { margin: 1.5em 0; width: 100%; height: auto; }
.essay-body a { color: var(--text); text-decoration-color: var(--t); }
.essay-body a:hover { color: var(--t); }
.essay-body strong { font-weight: 700; }
.essay-source { margin-top: 2.6em !important; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.keep-reading { padding-bottom: clamp(64px, 9vw, 128px); }
.keep-reading h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-bottom: 24px; }
:root[data-text="plain"] .essay-body { line-height: 1.8; }
button.btn { background: transparent; color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
button.btn:hover { background: var(--accent); color: var(--on-accent); }
@media (min-width: 720px) { .window.lead { min-height: min(78vh, 760px); } }

/* Paper: the reading side of the site. Writing and essays sit on paper; the screening room stays dark. */
:root[data-mode="light"] body.page-inner {
  --ground: #F5F1E8; --ground-2: #ECE6D9; --ground-3: #E2DACA; --text: #161514; --muted: #55514A; --dim: #77726A;
  --line: #D6CDBB; --accent: #F5C330; --on-accent: #161514; --img-filter: none; color-scheme: light;
}
:root[data-mode="light"] body.page-inner { background: var(--ground); }
:root[data-mode="light"] body.page-inner .t-cohesion { --t: #0B6E99; --tb: #E1EEF4; }
:root[data-mode="light"] body.page-inner .t-enterprise { --t: #1E7A45; --tb: #E1F0E6; }
:root[data-mode="light"] body.page-inner .t-autism { --t: #8A6500; --tb: #F8EDCB; }
:root[data-mode="light"] body.page-inner .t-queer { --t: #A3307A; --tb: #F5E1EC; }
:root[data-mode="light"] body.page-inner .t-greek { --t: #2F47B5; --tb: #E4E8F8; }
:root[data-mode="light"] body.page-inner .t-intercultural { --t: #0E7C74; --tb: #DCF0EC; }
:root[data-mode="light"] body.page-inner .t-public { --t: #B4441F; --tb: #F7E3DA; }
:root[data-mode="light"] body.page-inner .top-btn { color: var(--text); background: rgba(245, 241, 232, .82); border-color: var(--text); }
:root[data-mode="light"] body.page-inner .top-btn:hover, :root[data-mode="light"] body.page-inner .top-btn[aria-expanded="true"] { background: var(--text); color: var(--ground); border-color: var(--text); }
:root[data-mode="light"] body.page-inner .filter[aria-pressed="true"] { color: #FFFFFF; }
:root[data-mode="light"] body.page-inner .filter[aria-pressed="true"][data-filter="all"] { background: var(--text); border-color: var(--text); color: var(--ground); }
:root[data-mode="light"] body.page-inner .window:hover .w-title { color: var(--t); }
:root[data-mode="light"] body.page-inner .w-go { color: var(--text); }
:root[data-mode="light"] body.page-inner .btn.solid { background: var(--text); color: var(--ground); border-color: var(--text); }
:root[data-mode="light"] body.page-inner .btn.solid:hover, :root[data-mode="light"] body.page-inner button.btn:hover, :root[data-mode="light"] body.page-inner .btn:hover { background: var(--accent); color: #161514; border-color: var(--accent); }
:root[data-mode="light"] body.page-inner .essay-head { background: linear-gradient(180deg, var(--tb), var(--ground)); }
:root[data-mode="light"] body.page-inner .dot { color: #C99A00; }
:root[data-mode="light"] body.page-inner ::selection { background: #F5C330; color: #161514; }
/* The dark parts that frame the page stay dark: menu, settings and footer */
:root[data-mode="light"] body.page-inner .site-footer, :root[data-mode="light"] body.page-inner .menu, :root[data-mode="light"] body.page-inner .settings { --ground: #0B0B0C; --ground-2: #17171A; --text: #FFFFFF; --muted: #BDBDC1; --line: #3A3A3D; color-scheme: dark; }
:root[data-mode="light"] body.page-inner .site-footer { background: #0B0B0C; color: #FFFFFF; }
/* Warm dark for reading: same world, less glare */
:root[data-mode="bold"] body.dimread { --ground: #1A1917; --ground-2: #23211E; --ground-3: #2C2A26; --text: #ECE6DA; --muted: #B5AEA2; --line: #3B3833; background: #1A1917; }
:root[data-mode="bold"] body.dimread .essay-body { color: #E4DED2; }

:root[data-mode="bold"] body.dimread .t-cohesion { --tb: #18242A; }
:root[data-mode="bold"] body.dimread .t-enterprise { --tb: #19251D; }
:root[data-mode="bold"] body.dimread .t-autism { --tb: #29231A; }
:root[data-mode="bold"] body.dimread .t-queer { --tb: #2A1D25; }
:root[data-mode="bold"] body.dimread .t-greek { --tb: #1C1F2E; }
:root[data-mode="bold"] body.dimread .t-intercultural { --tb: #172725; }
:root[data-mode="bold"] body.dimread .t-public { --tb: #2C1F19; }
:root[data-mode="light"] { color-scheme: light; }
:root[data-mode="light"] body.page-home { --ground: #0B0B0C; }
:root[data-mode="light"] body.page-inner .settings, :root[data-mode="light"] body.page-inner .menu { color: var(--text); }
:root[data-mode="light"] body.page-inner .accent, :root[data-mode="light"] body.page-inner .label.accent { color: #8A6500; }
:root[data-mode="light"] body.page-inner .settings .accent, :root[data-mode="light"] body.page-inner .menu .accent, :root[data-mode="light"] body.page-inner .site-footer .accent { color: #F5C330; }
