/*
 * rylandbacorn.com
 * One stylesheet, no build step. Newer CSS (scroll-driven animation, animated
 * <details>, text-wrap) is progressive enhancement: the page reads correctly
 * without it.
 *
 * Bump CACHE_VERSION in sw.js whenever this file changes.
 *
 * Quiet palette, 2026-11-15. To restore the purple name, the rainbow photo
 * ring, and the pink dark-mode labels, search for REVERT-LOUD and swap each
 * marked line back in.
 */

@layer reset, tokens, base, layout, components, motion;

/* ===== TOKENS ===== */
@layer tokens {
  :root {
    color-scheme: light dark;

    /* Brand */
    --teal: #367c8a;
    --teal-deep: #285f67;
    --wine: #9c1933;
    --purple: #611f9b;

    /* Light theme */
    --bg: #eef1f2;
    --bg-tint: #e1e9eb;
    --surface: #ffffff;
    --text: #1b2326;
    --muted: #55626a;
    --border: #d5dde0;
    --border-strong: #b4c0c5;
    --link: #2a6570;
    --link-hover: #1d4a52;
    --accent: var(--wine);
    --dot: var(--teal);
    --btn-bg: var(--teal-deep);
    --btn-text: #ffffff;
    --name-from: var(--teal);
    --name-to: var(--purple);
    --glow-a: rgba(54, 124, 138, 0.20);
    --glow-b: rgba(97, 31, 155, 0.10);
    --shadow-1: 0 1px 2px rgba(20, 40, 46, 0.06), 0 2px 8px rgba(20, 40, 46, 0.06);
    --shadow-2: 0 2px 4px rgba(20, 40, 46, 0.06), 0 12px 32px rgba(20, 40, 46, 0.12);
    --photo-filter: none;

    /* Type */
    --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Julius Sans One', 'Public Sans', sans-serif;
    --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
    --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
    --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
    --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem);
    --step-3: clamp(1.75rem, 1.35rem + 1.9vw, 2.75rem);
    --step-4: clamp(2.4rem, 1.5rem + 4.2vw, 4.75rem);

    /* Space and shape */
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --section: clamp(3.5rem, 8vw, 7rem);
    --wrap: 72rem;
    --measure: 65ch;
    --radius: 16px;
    --radius-sm: 10px;

    /* Motion */
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --fast: 160ms;
    --slow: 320ms;

    /* Lets height animate to and from `auto` where supported */
    interpolate-size: allow-keywords;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --bg: #0f1517;
      --bg-tint: #141d20;
      --surface: #182125;
      --text: #e7edef;
      --muted: #9dabb1;
      --border: #2a363b;
      --border-strong: #41525a;
      --link: #7cc4d1;
      --link-hover: #a5dbe5;
      --dot: #7cc4d1;
      /* REVERT-LOUD: --accent: #ea8fa1; */
      --accent: var(--dot);
      --btn-bg: #7cc4d1;
      --btn-text: #0c1416;
      --name-from: #7cc4d1;
      --name-to: #b99aea;
      --glow-a: rgba(124, 196, 209, 0.14);
      --glow-b: rgba(185, 154, 234, 0.10);
      --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
      --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
      --photo-filter: brightness(0.42) contrast(1.15);
    }
  }
}

/* ===== RESET ===== */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  img, picture, svg { display: block; max-width: 100%; }
  img { height: auto; }
  button { font: inherit; }
}

/* ===== BASE ===== */
@layer base {
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-wrap: balance;
  }

  p { text-wrap: pretty; }

  a {
    color: var(--link);
    text-decoration-line: underline;
    text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    transition: color var(--fast) var(--ease), text-decoration-color var(--fast) var(--ease);
  }

  a:hover { color: var(--link-hover); text-decoration-color: currentColor; }

  :focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 3px;
    border-radius: 4px;
  }

  code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    padding: 0.15em 0.45em;
    border-radius: 6px;
    background: var(--bg-tint);
    border: 1px solid var(--border);
    overflow-wrap: anywhere;
  }

  ::selection { background: color-mix(in srgb, var(--teal) 30%, transparent); }
}

