/* Layout: essay-style reading page. Thin top bar (name left, nav + theme toggle right),
   sticky "Contents" rail on the left, one ~66ch serif column. Quiet, near-monochrome. */
:root {
  --bg: #ffffff;
  --fg: #141413;
  --muted: #6b6a66;
  --rule: #e6e4de;
  --soft: #f6f5f1;
  --link: #141413;
  --link-line: #b9b6ad;
  --logo-filter: brightness(0);
  --logo-opacity: .62;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 40rem;
  --rail: 13.5rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161615; --fg: #ebe9e3; --muted: #9c9a93; --rule: #2e2d2a;
    --soft: #1f1f1d; --link: #ebe9e3; --link-line: #5d5b55; --logo-filter: none; --logo-opacity: .72; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161615; --fg: #ebe9e3; --muted: #9c9a93; --rule: #2e2d2a;
  --soft: #1f1f1d; --link: #ebe9e3; --link-line: #5d5b55; --logo-filter: none; --logo-opacity: .72; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}

a { color: var(--link); text-decoration: underline; text-decoration-color: var(--link-line);
    text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 2px; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.site-header .inner {
  max-width: 76rem; margin: 0 auto;
  padding: .9rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; letter-spacing: -.01em;
         text-decoration: none; color: var(--fg); margin: 0; }
.nav { display: flex; align-items: center; gap: 1.25rem; font-family: var(--sans); font-size: .9rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.theme-toggle {
  appearance: none; border: 1px solid var(--rule); background: transparent; color: var(--fg);
  width: 2.1rem; height: 2.1rem; border-radius: 999px; display: grid; place-items: center;
  cursor: pointer; padding: 0;
}
.theme-toggle:hover { background: var(--soft); }
.theme-toggle svg { width: 1rem; height: 1rem; }
.theme-toggle .icon-sun { display: none; }
:root[data-resolved="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-resolved="dark"] .theme-toggle .icon-moon { display: none; }

/* Page grid */
.page {
  max-width: 76rem; margin: 0 auto;
  padding-inline: 1.5rem; padding-block: 2.25rem 4rem;
  display: grid; grid-template-columns: minmax(0, var(--measure)) var(--rail);
  justify-content: space-between; gap: 4rem;
}
.toc { grid-column: 2; grid-row: 1; position: sticky; top: 6rem; align-self: start; max-height: calc(100vh - 8rem); overflow: auto;
       font-family: var(--sans); font-size: .85rem; line-height: 1.4; }
.toc h2 { font-family: var(--sans); font-size: .72rem; font-weight: 600; text-transform: uppercase;
          letter-spacing: .09em; color: var(--muted); margin: 0 0 .9rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem;
          border-left: 1px solid var(--rule); }
.toc a { display: block; padding: .32rem 0 .32rem .9rem; margin-left: -1px; border-left: 1px solid transparent;
         text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--fg); }
.toc a.active { color: var(--fg); border-left-color: var(--fg); }

article { grid-column: 1; grid-row: 1; min-width: 0; }

/* Essay header */
.essay-head { margin-bottom: 1.25rem; }
.essay-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.4rem);
                 line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .6rem; text-wrap: balance; }
.essay-head .dek { font-style: italic; color: var(--muted); font-size: 1rem; margin: 0;
                  display: flex; align-items: center; gap: .75rem; }
.avatar { width: 2.75rem; height: 2.75rem; border-radius: 50%; object-fit: cover; flex: none;
          border: 1px solid var(--rule); background: var(--soft); }

article h2 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; line-height: 1.25;
             letter-spacing: -.01em; margin: 2.25rem 0 .6rem; text-wrap: balance; }
article h3 { font-family: var(--sans); font-weight: 600; font-size: 1rem; margin: 1.4rem 0 .3rem; }
article p { margin: 0 0 .85rem; }
article ul, article ol { margin: 0 0 1rem; padding-left: 1.35rem; }
article li { margin-bottom: .3rem; padding-left: .2rem; }
article li::marker { color: var(--muted); }
article ol li::marker { font-family: var(--sans); font-size: .9em; font-variant-numeric: tabular-nums; }

.cta { margin: 1.1rem 0 0; }
.cta a { font-weight: 600; text-decoration-color: currentColor; }
.cta a::after { content: " \2192"; }

