/* ===== Section wheel layout ===== */
@property --accent { syntax: "<color>"; inherits: true; initial-value: #19b3a3; }
@property --accent-ink { syntax: "<color>"; inherits: true; initial-value: #0f7f73; }
@property --accent-soft { syntax: "<color>"; inherits: true; initial-value: #7de3d6; }

:root {
  --accent: #19b3a3;
  --accent-ink: #0f7f73;
  --accent-soft: #7de3d6;
  --spring: cubic-bezier(.3, 1.4, .45, 1);
  transition: --accent .9s ease, --accent-ink .9s ease, --accent-soft .9s ease;
}

/* The dial's centre sits on the screen edge (--dial-inset from it), so exactly
   half the wheel shows; content starts after --wheel-w */
:root {
  --dial-r: min(38vh, 285px); --dial-inset: 0px;
  --wheel-w: calc(var(--dial-r) + var(--dial-inset) + 20px);
}

/* ---- The dial, docked on the left edge, vertically centred ---- */
.wl__stage { position: fixed; z-index: 30; left: var(--dial-inset); top: 50%; width: 0; height: 0; }
.wl__dial {
  position: absolute; width: calc(2 * var(--dial-r)); height: calc(2 * var(--dial-r));
  left: calc(-1 * var(--dial-r)); top: calc(-1 * var(--dial-r));
}

/* Layers: glow behind, slices that turn, pointer + hub on top */
.wheel { position: relative; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; }
.wheel > * { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
/* The turning layer rotates as a whole, which the browser can hand to the GPU */
.wheel__spin { will-change: transform; transition: transform 1.1s var(--spring); touch-action: none; cursor: grab; }
.wheel.is-instant .wheel__spin, .wheel.is-dragging .wheel__spin { transition: none; }
.wheel.is-dragging .wheel__spin { cursor: grabbing; }
.wheel__spin svg { width: 100%; height: 100%; overflow: visible; display: block; }
.wheel__top { pointer-events: none; }
.wheel__top .hub { pointer-events: auto; }
/* A soft gradient glow instead of a blur filter, which is costly to redraw */
.wheel__halo {
  inset: 10%; width: auto; height: auto; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 55%, transparent) 60%, transparent);
  opacity: .5; animation: halo 5s ease-in-out infinite;
}
@keyframes halo { 50% { opacity: .8; } }
.wheel__pointer path {
  fill: var(--accent); stroke: var(--white); stroke-width: 3; stroke-linejoin: round;
  transition: transform .8s var(--spring);
}
/* On Home every slice is short, so the pointer moves in to meet them */
.wheel.is-home .wheel__pointer path { transform: translateX(-42px); }

.slice { cursor: pointer; outline: none; --s: .72; --lr: 143px; --ls: .86; }
.slice.is-active .slice__label, .slice.is-active .slice__rim { opacity: 0; }

/* The raised tile for the selected section, drawn above its neighbours */
.wheel__lifts { pointer-events: none; }
.lift { opacity: 0; transform: scale(.84); transform-origin: 0 0; transition: opacity .35s ease, transform .8s var(--spring); }
.lift.is-active { opacity: 1; transform: scale(1); transition-delay: .15s; }
.lift__shadow { fill: rgba(5, 10, 20, .22); }
.lift__shape { stroke: rgba(255, 255, 255, .35); stroke-width: 1.5; stroke-linejoin: round; }
.lift__rim { fill: var(--c); }
.slice__scale { transform: scale(var(--s)); transform-origin: 0 0; transition: transform .8s var(--spring); }
.slice__place { transform: translateX(var(--lr)) scale(var(--ls)); transform-origin: 0 0; transition: transform .8s var(--spring); }
.slice__hit { fill: transparent; }
.slice__base { fill: var(--ink); }
.slice__pop { transition: transform .5s var(--spring); pointer-events: none; }
.slice:focus-visible .slice__pop { transform: translate(var(--dx), var(--dy)); }
.slice__shape { opacity: .6; stroke: rgba(255, 255, 255, 0); stroke-width: 2; transition: opacity .45s, stroke .3s; }
.slice.is-active .slice__shape { opacity: 1; }
.slice:focus-visible .slice__shape { stroke: var(--white); }
.slice__rim { fill: var(--c); opacity: 0; transition: opacity .45s; }
.slice.is-active .slice__rim { opacity: 1; }
.slice__label { transform-origin: 0 0; transition: transform .6s var(--spring); }
.slice__label.is-flipped { transform: rotate(180deg); }
.slice__icon { fill: none; stroke: var(--white); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.slice text, .lift text { fill: var(--white); font-family: var(--sans); font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.slice:not(.is-active) text, .slice:not(.is-active) .slice__icon { opacity: .8; }

.hub { cursor: pointer; outline: none; transition: transform .5s var(--spring); }
.hub:focus-visible { transform: scale(1.08); }
.hub__base { fill: #121d31; }
.hub__dash { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: 1.5; stroke-dasharray: 2 7; }
.hub__ring { fill: none; stroke: var(--accent); stroke-width: 4; }
.hub__icon { fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.hub:focus-visible .hub__ring { stroke: var(--white); }

/* Hover effects only where there's a real pointer; on touch screens they'd
   stick after a tap */
@media (hover: hover) {
  .slice:hover .slice__pop { transform: translate(var(--dx), var(--dy)); }
  .slice:hover .slice__shape { opacity: .92; }
  .slice:hover .slice__rim { opacity: .5; }
  .hub:hover { transform: scale(1.08); }
}

/* ---- Right: content panels ---- */
.wl__content {
  position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--paper)), var(--paper) 520px);
}
[data-panel] { display: none; }
[data-panel].is-active { display: block; animation: panelIn .8s cubic-bezier(.2, .7, .2, 1) both .15s; }
@keyframes panelIn { from { opacity: 0; transform: translateY(26px); } }
.has-wheel .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .wheel__halo { animation: none; }
  [data-panel].is-active { animation: none; }
}

/* ---- Section colours flow into the content ---- */
.wl__content { --teal: var(--accent-ink); --teal-2: var(--accent-soft); }
.wl__content .hero, .wl__content .pubs, .wl__content .talks__banner, .wl__content .contact, .wl__content .card { --teal: var(--accent-soft); }
.wl__content .btn--primary { background: var(--accent-ink); color: var(--white); box-shadow: 0 12px 30px -12px var(--accent); }
.wl__content .btn--primary:hover { background: var(--accent); }
.wl__content .filter.is-active { background: var(--accent-ink); border-color: var(--accent-ink); }
.wl__content .hero { padding-top: 70px; }
.wl__content .hero__title { font-size: clamp(2.6rem, 5.4vw, 5.2rem); }
.about__next, .art__next { margin-top: 30px; }

/* Each section now shows on its own, so it doesn't need the old page's
   generous top spacing between sections */
.wl__content .section { padding-top: clamp(40px, 4.5vw, 64px); }
.wl__content .talks { padding-top: 0; }
.wl__content .talks__banner { padding-top: clamp(48px, 5vw, 72px); padding-bottom: clamp(64px, 7vw, 96px); }
.wl__content .contact { padding-top: clamp(48px, 5vw, 72px); }

/* About lives on the home page, so it continues the banner's dark theme */
[data-panel="home"] .about {
  --teal: var(--accent-soft);
  color: var(--white);
  background: var(--ink);
}
[data-panel="home"] .about .h2 { color: var(--white); }
[data-panel="home"] .about__text > p:not(.eyebrow), [data-panel="home"] .about .tags li { color: var(--muted-light); }
[data-panel="home"] .about__quote { background: var(--ink-3); border: 1px solid var(--line-light); }
[data-panel="home"] .about__media img { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .1); }

/* When two-column sections stack, lead with the heading rather than the photo */
@media (max-width: 1300px) {
  .about__text, .lead__grid > div:last-child { order: -1; }
}

/* ---- Home stats jump to their section ---- */
.stat { appearance: none; background: none; border-width: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.stat + .stat { border-left: 1px solid var(--line-light); }
.stat__num, .stat__label { transition: color .25s; }
.stat:hover .stat__num { color: var(--accent-soft); }
.stat:hover .stat__label { color: var(--white); }

/* ---- Clickable chips: always carry a + or → cue ---- */
.xchip {
  appearance: none; font: inherit; font-size: .88rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  background: var(--white); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: transform .25s, background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.xchip b { color: var(--accent-ink); }
.xchip i { font-style: normal; font-weight: 700; color: var(--accent-ink); transition: transform .3s; }
.xchip:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 20px -10px var(--accent); }
.xchip[aria-expanded="true"] { background: var(--accent-ink); color: var(--white); border-color: var(--accent-ink); }
.xchip[aria-expanded="true"] i, .xchip[aria-expanded="true"] b { color: var(--white); }
[aria-expanded="true"] > i, [aria-expanded="true"] .card__cue i { transform: rotate(45deg); }
.xchip--dark { background: rgba(255, 255, 255, .08); color: var(--white); border-color: rgba(255, 255, 255, .22); }
.xchip--dark i { color: var(--accent-soft); }
.xchip--dark:hover { background: rgba(255, 255, 255, .14); border-color: var(--accent-soft); }
.xchip--dark[aria-expanded="true"] { background: var(--accent-soft); color: var(--ink); border-color: var(--accent-soft); }
.xchip--dark[aria-expanded="true"] i { color: var(--ink); }
.xchip[data-goto]::after { content: "→"; color: var(--accent-soft); }

/* ---- Information-only tags: flat text, nothing to press ---- */
.tags { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.tags li { font-size: .92rem; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 9px; }
.tags li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.members .tags { margin-top: 16px; }

/* ---- Expertise cards are buttons ---- */
.card { appearance: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; display: block; width: 100%; }
.card__cue {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 7px 14px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--white);
  background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); transition: background .3s;
}
.card__cue i { font-style: normal; font-size: 1rem; transition: transform .3s; }
.card:hover .card__cue, .card[aria-expanded="true"] .card__cue { background: var(--accent); }
.card:focus-visible, .card[aria-expanded="true"] { outline: 3px solid var(--accent); outline-offset: 4px; }

/* ---- Awards are buttons ---- */
.award { appearance: none; font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; position: relative; transition: border-color .3s, box-shadow .3s; }
.award:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.award[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.award__cue { position: absolute; top: 12px; right: 16px; font-style: normal; font-weight: 700; font-size: 1.2rem; color: var(--accent-ink); transition: transform .3s; }

/* ---- Editorial roles are buttons ---- */
.editorial > li:not(.drawer) { padding: 0; transition: border-color .3s, background .3s; }
.editorial > li:not(.drawer):hover, .editorial > li:has(> [aria-expanded="true"]) { border-color: var(--accent-soft); background: rgba(255, 255, 255, .09); }
.editorial > li > button { appearance: none; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; padding: 20px 50px 20px 22px; cursor: pointer; position: relative; border-radius: 16px; }
.editorial > li > button i { position: absolute; right: 20px; top: 50%; margin-top: -.7em; font-style: normal; font-weight: 700; font-size: 1.2rem; color: var(--accent-soft); transition: transform .3s; }
.article .pill { align-self: flex-start; margin-top: 14px; }

/* ---- Detail drawer ---- */
.drawer { grid-column: 1 / -1; flex-basis: 100%; list-style: none; margin-top: 4px; animation: drawerIn .5s cubic-bezier(.2, .7, .2, 1); }
.drawer__inner::before {
  content: ""; position: absolute; top: -9px; left: calc(var(--caret, 40px) - 9px);
  width: 18px; height: 18px; border-radius: 3px; background: var(--white); transform: rotate(45deg);
  box-shadow: -3px -3px 8px -4px rgba(11, 19, 34, .18); transition: left .35s cubic-bezier(.2, .7, .2, 1);
}
@keyframes drawerIn { from { opacity: 0; transform: translateY(-10px); } }
.drawer__inner { position: relative; background: var(--white); color: var(--text); border-radius: 20px; padding: 30px 34px; border-left: 5px solid var(--accent); box-shadow: var(--shadow); }
.drawer__close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--paper-2); color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; transition: background .25s, color .25s; }
.drawer__close:hover { background: var(--accent-ink); color: var(--white); }
.drawer__eyebrow { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--accent-ink); margin: 0 0 8px; }
.drawer__title { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; margin: 0 40px 14px 0; }
.drawer__inner > p { color: var(--muted); max-width: 70ch; }
.drawer__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 30px; margin-top: 18px; }
.drawer__group h5 { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 8px; }
.drawer__group ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.drawer__group li { padding-left: 18px; position: relative; font-size: .95rem; line-height: 1.5; }
.drawer__group li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.drawer__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.drawer__actions a, .drawer__go {
  font: inherit; font-size: .88rem; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; color: var(--accent-ink); background: transparent;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); transition: background .25s, color .25s;
}
.drawer__go { background: var(--accent-ink); color: var(--white); border-color: var(--accent-ink); }
.drawer__actions a:hover, .drawer__go:hover { background: var(--accent); color: var(--white); }

