/* ---------------------------------------------------------------
   celestebetancur.com — v2
   One typeface family (Atkinson Hyperlegible Next + Mono), one accent,
   hairline rules instead of boxes. Everything sized for reading.
---------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Mono:wght@400;500&family=Atkinson+Hyperlegible+Next:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --paper: #f3f0e8;
  --paper-2: #e9e5da;
  --ink: #17161a;
  --ink-2: #4b4953;
  --rule: #d6d0c2;
  --accent: #006b6d;

  --sans: 'Atkinson Hyperlegible Next', 'Atkinson Hyperlegible', system-ui, sans-serif;
  --mono: 'Atkinson Hyperlegible Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --wrap: 72rem;
  --measure: 38rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141416;
    --paper-2: #1c1c1f;
    --ink: #ece9e1;
    --ink-2: #a9a69e;
    --rule: #333238;
    --accent: #5fc4c2;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.meta, .label { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-2); letter-spacing: 0.01em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 99; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.25rem 2rem;
  padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.name { font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 1rem; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 0.35em; }

/* ---------- background attractor (all pages) ---------- */
#attractor { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; transition: opacity .2s linear; }
html.orbiting, html.orbiting * { cursor: grabbing !important; user-select: none; }
body { background: transparent; }
html { background: var(--paper); }

/* ---------- home hero ---------- */
.hero { min-height: min(82vh, 48rem); display: flex; align-items: flex-end; }
.hero .wrap {
  width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 2.5rem; align-items: end;
  padding-top: 7rem; padding-bottom: 3rem;
}
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.25rem); letter-spacing: -0.03em; }
.hero .roles { font-family: var(--mono); color: var(--ink-2); font-size: 0.95rem; margin: 0.75rem 0 1.5rem; }
.hero .bio { max-width: 34rem; font-size: 1.2rem; }
/* paper-coloured halo so hero text stays crisp over the trails */
.hero h1, .hero .roles, .hero .bio { text-shadow: 0 0 6px var(--paper), 0 0 14px var(--paper); }
.hero .portrait { width: 15rem; aspect-ratio: 1; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.hero .portrait-caption { margin-top: 0.5rem; }
.hero .next-shape {
  font: inherit; font-family: var(--mono); font-size: 0.8rem;
  background: var(--paper); border: 1px solid var(--rule); color: var(--ink-2);
  padding: 0.3rem 0.6rem; margin-top: 1.25rem; cursor: pointer;
}
.hero .next-shape:hover { color: var(--ink); border-color: var(--ink-2); }

/* ---------- page heading (inner pages) ---------- */
.page-head { padding: clamp(2.5rem, 7vw, 5rem) 0 2rem; border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.025em; }
.page-head .lede { max-width: var(--measure); font-size: 1.25rem; color: var(--ink-2); margin: 1rem 0 0; }
.page-head .jump { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.page-head .jump a { font-family: var(--mono); font-size: 0.9rem; }

/* ---------- sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4rem) 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: 0; }
.section-head { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 1rem 2rem; margin-bottom: 2rem; align-items: baseline; }
.section-head h2 { font-size: 1.75rem; }
.section-head .label { padding-top: 0.35rem; }
.section-head p { grid-column: 2; max-width: var(--measure); color: var(--ink-2); margin: 0; }
.indent { margin-left: 14rem; }

/* ---------- index rows (home areas, projects) ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rows > li {
  display: grid; grid-template-columns: 12rem minmax(0, 1fr) auto; gap: 0.25rem 2rem;
  padding: 1.25rem 0; border-bottom: 1px solid var(--rule); align-items: baseline;
}
.rows h3 { font-size: 1.3rem; }
.rows h3 a { color: var(--ink); text-decoration: none; }
.rows h3 a:hover { color: var(--accent); text-decoration: underline; }
.rows p { margin: 0.25rem 0 0; color: var(--ink-2); max-width: var(--measure); }
.rows .go { font-family: var(--mono); font-size: 0.9rem; white-space: nowrap; }

/* ---------- log: dated list (performances, works) ---------- */
.year { font-family: var(--mono); font-size: 0.9rem; color: var(--ink-2); margin: 2.25rem 0 0.5rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--ink); }
.year:first-child { margin-top: 0; }
.log { list-style: none; margin: 0; padding: 0; }
.log li {
  display: grid; grid-template-columns: 5.5rem minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.15rem 1.5rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rule);
  font-size: 1rem; line-height: 1.45;
}
.log .d { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-2); padding-top: 0.1rem; }
.log .t { font-weight: 600; }
.log .w { color: var(--ink-2); }
.log .p { font-style: italic; }
.log .links { font-family: var(--mono); font-size: 0.85rem; }
.log .links a + a::before { content: " · "; color: var(--ink-2); }
.log.works li { grid-template-columns: 4rem minmax(0, 1.4fr) minmax(0, 1.2fr) 9rem; }
.log.tracks li { grid-template-columns: minmax(0, 1fr) 4.5rem 14rem; }