/* People list */
.people { list-style: none; padding: 0 !important; border-top: 1px solid var(--rule); }
.people li { margin: 0; padding: .35rem 0; border-bottom: 1px solid var(--rule); }
.people .role { color: var(--muted); }

/* Quotes */
.quotes { list-style: none; padding: 0 !important; display: grid; gap: 1rem; }
.quotes li { margin: 0; padding: 0 0 0 1.25rem; border-left: 2px solid var(--rule); }
.quotes p { margin: 0 0 .35rem; }
.quotes cite { font-style: normal; font-family: var(--sans); font-size: .88rem; color: var(--muted); }

/* Workshop key facts */
.facts { margin: 0 0 1rem; border-top: 1px solid var(--fg); }
.facts div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem;
             padding: .4rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-family: var(--sans); font-size: .76rem; font-weight: 600; text-transform: uppercase;
            letter-spacing: .08em; color: var(--muted); padding-top: .2rem; }
.facts dd { margin: 0; }

/* FAQ */
.faq h3 { font-style: italic; font-weight: 600; }
.faq h3::before { content: "> "; color: var(--muted); font-style: normal; }

/* Booking box */
.booking { border: 1px solid var(--rule); background: var(--soft); border-radius: 4px;
           padding: 1.5rem; margin: 0 0 1.5rem; font-family: var(--sans); font-size: .95rem; color: var(--muted); }
.booking strong { color: var(--fg); }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); font-family: var(--sans); font-size: .85rem; color: var(--muted); }
.site-footer .inner { max-width: 76rem; margin: 0 auto; padding: 1.75rem 1.5rem 2.5rem;
                      display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--fg); }

/* Mobile contents */
.toc-mobile { display: none; }

@media (max-width: 64rem) {
  .page { grid-template-columns: minmax(0, 1fr); justify-content: stretch; max-width: calc(var(--measure) + 3rem); gap: 0; padding-block: 1.5rem 3rem; }
  .toc { display: none; }
  .toc-mobile { display: block; margin: 1.25rem 0 0; font-family: var(--sans); font-size: .9rem;
                border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .toc-mobile summary { cursor: pointer; padding: .8rem 0; font-size: .74rem; font-weight: 600;
                        text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
  .toc-mobile ol { list-style: none; margin: 0 0 .9rem; padding: 0; display: grid; gap: .45rem; }
  .toc-mobile a { text-decoration: none; color: var(--fg); }
}
@media (max-width: 30rem) {
  .site-header .inner, .page, .site-footer .inner { padding-inline: 1rem; }
  .nav { gap: .9rem; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
}

/* Client logo ticker (moves slowly right to left) */
.logos { margin: 1.5rem 0 0; }
.logos-label { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin: 0 0 .5rem; }
.ticker { overflow: hidden; padding-block: .5rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker ul { list-style: none; margin: 0; padding: 0 !important; display: flex; align-items: center; }
.ticker-track { width: max-content; animation: ticker 70s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-set > ul { gap: 2.5rem; padding-right: 2.5rem !important; }
.ticker li { margin: 0; padding: 0; flex: none; }
.ticker img { display: block; max-width: none; filter: var(--logo-filter); opacity: var(--logo-opacity); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker { -webkit-mask-image: none; mask-image: none; }
  .ticker-track { animation: none; width: auto; }
  .ticker-set > ul { flex-wrap: wrap; gap: 1.25rem 2.25rem; padding-right: 0 !important; }
  .ticker-set[aria-hidden="true"] { display: none; }
}

/* Workshop video (16:9) */
.video { margin: 0 0 1.25rem; }
.video-frame { position: relative; display: block; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden;
               border-radius: 4px; background: var(--soft); border: 1px solid var(--rule); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { display: grid; place-items: center; align-content: center; gap: .75rem; text-decoration: none; color: var(--fg); }
.video-poster .play { width: 4rem; height: 4rem; border-radius: 50%; background: var(--fg); color: var(--bg);
                      display: grid; place-items: center; transition: transform .2s ease; }
.video-poster .play svg { width: 1.6rem; height: 1.6rem; margin-left: .2rem; }
.video-poster:hover .play { transform: scale(1.06); }
.poster-label { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.video figcaption { font-family: var(--sans); font-size: .8rem; color: var(--muted); margin-top: .5rem; }

@media (max-width: 30rem) {
  .site-header .inner { flex-wrap: wrap; row-gap: .5rem; }
  .nav { gap: .75rem; font-size: .82rem; }
}
