/*
 * The showcase frame (Sept 2026): index.html and work-experience.html.
 * A top bar and one rounded panel, no sidebar, in the spirit of
 * garri.design. The reading frame (sidebar plus the same rounded panel)
 * stays on the case studies and the AI post. Tokens match site.vN.css.
 */
  :root {
    --bg: #F2F2F1; --ink: #1A1917; --body: #2B2A26; --muted: #6E6E6C;
    --line: #E2E2E0; --accent: #35734C; --card: #FFFFFF; --frame: #F8F8F7;
    --serif: 'Source Serif 4', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, monospace;
    --pad: clamp(20px, 3vw, 40px);
    --meta: minmax(260px, 1fr);
    --stage: 3fr;
    --bar: 64px;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; scroll-padding-top: var(--bar); }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body { margin: 0; background: var(--frame); color: var(--body); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
  a { color: inherit; }
  img { max-width: 100%; display: block; }

  /* ---- Grid: a meta column and a stage, shared by every row, so the nav,
     the statement and every image start on the same line. ---- */
  .row { display: grid; grid-template-columns: var(--meta) var(--stage); column-gap: clamp(32px, 4vw, 72px); padding: 0 var(--pad); }

  /* ---- Top bar ---- */
  .bar { position: sticky; top: 0; z-index: 10; height: var(--bar); align-items: center; background: var(--frame); padding-left: calc(var(--pad) + 10px); padding-right: calc(var(--pad) + 10px); }
  .bar .name { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.2; text-decoration: none; color: var(--ink); transition: color .15s; }
  .bar .name:hover { color: var(--accent); }
  .bar nav { display: flex; justify-content: space-between; align-items: center; }
  .bar nav .links { display: flex; gap: 26px; }
  .bar nav a { font-size: 13px; font-weight: 500; text-decoration: none; color: var(--ink); }
  .bar nav a:hover { color: var(--accent); }

  /* ---- The content panel: the same white, rounded, bordered area the
     inner pages use, so home and the reading pages feel like one frame. ---- */
  main.panel-area { margin: 0 10px 10px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px; overflow: clip; }
  /* Desktop: exactly the inner pages' frame. The page itself doesn't
     scroll; the panel is fixed in the window and its content scrolls
     inside it, so the rounded corners stay put. Phones scroll the
     document, as the inner pages do below 860px. */
  @media (min-width: 901px) {
    html, body { height: 100%; }
    body { display: flex; flex-direction: column; overflow: hidden; }
    .bar { position: static; flex: none; }
    main.panel-area { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
  }
  @media (min-width: 901px) and (prefers-reduced-motion: reduce) { main.panel-area { scroll-behavior: auto; } }

  /* Scroll edge: content softens and blurs out under the panel's top edge
     instead of being cut off by it. A sticky strip inside the scroller,
     taking no space, shown only once the panel has scrolled. */
  @media (min-width: 901px) {
    main.panel-area::before {
      content: ""; display: block; position: sticky; top: 0; z-index: 4;
      height: 36px; margin-bottom: -36px; pointer-events: none;
      background: linear-gradient(to bottom, rgba(255,255,255,.92), rgba(255,255,255,0));
      backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
      -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
              mask-image: linear-gradient(to bottom, #000 30%, transparent);
      opacity: 0; transition: opacity .25s ease;
    }
    main.panel-area.scrolled::before { opacity: 1; }
  }

  /* ---- Opening statement ---- */
  .intro { min-height: calc(100svh - var(--bar) - 12px); grid-template-rows: 1fr auto; padding-top: 28px; padding-bottom: 24px; }
  .intro h1 { grid-column: 1 / -1; align-self: center; justify-self: center; text-align: center; margin: 0; max-width: 18em; text-wrap: balance; font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); }
  .intro h1 em { font-style: normal; color: var(--accent); }
  .intro .foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

  /* ---- Work panels ---- */
  .work { padding-top: 8px; }
  .panel { min-height: calc(100svh - var(--bar) - 12px); align-items: center; padding-top: 48px; padding-bottom: 48px; }
  .meta { align-self: center; max-width: 360px; }
  .meta .co { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .meta .co img { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; background: #fff; padding: 3px; border: 1px solid var(--line); }
  .meta h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
  .meta h2 a { text-decoration: none; }
  .meta p { margin: 0 0 10px; }
  .meta .out { color: var(--ink); font-weight: 500; }
  .facts { margin: 20px 0 22px; border-top: 1px solid var(--line); }
  .facts div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
  .facts dt { color: var(--muted); }
  .facts dd { margin: 0; color: var(--ink); }
  .go { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
  .go span { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .go:hover { text-decoration: underline; text-underline-offset: 3px; }

  .stage { display: block; border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: 0 1px 0 var(--line), 0 18px 48px -24px rgba(26, 25, 23, .28); transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s; }
  /* Never taller than the screen: a 4:3 hero on a wide monitor would be. */
  .stage { justify-self: start; max-width: 100%; }
  .stage img { width: auto; max-width: 100%; height: auto; max-height: calc(100svh - var(--bar) - 96px); }
  .stage:hover { transform: translateY(-3px); box-shadow: 0 1px 0 var(--line), 0 26px 56px -24px rgba(26, 25, 23, .34); }

  /* The AI post sits after the case studies, divided from them by a rule;
     its image is the same size as theirs. */
  .panel.practice { border-top: 1px solid var(--line); }

  /* ---- About / contact ---- */
  .about { padding-top: 96px; padding-bottom: 36px; border-top: 1px solid var(--line); }
  .about .label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .about .text { max-width: 640px; }
  .about .text p { margin: 0 0 16px; font-size: 18px; line-height: 1.55; color: var(--ink); }
  .about .links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 28px 0 0; }
  .about .links a { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
  .about .links a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .about .foot { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-top: 96px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

  /* ---- Position dots, as on the reference: where you are in the work. ---- */
  .dots { position: fixed; right: 26px; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; z-index: 5; opacity: 0; transition: opacity .3s; }
  .dots.on { opacity: 1; }
  .dots a { width: 7px; height: 7px; border-radius: 50%; background: var(--line); display: block; }
  .dots a.on { background: var(--ink); }

  /* ---- Reveal on scroll; content is visible without JS. ---- */
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } .stage { transition: none; } }

  /* ---- Tablet and phone: stack, text first. ---- */
  @media (max-width: 900px) {
    :root { --bar: 56px; }
    main.panel-area { margin: 0 6px 6px; }
    .bar { padding-left: calc(var(--pad) + 6px); padding-right: calc(var(--pad) + 6px); }
    .row { grid-template-columns: 1fr; }
    .bar nav { justify-content: flex-end; }
    .bar nav .links { gap: 18px; }
    .bar nav .contact { display: none; }
    .intro { min-height: 78svh; }
    .intro h1 { grid-column: 1; text-align: left; justify-self: start; }
    .panel { min-height: 0; padding-top: 56px; padding-bottom: 56px; row-gap: 24px; }
    .meta { max-width: none; }
    .panel + .panel { border-top: 1px solid var(--line); }
    .about .label { margin-bottom: 14px; }
    .dots { display: none; }
    .stage img { max-height: none; width: 100%; }
  }
  @media (max-width: 520px) {
    .bar { grid-template-columns: auto 1fr; }
    .bar nav .links a.opt { display: none; }
  }

  /* ---- Skip link: first focusable element, visible on focus only. ---- */
  .skip-link { position: absolute; left: 12px; top: -48px; z-index: 20; padding: 8px 12px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 14px; text-decoration: none; }
  .skip-link:focus { top: 12px; }

  /* ---- Current page in the top bar ---- */
  .bar nav a[aria-current="page"] { color: var(--accent); }

  /* ==== Work Experience (work-experience.html) ====
     Same grid as the home page: the left column carries when and where,
     the right carries the role. */
  .xp-intro { padding-top: clamp(64px, 9vh, 112px); padding-bottom: 56px; }
  .xp-intro .label, .xp .when { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .xp-intro .label { padding-top: 14px; }
  .xp-intro h1 { margin: 0 0 18px; font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4vw, 52px); line-height: 1.08; letter-spacing: -0.02em; color: var(--ink); }
  .xp-intro p { margin: 0; max-width: 680px; font-size: 18px; line-height: 1.6; color: var(--body); }

  .xp { padding-top: 48px; padding-bottom: 56px; border-top: 1px solid var(--line); }
  .xp .side { align-self: start; position: sticky; top: 32px; }
  .xp .when { display: block; margin: 0 0 12px; }
  .xp .co { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--ink); }
  .xp .co img { width: 26px; height: 26px; object-fit: contain; border-radius: 6px; background: #fff; padding: 3px; border: 1px solid var(--line); }
  .xp .where { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
  .xp .side .links { display: grid; gap: 6px; margin-top: 18px; }
  .xp .side .links a { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
  .xp .side .links a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .xp .body { max-width: 760px; }
  .xp h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); }
  .xp .mandate { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink); }
  .xp .part { margin: 28px 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
  .xp ul { margin: 0; padding-left: 20px; }
  .xp ul li { margin: 0 0 8px; font-size: 15.5px; line-height: 1.6; }
  .xp ul li::marker { color: var(--accent); }
  .xp dl { margin: 0; border-top: 1px solid var(--line); }
  .xp dl div { display: grid; grid-template-columns: 170px 1fr; gap: 6px 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .xp dt { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
  .xp dd { margin: 0; font-size: 15.5px; line-height: 1.6; }
  .xp.compact { padding-top: 32px; padding-bottom: 32px; }
  .xp.compact h2 { font-size: 19px; margin-bottom: 8px; }
  .xp.compact .mandate { font-size: 15.5px; color: var(--body); }
  .xp-foot { padding-top: 56px; padding-bottom: 36px; border-top: 1px solid var(--line); }
  .xp-foot .links { grid-column: 2; display: flex; flex-wrap: wrap; gap: 12px 28px; }
  .xp-foot .links a { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
  .xp-foot .links a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .xp-foot .foot { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-top: 72px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  @media (max-width: 900px) {
    .xp-intro .label { padding-top: 0; margin-bottom: 14px; }
    .xp .side { position: static; margin-bottom: 20px; }
    .xp dl div { grid-template-columns: 1fr; gap: 2px; }
    .xp-foot .links { grid-column: 1; }
  }