/* ===== LAYOUT ===== */
@layer layout {
  .wrap {
    width: min(var(--wrap), 100% - 2 * var(--gutter));
    margin-inline: auto;
  }

  section { padding-block: var(--section); }

  .section-title {
    font-size: var(--step-3);
    margin-bottom: 0.5rem;
  }

  .section-intro {
    color: var(--muted);
    max-width: var(--measure);
    margin-bottom: clamp(2rem, 4vw, 3rem);
  }

  .skip-link {
    position: absolute;
    left: 0.5rem;
    top: -4rem;
    z-index: 200;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    background: var(--btn-bg);
    color: var(--btn-text);
    text-decoration: none;
    transition: top var(--fast) var(--ease);
  }

  .skip-link:focus { top: 0.5rem; }
}

/* ===== COMPONENTS ===== */
@layer components {

  /* ----- Header: full-bleed, sticky, translucent ----- */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    inline-size: 100%;
    padding-block: 0.85rem;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--border);
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .brand {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
  }

  .brand:hover { color: var(--link); }
  .brand-short { display: none; }

  .site-nav ul {
    display: flex;
    gap: clamp(0.75rem, 2.5vw, 1.75rem);
  }

  .site-nav a {
    display: inline-block;
    padding-block: 0.4rem;
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
  }

  .site-nav a:hover { color: var(--text); border-bottom-color: var(--dot); }

  @media (max-width: 30rem) {
    .brand-full { display: none; }
    .brand-short { display: inline; }
  }

  /* ----- Hero ----- */
  .hero {
    padding-block: clamp(2.5rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem);
    background:
      radial-gradient(60rem 32rem at 88% 0%, var(--glow-a), transparent 70%);
      /* REVERT-LOUD:
      radial-gradient(42rem 26rem at 0% 100%, var(--glow-b), transparent 70%);
      */
  }

  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
  }

  .eyebrow {
    font-size: var(--step--1);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    /* REVERT-LOUD: color: var(--accent); */
    margin-bottom: 0.9rem;
  }

  .hero-name {
    font-size: var(--step-4);
    line-height: 1.02;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
    color: var(--text);
    /* REVERT-LOUD:
    background: linear-gradient(120deg, var(--name-from), var(--name-to));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--name-from);
    */
  }

  .hero-role {
    font-family: var(--font-heading);
    font-size: var(--step-2);
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-wrap: balance;
    margin-bottom: 1rem;
  }

  .hero-intro {
    font-size: var(--step-1);
    line-height: 1.5;
    color: var(--muted);
    max-width: 38ch;
    margin-bottom: 1.75rem;
  }

  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .hero-portrait {
    position: relative;
    justify-self: center;
    inline-size: min(100%, 24rem);
  }

  /* REVERT-LOUD: blurred purple wash behind the photo
  .hero-portrait::before {
    content: "";
    position: absolute;
    inset: 8% -6% -6% 8%;
    border-radius: 32px;
    background: linear-gradient(135deg, var(--name-from), var(--name-to));
    filter: blur(38px);
    opacity: 0.35;
  }
  */

  /* Ring: a padded wrapper whose background shows as the border */
  .portrait-ring {
    position: relative;
    padding: 5px;
    border-radius: 30px;
    background: var(--dot);
    /* REVERT-LOUD: background: conic-gradient(from 210deg, var(--teal), var(--purple), var(--wine), var(--teal)); */
    box-shadow: var(--shadow-2);
  }

  .portrait-ring img {
    inline-size: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 30%;
    border-radius: 25px;
    background: var(--bg-tint);
  }

  /* Proof numbers */
  .proof {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
  }

  .proof-value {
    display: block;
    font-size: var(--step-2);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--text);
    white-space: nowrap;
  }

  .proof-label {
    display: block;
    margin-top: 0.3rem;
    font-size: var(--step--1);
    line-height: 1.35;
    color: var(--muted);
  }

  @media (max-width: 52rem) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-portrait { grid-row: 1; justify-self: start; inline-size: min(60%, 15rem); }
    .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  /* ----- Buttons ----- */
  .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 44px;
    padding: 0.55rem 1.15rem;
    border: 1.5px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: var(--step-0);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease),
      color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
  }

  .btn:hover {
    border-color: var(--dot);
    color: var(--text);
    box-shadow: var(--shadow-1);
  }

  .btn svg { inline-size: 1.15em; block-size: 1.15em; flex: none; fill: currentColor; }

  .btn-primary {
    background: var(--btn-bg);
    border-color: var(--btn-bg);
    color: var(--btn-text);
  }

  .btn-primary:hover {
    color: var(--btn-text);
    border-color: var(--btn-bg);
    background: color-mix(in srgb, var(--btn-bg) 88%, var(--text));
  }

  /* ----- About ----- */
  .about { padding-top: clamp(2rem, 5vw, 4rem); }

  .prose { max-width: var(--measure); }
  .prose > * + * { margin-top: 1.25rem; }

  .lead {
    font-size: var(--step-1);
    line-height: 1.55;
  }

  .pull-quote {
    margin-block: 2.25rem;
    padding-left: 1.5rem;
    border-left: 4px solid var(--accent);
    font-family: var(--font-heading);
    font-size: var(--step-2);
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-wrap: balance;
  }

  /* ----- Story: "How it started" ----- */
  .story {
    background: var(--bg-tint);
    border-block: 1px solid var(--border);
  }

  .story-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: start;
  }

  .story-heading {
    position: sticky;
    top: 6rem;
    font-size: var(--step-3);
  }

  .story-heading em { font-style: normal; color: var(--muted); /* REVERT-LOUD: color: var(--accent); */ }

  .story-steps { counter-reset: step; }

  .story-step {
    position: relative;
    padding: 0 0 2.25rem 2.25rem;
    border-left: 2px solid var(--border-strong);
  }

  .story-step:last-child { padding-bottom: 0; border-left-color: transparent; }

  .story-step::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 0.3rem;
    inline-size: 14px;
    block-size: 14px;
    border-radius: 50%;
    background: var(--bg-tint);
    border: 3px solid var(--dot);
  }

  .step-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: var(--step--1);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    /* REVERT-LOUD: color: var(--accent); */
  }

  .story-step p { max-width: var(--measure); }

  @media (max-width: 52rem) {
    .story-grid { grid-template-columns: 1fr; }
    .story-heading { position: static; }
  }

  /* ----- Career timeline ----- */
  .timeline { --rail: 11.5rem; --gap: 3rem; }

  .role {
    position: relative;
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    column-gap: var(--gap);
    padding-bottom: 1.75rem;
  }

  /* The line */
  .role::before {
    content: "";
    position: absolute;
    left: calc(var(--rail) + var(--gap) / 2 - 1px);
    top: 0;
    bottom: 0;
    inline-size: 2px;
    background: var(--border-strong);
  }

  .role:first-child::before { top: 1.6rem; }
  .role:last-child { padding-bottom: 0; }
  .role:last-child::before { bottom: auto; block-size: 1.6rem; }

  /* The dot */
  .role::after {
    content: "";
    position: absolute;
    left: calc(var(--rail) + var(--gap) / 2 - 8px);
    top: 1.6rem;
    inline-size: 16px;
    block-size: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--border-strong);
  }

  .role.is-current::after {
    background: var(--dot);
    border-color: var(--dot);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--dot) 22%, transparent);
  }

  .role-when {
    padding-top: 1.3rem;
    text-align: right;
    font-size: var(--step--1);
    line-height: 1.4;
    color: var(--muted);
  }

  .role-when time {
    display: block;
    font-weight: 600;
    color: var(--text);
  }

  .role-card {
    padding: clamp(1.1rem, 2.5vw, 1.6rem);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-1);
    transition: border-color var(--fast) var(--ease), box-shadow var(--slow) var(--ease);
  }

  /* Nothing moves on hover, so nothing can be clipped */
  .role-card:hover { border-color: var(--dot); box-shadow: var(--shadow-2); }
  .role.is-current .role-card { border-color: color-mix(in srgb, var(--dot) 55%, var(--border)); }

  .role-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.35rem;
  }

  .role-company { font-size: var(--step-2); }

  .badge {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--dot) 16%, transparent);
    color: var(--link);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .role-title { font-weight: 600; color: var(--muted); /* REVERT-LOUD: color: var(--accent); */ }
  .role-sub { font-size: var(--step--1); color: var(--muted); }
  .role-summary { margin-top: 0.75rem; max-width: var(--measure); }

  .role-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin-top: 0.6rem;
    font-size: var(--step--1);
    font-weight: 600;
  }

  .stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
  }

  .stat {
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--bg-tint);
    border: 1px solid var(--border);
    line-height: 1.3;
  }

  .stat b { display: block; font-size: var(--step-1); font-weight: 600; }
  .stat span { font-size: var(--step--1); color: var(--muted); }

  /* Expandable detail, no JavaScript */
  .role-more { margin-top: 1rem; }

  .role-more summary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding-inline: 0.1rem;
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--link);
    cursor: pointer;
    list-style: none;
  }

  .role-more summary::-webkit-details-marker { display: none; }

  .role-more summary::after {
    content: "";
    inline-size: 0.5em;
    block-size: 0.5em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    rotate: 45deg;
    translate: 0 -0.12em;
    transition: rotate var(--fast) var(--ease), translate var(--fast) var(--ease);
  }

  .role-more[open] summary::after { rotate: -135deg; translate: 0 0.12em; }
  .role-more summary:hover { color: var(--link-hover); }

  .role-body {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }

  .role-body > * + * { margin-top: 0.9rem; }

  .role-list li {
    position: relative;
    padding-left: 1.15rem;
    max-width: var(--measure);
  }

  .role-list li + li { margin-top: 0.5rem; }

  .role-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    inline-size: 6px;
    block-size: 6px;
    border-radius: 50%;
    background: var(--dot);
  }

  .role-list ul { margin-top: 0.5rem; }
  .role-list ul li { font-size: var(--step--1); color: var(--muted); }
  .role-list ul li::before { background: var(--border-strong); }

  .role-note { font-style: italic; color: var(--muted); max-width: var(--measure); }

  .role-figure img {
    inline-size: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
  }

  .role-figure figcaption {
    margin-top: 0.4rem;
    font-size: var(--step--1);
    color: var(--muted);
  }

  @media (max-width: 52rem) {
    .timeline { --rail: 0rem; --gap: 0rem; }

    .role {
      grid-template-columns: 1fr;
      padding-left: 1.9rem;
    }

    .role::before { left: 7px; }
    .role::after { left: 0; top: 0.2rem; }
    .role:first-child::before { top: 0.2rem; }
    .role:last-child::before { block-size: 0.2rem; }

    .role-when {
      padding-top: 0;
      margin-bottom: 0.6rem;
      text-align: left;
    }

    .role-when time { display: inline; margin-right: 0.5rem; }
  }

  /* ----- Podcasts ----- */
  .podcasts { padding-top: 0; }

  .podcast-list {
    container-type: inline-size;
    display: grid;
    gap: 1.25rem;
  }

  .podcast-item {
    padding: clamp(1.1rem, 2.5vw, 1.6rem);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-1);
  }

  .podcast-show {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    /* REVERT-LOUD: color: var(--accent); */
  }

  .podcast-date {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    color: var(--muted);
  }

  .podcast-list > .podcast-item:first-child { grid-column: 1 / -1; }

  .podcast-title {
    font-size: var(--step-1);
    letter-spacing: 0.03em;
    margin-bottom: 0.6rem;
  }

  .podcast-title a { text-decoration: none; }
  .podcast-title a::after { content: " \2197"; font-family: var(--font-body); }

  @supports (container-type: inline-size) {
    @container (min-width: 44rem) {
      .podcast-list > * { grid-column: span 1; }
    }
  }

  @media (min-width: 52rem) {
    .podcast-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }

  /* ----- Connect ----- */
  .connect {
    background:
      radial-gradient(50rem 22rem at 50% 0%, var(--glow-a), transparent 70%),
      var(--bg-tint);
    border-block: 1px solid var(--border);
    text-align: center;
  }

  .connect .section-intro { margin-inline: auto; }

  .connect-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  /* ----- Closing: palms in the fog ----- */
  .closing {
    position: relative;
    display: grid;
    min-block-size: min(82vh, 48rem);
    overflow: clip;
  }

  .closing picture { display: contents; }

  .closing-img {
    grid-area: 1 / 1;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    object-position: 50% 78%;
    filter: var(--photo-filter);
    /* The page colour fades into the fog instead of meeting it at a hard edge */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 42%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 42%);
    transition: opacity var(--slow) var(--ease);
  }

  .closing-img.is-fading { opacity: 0; }

  @media (prefers-reduced-motion: reduce) {
    .closing-img { transition: none; }
  }

  .closing-notes {
    grid-area: 1 / 1;
    align-self: start;
    position: relative;
    z-index: 1;
    padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 0;
    text-align: center;
    font-size: var(--step--1);
    color: var(--muted);
  }

  .closing-notes p + p { margin-top: 0.35rem; }

  .closing-dots {
    display: block;
    width: fit-content;
    margin: 0 auto 1rem;
    padding: 0.35rem 0.8rem;
    min-block-size: 2.75rem;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    line-height: 1;
    color: var(--border-strong);
    cursor: pointer;
  }

  .closing-dots:hover,
  .closing-dots:focus-visible { color: var(--dot); }
}