/* ---- Talk filter context ---- */
.filter-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: -8px 0 26px; padding: 16px 20px;
  border-radius: 14px; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--white));
}
.filter-note p { margin: 0; flex: 1 1 320px; font-size: .95rem; }
.filter-note a { font-size: .85rem; font-weight: 600; color: var(--accent-ink); text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.filter-note a:hover { background: var(--accent-ink); color: var(--white); }

/* ---- "Next section" link closing each section ---- */
.next-section { margin-top: clamp(48px, 6vw, 72px); position: relative; }
.next-section a {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 20px;
  padding: 22px 28px; border-radius: 18px; text-decoration: none; color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent); border-left: 5px solid var(--nc);
  background: color-mix(in srgb, var(--nc) 7%, transparent);
  transition: background .3s, border-color .3s;
}
.next-section a:hover { background: color-mix(in srgb, var(--nc) 16%, transparent); }
.next-section__label { font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; opacity: .65; }
.next-section__title { grid-row: 2; display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.next-section__title svg { width: 26px; height: 26px; fill: none; stroke: var(--nc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.next-section__arrow {
  grid-row: 1 / span 2; grid-column: 2; display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 50%; background: var(--nc); color: var(--white); font-size: 1.3rem; transition: transform .3s;
}
.next-section a:hover .next-section__arrow { transform: translateX(4px); }
.contact .next-section { text-align: left; z-index: 2; }

/* ---- Highlight after jumping from another section ---- */
.is-flash { animation: flash 2.4s ease; border-radius: 18px; }
@keyframes flash {
  0%, 60% { box-shadow: 0 0 0 4px var(--accent), 0 0 40px -6px var(--accent); background-color: color-mix(in srgb, var(--accent) 8%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---- Content sits to the right of the dial; section backgrounds run underneath it ---- */
@media (min-width: 861px) {
  .wl__content .container, .wl__content .hero__inner, .wl__content .stats {
    --cw: min(1120px, 100% - var(--wheel-w) - 56px);
    width: var(--cw);
    margin-left: calc(var(--wheel-w) + (100% - var(--wheel-w) - var(--cw)) / 2);
    margin-right: auto;
  }
}
@media (min-width: 861px) and (max-width: 1300px) {
  .wl__content .hero__inner { grid-template-columns: 1fr; }
  .hero__portrait { width: min(300px, 70%); }
  .cards { grid-template-columns: 1fr 1fr; }
  .card--wide { grid-column: 1 / -1; }
  .articles { grid-template-columns: 1fr; }
  .pubs__split, .art__grid, .lead__grid, .about__grid { grid-template-columns: 1fr; }
  .lead__media { position: relative; top: 0; }
  .about__media img, .lead__media img { aspect-ratio: 16 / 10; }
  .awards { grid-template-columns: 1fr; }
  .contact__cards { grid-template-columns: 1fr; }
  .about__quote { right: 16px; bottom: -24px; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .stats { grid-template-columns: 1fr 1fr; row-gap: 10px; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .timeline::before { left: 6px; }
  .tl { grid-template-columns: 1fr; gap: 24px; padding-left: 36px; padding-bottom: 56px; }
  .tl::before { left: 0; }
  .tl__body { padding-left: 0; }
  .footer__inner { grid-template-columns: 1fr; }
}

/* ---- Mobile: the dial stays tucked away behind a corner button ---- */
.dial-fab, .dial-backdrop { display: none; }
@media (max-width: 860px) {
  :root { --dial-r: min(64vw, 300px); }
  .wl__stage {
    top: auto; bottom: var(--dial-inset); left: 50%;
    transform: translateY(calc(var(--dial-r) + 60px)); visibility: hidden;
    transition: transform .55s var(--spring), visibility 0s linear .55s;
  }
  .dial-open .wl__stage { transform: none; visibility: visible; transition: transform .55s var(--spring), visibility 0s; }
  .dial-open { overflow: hidden; }
  .slice text, .lift text { font-size: 19px; }

  .dial-backdrop {
    display: block; position: fixed; inset: 0; z-index: 29;
    background: rgba(8, 12, 22, .62);
    opacity: 0; pointer-events: none; transition: opacity .35s ease;
  }
  .dial-open .dial-backdrop { opacity: 1; pointer-events: auto; }

  .dial-fab {
    display: inline-flex; align-items: center; gap: 9px; position: fixed; z-index: 31;
    right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
    height: 52px; padding: 0 20px 0 16px; border-radius: 999px; border: 0; cursor: pointer;
    font: 700 .95rem/1 var(--sans); letter-spacing: .01em;
    background: var(--accent); color: var(--white);
    box-shadow: 0 10px 28px -8px var(--accent), 0 4px 12px rgba(0, 0, 0, .25);
    transition: bottom .55s var(--spring), background .4s, transform .2s;
  }
  .dial-fab::after {
    content: ""; position: absolute; inset: -6px; border-radius: 999px;
    border: 1.5px dashed color-mix(in srgb, var(--accent) 65%, transparent);
  }
  .dial-fab svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .dial-fab:active { transform: scale(.94); }
  .dial-open .dial-fab { bottom: calc(var(--dial-r) + 28px); background: var(--ink); }

  /* First visit: the dial rises halfway, then tucks back into the button */
  .dial-peek .wl__stage { transform: translateY(calc(var(--dial-r) * .45)); visibility: visible; transition: transform .7s var(--spring), visibility 0s; }
  .dial-peek .dial-fab { transform: scale(1.06); }

  .wl__content { padding-bottom: 96px; }
  .drawer { scroll-margin-bottom: 96px; }
}
