/* Freddy Castiblanco — white NY edition.
   Layout: white page, big type, thin rules; black bands for Terraza 7, the timeline and contact.
   Purple is the only colour. No inline styles anywhere (CSP). */

@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dm-sans.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-2: #f4f4f5;
  --ink: #0a0a0b;
  --mute: #5c5c66;
  --line: #e2e2e6;
  --line-strong: #bdbdc6;
  --violet: #6d28d9;
  --violet-text: #6d28d9;
  --on-violet: #ffffff;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
  --bar: 2.5rem;
  color-scheme: light;
}
/* Black bands: same components, swapped tokens */
.dark {
  --bg: #0a0a0b;
  --bg-2: #17171a;
  --ink: #f4f4f5;
  --mute: #a1a1aa;
  --line: #2a2a30;
  --line-strong: #4a4a54;
  --violet: #7c3aed;
  --violet-text: #c4b5fd;
  color-scheme: dark;
  background: var(--bg);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-weight: 400; font-size: 1.0625rem; line-height: 1.55;
  padding-top: var(--bar); overflow-x: clip;
}
h1, h2, h3, h4, strong, b { font-weight: 400; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--violet-text); }
:focus-visible { outline: 2px solid var(--violet-text); outline-offset: 3px; }
::selection { background: var(--violet); color: #fff; }
.wrap { width: 100%; max-width: 1400px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: 0.5rem 1rem; z-index: 200; }
.skip:focus { left: 0; }
.hp { display: none !important; }
.eyebrow { color: var(--violet-text); font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; }
.h2 { font-size: clamp(2.1rem, 5.5vw, 4.5rem); line-height: 1; letter-spacing: -0.045em; text-wrap: balance; }
.lead { color: var(--mute); max-width: 38rem; text-wrap: pretty; }
.lead + .lead { margin-top: 1rem; }

/* ---------- Status bar ---------- */
.status {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: calc(var(--bar) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px);
  background: rgba(10, 10, 11, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); font-size: 0.8125rem;
}
.status-inner { height: var(--bar); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.status p { white-space: nowrap; }
.status .s-left, .status .s-right { color: var(--mute); }
.status .s-mid { display: flex; align-items: center; gap: 0.6rem; }
.status .s-right { text-align: right; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.18); flex: none; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1rem; }
.brand { text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.header-inner nav { min-width: 0; max-width: 100%; }
.nav { display: flex; gap: 1.5rem; overflow-x: auto; scrollbar-width: none; font-size: 0.9375rem; color: var(--mute); }
.nav::-webkit-scrollbar { display: none; }
.nav a { text-decoration: none; white-space: nowrap; }
.nav a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.75rem 1.5rem; border-radius: 999px;
  font: inherit; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.16s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-violet { background: var(--violet); border-color: var(--violet); color: var(--on-violet); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink); color: var(--bg); }
  .btn-violet:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2rem, 4vw, 3.5rem) clamp(2.5rem, 5vw, 4rem); }
.hero-roles { margin-bottom: clamp(1rem, 2.5vw, 2rem); }
.hero-name { font-size: clamp(3.4rem, 15.2vw, 14rem); line-height: 0.88; letter-spacing: -0.06em; margin-left: -0.04em; }
.hero-name .line { display: block; }
.hero-name .line > span { display: inline-block; }
.hero-name .line:nth-child(2) > span { --i: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); margin-top: clamp(1.5rem, 3vw, 2.5rem); align-items: end; }
.hero-lede { font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.3; letter-spacing: -0.02em; max-width: 34rem; text-wrap: pretty; }
.hero-lede span { color: var(--mute); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.ph {
  display: grid; place-items: center; text-align: center; padding: 1rem;
  aspect-ratio: 4 / 5; max-height: 26rem; max-width: 100%;
  border: 1px dashed var(--line-strong); background: var(--bg-2); color: var(--mute); font-size: 0.875rem;
}
.hero-rule { display: block; height: 1px; background: var(--violet); margin-top: clamp(2rem, 5vw, 4rem); transform-origin: left; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 9vw, 8rem); }
.section + .section:not(.dark) { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 4rem; align-items: end; margin-bottom: clamp(2rem, 5vw, 4rem); }
.section-head .h2 { margin-top: 0.75rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2rem clamp(2rem, 5vw, 5rem); }