/* ===== MOTION ===== */
@layer motion {
  /* Animated open and close for <details>, where supported */
  @supports selector(::details-content) {
    .role-more::details-content {
      block-size: 0;
      overflow: clip;
      opacity: 0;
      transition: block-size var(--slow) var(--ease), opacity var(--slow) var(--ease),
        content-visibility var(--slow) allow-discrete;
    }

    .role-more[open]::details-content {
      block-size: auto;
      opacity: 1;
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
      /* Roles and story steps ease in as they enter the viewport */
      .role-card,
      .story-step,
      .podcast-item {
        animation: rise linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 45%;
      }

      /* Header tightens once the page scrolls */
      .site-header {
        animation: header-tighten linear both;
        animation-timeline: scroll(root);
        animation-range: 0 140px;
      }

      /* Palms drift slowly as the closing section scrolls in */
      .closing-img {
        animation: drift linear both;
        animation-timeline: view();
        animation-range: entry 0% exit 100%;
      }
    }
  }

  @keyframes rise {
    from { opacity: 0; translate: 0 1.25rem; }
    to { opacity: 1; translate: 0 0; }
  }

  @keyframes header-tighten {
    from { padding-block: 0.85rem; box-shadow: none; }
    to { padding-block: 0.45rem; box-shadow: var(--shadow-1); }
  }

  @keyframes drift {
    from { scale: 1.08; }
    to { scale: 1; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; }
  }
}

/* ===== PRINT ===== */
@media print {
  .site-header, .connect, .closing-img, .hero-actions { display: none; }
  body { background: #fff; color: #000; }
  .role-card, .podcast-item { box-shadow: none; break-inside: avoid; }
  .role-more::details-content { block-size: auto; opacity: 1; content-visibility: visible; }
  a { color: #000; }
}