/* ---------- releases ---------- */
.releases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.release img { aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--paper-2); }
.release h3 { font-size: 1.2rem; margin-top: 0.9rem; }
.release .meta { margin: 0.2rem 0 0.5rem; }
.release .links { font-family: var(--mono); font-size: 0.9rem; }

/* ---------- media grid (videos, photos) ---------- */
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 2rem 1.5rem; }
.media.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
figure { margin: 0; }
figcaption { font-size: 0.95rem; color: var(--ink-2); margin-top: 0.5rem; line-height: 1.4; }
figure img { width: 100%; background: var(--paper-2); }
.ph-43 img { aspect-ratio: 4 / 3; object-fit: cover; }

/* lightweight YouTube: thumbnail + link until clicked */
.yt { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; transition: opacity .2s; }
.yt:hover img { opacity: 1; }
.yt::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 4rem; height: 4rem; margin: -2rem 0 0 -2rem;
  border-radius: 50%; background: rgba(15,16,18,.75)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center / 60% no-repeat;
}
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt.playing::after { display: none; }
.ext-video { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--paper-2); color: var(--ink); text-decoration: none; font-family: var(--mono); font-size: 0.9rem; border: 1px solid var(--rule); }
.ext-video:hover { color: var(--accent); }

/* ---------- project blocks ---------- */
.project { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 1rem 2rem; padding: 2.5rem 0; border-bottom: 1px solid var(--rule); }
.project:first-of-type { padding-top: 0; }
.project > header .label { display: block; margin-top: 0.4rem; }
.project h2 { font-size: 1.6rem; }
.project .body > p { max-width: var(--measure); }
.project .links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0 0 1.5rem; font-family: var(--mono); font-size: 0.9rem; }

/* ---------- prose list (groups) ---------- */
.kv { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 0 2rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 2.5rem 0 3rem; margin-top: 2rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--ink); }
.site-footer .meta { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 8rem; }
  .hero figure { order: -1; }
  .hero .portrait { width: 6.5rem; }
  .hero .portrait-caption { display: none; }
  .section-head, .project, .kv { grid-template-columns: 1fr; gap: 0.5rem; }
  .section-head p { grid-column: 1; }
  .indent { margin-left: 0; }
  .rows > li { grid-template-columns: 1fr; gap: 0.15rem; }
  .rows .go { margin-top: 0.4rem; }
  .releases { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .log li, .log.works li, .log.tracks li { grid-template-columns: 4.75rem minmax(0, 1fr); }
  .log li > :nth-child(n+3) { grid-column: 2; }
  .log.tracks li { grid-template-columns: minmax(0, 1fr) auto; }
  .log.tracks li > :nth-child(3) { grid-column: 1 / -1; }
  .media.two { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  body { font-size: 1.0625rem; }
  .releases { grid-template-columns: 1fr; }
  .site-nav ul { gap: 0.15rem 1rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media print {
    .site-header, #attractor, .yt::after { display: none; }
  .hero { min-height: 0; }
  body { background: #fff; color: #000; }
}