/* Facts (label + value) */
.facts { margin-top: 2rem; }
.facts li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; padding-block: 0.9rem; border-top: 1px solid var(--line); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts span { color: var(--mute); }

/* Rows: year / title / detail — used by medicine, leadership, education, honors */
.rows li {
  position: relative; display: grid; grid-template-columns: 7rem minmax(0, 1fr) minmax(0, 1.1fr); gap: 0.5rem 2.5rem;
  padding-block: clamp(1.1rem, 2.2vw, 1.75rem); border-top: 1px solid var(--line);
}
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows li::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--violet);
  transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease-drawer);
}
.rows .yr { color: var(--violet-text); font-variant-numeric: tabular-nums; padding-top: 0.2rem; }
.rows h2, .rows h3 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance; }
.rows p { color: var(--mute); text-wrap: pretty; }
.more { display: inline-block; margin-top: 1.75rem; color: var(--violet-text); }
@media (hover: hover) and (pointer: fine) { .rows li:hover::before, .route li:hover::before { transform: scaleX(1); } }

/* Terraza 7 (dark band) */
.terraza-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: start; }
.terraza-top > div:first-child { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.terraza-top .ph { aspect-ratio: 4 / 3; max-height: none; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 1rem; width: 100%; }
.stats div { background: var(--bg); padding: 1.25rem; }
.stats b { display: block; font-size: clamp(2.2rem, 5vw, 3.5rem); letter-spacing: -0.05em; line-height: 1; }
.stats span { color: var(--mute); font-size: 0.9375rem; }
.route-head { margin-top: clamp(3rem, 7vw, 6rem); margin-bottom: 1.5rem; display: grid; gap: 0.75rem; }
.route-head h3 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: -0.04em; line-height: 1.05; }
.route li {
  position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1.1fr); gap: 0.25rem 2.5rem;
  padding-block: clamp(0.6rem, 1.1vw, 0.85rem); border-top: 1px solid var(--line);
}
.route li:last-child { border-bottom: 1px solid var(--line); }
.route li::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--violet); transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease-drawer); }
.route .n { color: var(--violet-text); font-variant-numeric: tabular-nums; padding-top: 0.25rem; }
.route h4 { font-size: clamp(1.3rem, 2.6vw, 2.1rem); letter-spacing: -0.035em; line-height: 1.1; text-wrap: balance; }
.route p { color: var(--mute); }
.route em { font-style: normal; color: var(--ink); }

/* ---------- Timeline (dark band) ---------- */
.tl-title { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.tl-track { position: relative; display: flex; flex-direction: column; padding-left: 1.75rem; border-left: 2px solid var(--violet); gap: 2rem; }
.tl-item { position: relative; }
.tl-item::before { content: ""; position: absolute; left: calc(-1.75rem - 6px); top: 0.6rem; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); }
.tl-year { display: block; font-size: clamp(2.4rem, 8vw, 4rem); letter-spacing: -0.05em; line-height: 1; }
.tl-text { color: var(--mute); max-width: 22rem; margin-top: 0.5rem; text-wrap: pretty; }
.tl-bar { display: none; }
.pin-stick { padding-block: clamp(3.5rem, 9vw, 8rem); }
@media (min-width: 721px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .pin { height: 360vh; view-timeline: --pin block; }
    .pin-stick { position: sticky; top: var(--bar); height: calc(100vh - var(--bar)); padding-block: 0; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
    .tl-track {
      flex-direction: row; width: max-content; padding-inline: var(--gutter); border-left: 0; gap: 0;
      border-top: 2px solid var(--violet); margin-top: 3rem; padding-top: 2rem;
      animation: tl-slide linear both; animation-timeline: --pin; animation-range: cover 100vh cover calc(100% - 100vh);
    }
    .tl-item { width: clamp(16rem, 26vw, 24rem); padding-right: 2rem; }
    .tl-item::before { left: 0; top: calc(-2rem - 6px); }
    .tl-bar { display: block; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 2.5rem; height: 2px; background: var(--line); }
    .tl-bar::after { content: ""; position: absolute; inset: 0; background: var(--violet-text); transform-origin: left; animation: tl-fill linear both; animation-timeline: --pin; animation-range: cover 100vh cover calc(100% - 100vh); }
  }
}
@keyframes tl-slide { from { transform: translateX(0); } to { transform: translateX(calc(-100% + 100vw)); } }
@keyframes tl-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Press carousel (no JavaScript) ---------- */
.quotes { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quotes::-webkit-scrollbar { display: none; }
.quote { flex: 0 0 100%; scroll-snap-align: start; scroll-margin-top: 30vh; padding-block: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.quote blockquote { font-size: clamp(1.5rem, 3.6vw, 3rem); line-height: 1.15; letter-spacing: -0.035em; max-width: 56rem; text-wrap: balance; }
.quote blockquote::before { content: "\201C"; color: var(--violet); }
.quote blockquote::after { content: "\201D"; color: var(--violet); }
.quote cite { font-style: normal; color: var(--mute); }
.quote cite b { color: var(--ink); }
.q-ctrl { display: flex; align-items: center; gap: 1.25rem; margin-top: auto; flex-wrap: wrap; }
.q-arrow { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid var(--line-strong); border-radius: 50%; text-decoration: none; transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.16s var(--ease-out); }
.q-arrow:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) { .q-arrow:hover { border-color: var(--violet); background: var(--violet); color: #fff; } }
.q-dots { display: flex; gap: 0.25rem; }
.q-dots a { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; text-decoration: none; }
.q-dots a::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--line-strong); }
.q-dots a[aria-current="true"]::before { background: var(--violet); width: 0.75rem; height: 0.75rem; }

/* ---------- Contact (dark band) ---------- */
.contact { padding-block: clamp(3.5rem, 9vw, 8rem); }
.contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: start; }
.contact h2 { font-size: clamp(3rem, 10vw, 8rem); line-height: 0.9; letter-spacing: -0.06em; }
.contact .lead { margin-top: 1.5rem; }
.form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; }
.field label { color: var(--mute); font-size: 0.875rem; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.8rem 1rem; width: 100%;
  transition: border-color 0.2s var(--ease-out);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet-text); box-shadow: 0 0 0 3px rgba(196, 181, 253, 0.2); }
.form .btn { justify-self: start; }
.site-footer { padding-block: 2rem; color: var(--mute); font-size: 0.9375rem; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Simple pages */
.simple { min-height: calc(100vh - var(--bar)); display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; padding-block: 4rem; }
.simple h1 { font-size: clamp(2.8rem, 10vw, 7rem); line-height: 0.95; letter-spacing: -0.055em; }
.simple p { color: var(--mute); max-width: 34rem; }

/* ---------- Motion (CSS only, off with reduced motion) ---------- */
.curtain { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .curtain {
    display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; background: #0a0a0b; pointer-events: none;
    animation: curtain 0.9s var(--ease-io) 0.7s both;
  }
  .curtain::after { content: ""; width: min(12rem, 40vw); height: 2px; background: #7c3aed; transform-origin: left; animation: draw 0.6s var(--ease-drawer) 0.05s both; }
  @keyframes curtain { 0% { clip-path: inset(0 0 0 0); visibility: visible; } 99% { visibility: visible; } 100% { clip-path: inset(0 0 100% 0); visibility: hidden; } }
  .hero-name .line > span { animation: name-in 1s var(--ease-out) both; animation-delay: calc(1.25s + var(--i, 0) * 0.12s); }
  .hero-roles, .hero-grid > * { animation: fade-up 0.8s var(--ease-out) 1.7s both; }
  .hero-grid > :nth-child(2) { animation-delay: 1.85s; }
  .hero-rule { animation: draw 1.1s var(--ease-io) 1.9s both; }
  @keyframes name-in { from { opacity: 0; filter: blur(16px); transform: translateY(0.18em); } to { opacity: 1; filter: blur(0); transform: none; } }
  @keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @supports (animation-timeline: view()) {
    .reveal { animation: focus-in linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    @keyframes focus-in { from { opacity: 0; filter: blur(12px); transform: translateY(22px); } to { opacity: 1; filter: blur(0); transform: none; } }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid, .section-head, .split, .terraza-top, .contact-inner { grid-template-columns: minmax(0, 1fr); }
  .rows li { grid-template-columns: 5rem minmax(0, 1fr); }
  .rows li p { grid-column: 2; }
  .route li { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .route li p { grid-column: 2; }
  .hero .ph { max-width: 20rem; }
}
@media (max-width: 640px) {
  .status .s-left { display: none; }
  .status-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .hero-name { font-size: 20vw; }
  .facts li { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .rows li { grid-template-columns: minmax(0, 1fr); }
  .rows li p { grid-column: auto; }
}

/* ---------- Portrait and gallery ---------- */
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; max-height: 26rem; object-fit: cover; object-position: 50% 30%; filter: grayscale(1); }
.gfilter { position: relative; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.f-in { position: absolute; top: 0; left: 0; opacity: 0; width: 1px; height: 1px; margin: 0; }
.f-lab { padding: 0.45rem 1rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.9375rem; color: var(--mute); cursor: pointer; transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out); }
.f-in:checked + .f-lab { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.f-in:focus-visible + .f-lab { outline: 2px solid var(--violet-text); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .f-in:not(:checked) + .f-lab:hover { border-color: var(--ink); color: var(--ink); } }
.masonry { flex: 0 0 100%; margin-top: 1.5rem; column-width: 16rem; column-gap: clamp(1rem, 2vw, 1.5rem); }
.item { break-inside: avoid; margin-bottom: clamp(1rem, 2vw, 1.5rem); }
.item figure { display: grid; gap: 0.6rem; }
.item a { display: block; overflow: hidden; background: var(--bg-2); }
.item img { display: block; width: 100%; height: auto; transition: transform 0.6s var(--ease-drawer); }
.item figcaption, .lightbox figcaption { color: var(--mute); font-size: 0.9375rem; }
.item small, .lightbox small { display: block; font-size: 0.8125rem; opacity: 0.8; }
@media (hover: hover) and (pointer: fine) { .item a:hover img { transform: scale(1.03); } }
#f-wash:checked ~ .masonry .item:not(.c-wash), #f-adv:checked ~ .masonry .item:not(.c-adv), #f-polo:checked ~ .masonry .item:not(.c-polo), #f-t7:checked ~ .masonry .item:not(.c-t7), #f-ev:checked ~ .masonry .item:not(.c-ev) { display: none; }
.lightbox { display: none; position: fixed; inset: 0; z-index: 150; background: rgba(10, 10, 11, 0.96); place-items: center; padding: 4rem 4.5rem 2rem; }
.lightbox:target { display: grid; }
.lightbox figure { display: grid; gap: 0.75rem; justify-items: center; max-width: 100%; max-height: 100%; min-height: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 11rem); width: auto; height: auto; object-fit: contain; }
.lb-close, .lb-nav { position: absolute; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; background: var(--bg); }
.lb-close { top: 1rem; right: var(--gutter); padding: 0.5rem 1rem; }
.lb-nav { top: 50%; width: 3rem; height: 3rem; transform: translateY(-50%); }
.lb-prev { left: 0.75rem; }
.lb-next { right: 0.75rem; }
@media (max-width: 640px) { .lightbox { padding: 4rem 1rem 5rem; } .lb-nav { top: auto; bottom: 1rem; transform: none; } .lb-prev { left: calc(50% - 3.5rem); } .lb-next { right: calc(50% - 3.5rem); } }
.gfilter, .masonry, .item { overflow-anchor: none; }
.lightbox { background: rgba(10, 10, 11, 0.98); }
.t7photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%; }
.t7site { display: grid; gap: 0.75rem; }
.t7site a { display: block; overflow: hidden; border: 1px solid var(--line-strong); transition: border-color 0.2s var(--ease-out); }
.t7site img { display: block; width: 100%; height: auto; }
.t7site figcaption { color: var(--mute); font-size: 0.9375rem; }
@media (hover: hover) and (pointer: fine) { .t7site a:hover { border-color: var(--violet-text); } }

#g-more { position: absolute; top: 0; left: 0; opacity: 0; width: 1px; height: 1px; margin: 0; }
.g-more-lab { display: none; }
.m-less { display: none; }
@media (max-width: 640px) {
  #f-all:checked ~ #g-more:not(:checked) ~ .masonry .item:nth-child(n+7) { display: none; }
  #f-all:checked ~ .g-more-lab { display: block; flex: 0 0 100%; text-align: center; padding: 0.75rem 1rem; margin-top: 0.5rem; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; }
  #g-more:checked ~ .g-more-lab .m-more { display: none; }
  #g-more:checked ~ .g-more-lab .m-less { display: inline; }
  #g-more:focus-visible ~ .g-more-lab { outline: 2px solid var(--violet-text); outline-offset: 3px; }
}

/* ---------- Menu: desktop inline, tablet and mobile animated overlay ---------- */
.burger, .menu-eyebrow, .menu-foot, .menu-anchor { display: none; }
@media (max-width: 1024px) {
  .menu-anchor { display: block; position: fixed; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
  .burger {
    display: grid; align-content: center; justify-items: center; gap: 0.3125rem;
    position: fixed; top: calc(var(--bar) + 0.75rem + env(safe-area-inset-top, 0px)); right: max(var(--gutter), env(safe-area-inset-right, 0px));
    width: 3rem; height: 3rem; border-radius: 999px; background: #0a0a0b; border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 18px rgba(10, 10, 11, 0.25); text-decoration: none;
  }
  .burger span { display: block; width: 1.25rem; height: 1.5px; background: #f4f4f5; border-radius: 2px; transition: transform 0.5s var(--ease-drawer), opacity 0.25s var(--ease-out), width 0.4s var(--ease-drawer); }
  .burger-open { z-index: 60; }
  .burger-open span:nth-child(2) { width: 0.875rem; justify-self: end; margin-right: 0.875rem; }
  @media (hover: hover) and (pointer: fine) { .burger-open:hover span:nth-child(2) { width: 1.25rem; margin-right: 0.875rem; } }
  .burger:focus-visible { outline: 2px solid var(--violet-text); outline-offset: 3px; }
  .header-inner nav { --bg: #0a0a0b; --bg-2: #17171a; --ink: #f4f4f5; --mute: #a1a1aa; --line: #2a2a30; --line-strong: #4a4a54; --violet: #7c3aed; --violet-text: #c4b5fd; display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 120; max-width: none; width: auto;
    padding: calc(var(--bar) + 1.25rem + env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) calc(1.5rem + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
    background: var(--bg); color: var(--ink); overflow-y: auto; visibility: hidden; clip-path: circle(0 at calc(100% - 3rem) 4.5rem);
    transition: clip-path 0.7s var(--ease-drawer), visibility 0s linear 0.7s; }
  .header-inner nav:target { visibility: visible; clip-path: circle(150% at calc(100% - 3rem) 4.5rem); transition: clip-path 0.7s var(--ease-drawer), visibility 0s; }
  .burger-close { z-index: 2; }
  .burger-close span { position: absolute; width: 1.25rem; left: calc(50% - 0.625rem); top: calc(50% - 0.75px); transform: scaleX(0) rotate(0deg); opacity: 0; }
  .burger-close span:nth-child(1) { transform: scaleX(0) rotate(0deg); }
  .burger-close span:nth-child(3) { display: none; }
  #menu:target .burger-close span:nth-child(1) { transform: scaleX(1) rotate(45deg); opacity: 1; transition-delay: 0.25s; }
  #menu:target .burger-close span:nth-child(2) { transform: scaleX(1) rotate(-45deg); opacity: 1; transition-delay: 0.32s; }
  .menu-eyebrow { display: block; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--violet-text); margin-bottom: 1rem; }
  .header-inner .nav { display: grid; overflow: visible; gap: 0; font-size: clamp(1.75rem, 5.5vw, 2.75rem); color: var(--ink); counter-reset: m; border-top: 1px solid var(--line); }
  .nav li { counter-increment: m; border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(1.25rem); transition: opacity 0.35s var(--ease-out), transform 0.6s var(--ease-drawer); }
  #menu:target .nav li { opacity: 1; transform: none; }
  #menu:target .nav li:nth-child(1) { transition-delay: 0.22s; } #menu:target .nav li:nth-child(2) { transition-delay: 0.27s; }
  #menu:target .nav li:nth-child(3) { transition-delay: 0.32s; } #menu:target .nav li:nth-child(4) { transition-delay: 0.37s; }
  #menu:target .nav li:nth-child(5) { transition-delay: 0.42s; } #menu:target .nav li:nth-child(6) { transition-delay: 0.47s; }
  #menu:target .nav li:nth-child(7) { transition-delay: 0.52s; } #menu:target .nav li:nth-child(8) { transition-delay: 0.57s; }
  #menu:target .nav li:nth-child(9) { transition-delay: 0.62s; }
  .nav a { display: flex; align-items: baseline; gap: 1rem; padding: 0.55em 0; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
  .nav a::before { content: counter(m, decimal-leading-zero); font-size: 0.8125rem; letter-spacing: 0.08em; color: var(--mute); min-width: 1.75rem; }
  .nav a:hover { color: var(--violet-text); }
  .menu-foot { display: block; margin-top: auto; padding-top: 2rem; color: var(--mute); font-size: 0.9375rem; }
}
@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
  .header-inner nav, .nav li, .burger span { transition: none !important; }
}

/* Detail pages */
.rows .det { display: grid; gap: 0.6rem; align-content: start; color: var(--mute); text-wrap: pretty; }
.rows .pts { display: grid; gap: 0.5rem; }
.rows .pts li { display: block; position: relative; padding: 0 0 0 1.1rem; border: 0; }
.rows .pts li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 0.5rem; height: 1px; background: var(--violet-text); transform: none; transition: none; }
@media (max-width: 860px) { .rows li .det { grid-column: 2; } }
@media (max-width: 640px) { .rows li .det { grid-column: auto; } }

.prose { display: grid; gap: 1.25rem; max-width: 44rem; font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--mute); text-wrap: pretty; }
.prose p:first-child { color: var(--ink); }
.prose .facts { margin-top: 1rem; font-size: 1rem; }

/* Social links */
.social { display: flex; align-items: center; justify-content: flex-end; gap: 0.25rem; list-style: none; }
.status .social { margin-right: -0.5rem; }
.status .social a { display: grid; place-items: center; width: 2.25rem; height: var(--bar); color: var(--mute); transition: color 0.2s var(--ease-out); }
.status .social a:focus-visible { outline: 2px solid var(--violet-text); outline-offset: -4px; }
@media (hover: hover) and (pointer: fine) { .status .social a:hover { color: #f4f4f5; } }
.social-list { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; list-style: none; }
.social-list a { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.55rem 1.1rem; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out); }
.social-list a:focus-visible { outline: 2px solid var(--violet-text); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .social-list a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); } }
