/* Matías Ibar — capítulos, formas rectas, tema claro por defecto */
:root, [data-theme="light"] {
  --bg: #f6f3ee; --fg: #1c1815; --muted: #655c54; --line: #d9d0c4;
  --accent: #e45a0b; --accent-ink: #fff7ee; --panel: #efe9e0;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #131110; --fg: #ece7e1; --muted: #a0968c; --line: #2c2723;
  --accent: #f26a1b; --accent-ink: #1a0d05; --panel: #1a1714;
  color-scheme: dark;
}
:root {
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --orange: #f26a1b;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 64px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; transition: background-color .2s ease, color .2s ease; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(100% - 48px, 1120px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--fg); color: var(--bg); padding: 10px 16px; }
.skip:focus { top: 12px; }
.accent { color: var(--accent); }

/* barra mínima */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top__row { display: flex; justify-content: space-between; align-items: center; min-height: 56px; }
.top__brand { font: 500 14px/1 var(--mono); text-decoration: none; }
.theme { width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; color: var(--fg); cursor: pointer; font-size: 16px; line-height: 1; border-radius: 2px; }
.theme:hover { border-color: var(--accent); }
.top__tools { display: flex; align-items: center; gap: 8px; }
.lang { display: inline-grid; place-items: center; height: 34px; min-width: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 2px; color: var(--fg); text-decoration: none; font: 500 13px/1 var(--mono); letter-spacing: .04em; }
.lang:hover { border-color: var(--accent); }

/* puntos de navegación (derecha) */
.dots { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 15; display: flex; flex-direction: column; gap: 4px; }
.dots__a { display: grid; place-items: center; width: 24px; height: 24px; text-decoration: none; }
.dots__a i { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--line); border: 1px solid var(--muted); transition: transform .2s ease, background-color .2s ease, border-color .2s ease; }
.dots__a:hover i { border-color: var(--accent); }
.dots__a.is-on i { background: var(--accent); border-color: var(--accent); transform: scale(1.5); }

/* portada */
.hero { padding: 80px 0 80px; }
.hero__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 72px; align-items: center; }
.hero h1 { font: 600 clamp(54px, 8.6vw, 112px)/.94 var(--sans); letter-spacing: -0.05em; }
.hero__role { font: 500 clamp(20px, 2.3vw, 27px)/1.3 var(--sans); letter-spacing: -0.015em; margin: 28px 0 14px; }
.hero__lead { max-width: 34em; color: var(--muted); font-size: 18px; margin-bottom: 26px; }
.hero__links { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.link { font-size: 15px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 5px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-color: var(--accent); }

.photo { position: relative; width: min(100%, 360px); margin-inline: auto; padding: 0; }
.photo__frame { position: relative; aspect-ratio: 4 / 5; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; }
/* marcas de esquina: dos ángulos finos en naranja, en esquinas opuestas */
.photo__frame::before, .photo__frame::after { content: ""; position: absolute; width: 28px; height: 28px; border: 1.5px solid var(--accent); pointer-events: none; z-index: 2; }
.photo__frame::before { top: -9px; left: -9px; border-right: 0; border-bottom: 0; }
.photo__frame::after { bottom: -9px; right: -9px; border-left: 0; border-top: 0; }
.photo__mono { font: 600 88px/1 var(--sans); letter-spacing: -0.06em; color: var(--accent); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.photo figcaption { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: right; }

/* capítulos */
.chapter { padding-block: 72px; border-top: 1px solid var(--line); scroll-margin-top: 56px; }
.chapter__head { margin-bottom: 36px; }
.chapter__tag { display: flex; gap: 12px; align-items: center; color: var(--fg); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin-bottom: 14px; }
.chapter__tag::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none; }
.chapter__tag span { color: var(--muted); }
.chapter h2, .band h2 { font: 600 clamp(34px, 4.6vw, 58px)/1 var(--sans); letter-spacing: -0.045em; }

.entries { max-width: 860px; }
.duo > .chapter .entries { max-width: none; }
.entry { display: grid; grid-template-columns: 112px 1fr; gap: 6px 20px; padding-block: 15px; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; padding-top: 0; }
.entry__dates { color: var(--muted); padding-top: 4px; }
.entry h3 { font: 500 17px/1.35 var(--sans); letter-spacing: -0.01em; }
.entry h3 span { color: var(--muted); font-weight: 400; }
.entry p:not(.entry__dates) { color: var(--muted); font-size: 16px; margin-top: 4px; max-width: 38em; }
.entry--now h3 { font-size: 19px; }

.duo { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0 72px; align-items: start; }
.entries--plain .entry { grid-template-columns: 76px 1fr; }

/* fuera de la oficina: sección propia con banda de fondo */
.band { background: var(--panel); border-block: 1px solid var(--line); padding-block: 88px; }
.band__lead { margin-top: 14px; color: var(--muted); font-size: 19px; }
.music { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: stretch; }
.podcast { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 36px; background: var(--orange); color: #1a0d05; text-decoration: none; border-radius: 2px; transition: transform .18s ease, box-shadow .18s ease; overflow: hidden; }
.podcast:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--fg); }
.podcast__tag { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.podcast strong { font: 600 clamp(28px, 3.2vw, 42px)/1.05 var(--sans); letter-spacing: -0.04em; max-width: 11em; }
.podcast__text { font-size: 17px; line-height: 1.55; max-width: 30em; }
.podcast__cta { margin-top: 8px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.eq { position: absolute; right: 30px; top: 30px; display: flex; align-items: flex-end; gap: 5px; height: 40px; }
.eq i { display: block; width: 6px; height: 100%; background: #1a0d05; transform-origin: bottom; animation: eq 1.1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.2s; } .eq i:nth-child(5) { animation-delay: -.8s; }
@keyframes eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.music__list { display: flex; flex-direction: column; justify-content: center; }
.music__list li { display: grid; grid-template-columns: 84px 1fr; gap: 2px 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.music__list li:last-child { border-bottom: 1px solid var(--line); }
.music__list .mono { color: var(--muted); padding-top: 4px; grid-row: span 2; }
.music__list strong { font: 500 19px/1.3 var(--sans); letter-spacing: -0.015em; grid-column: 2; }
.music__list em { grid-column: 2; font-style: normal; color: var(--muted); font-size: 16px; }

.contact__text { color: var(--muted); font-size: 18px; max-width: 30em; margin-bottom: 14px; }
.contact__mail { font: 500 clamp(24px, 3.6vw, 42px)/1.15 var(--sans); letter-spacing: -0.035em; margin-bottom: 20px; word-break: break-word; }
.contact__mail a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }

.foot { border-top: 1px solid var(--line); color: var(--muted); }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-block: 22px; }

/* responsive */
@media (max-width: 1100px) { .dots { display: none; } }
@media (max-width: 960px) {
  .hero { padding: 48px 0 48px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .photo { width: min(100%, 280px); margin-inline: 0; order: -1; }
  .duo { grid-template-columns: 1fr; }
  .music { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 32px 0 40px; }
  .hero__grid { gap: 28px; }
  .photo { width: 170px; }
  .photo__frame::before, .photo__frame::after { width: 18px; height: 18px; }
  .photo__frame::before { top: -6px; left: -6px; }
  .photo__frame::after { bottom: -6px; right: -6px; }
  .photo__mono { font-size: 56px; }
  .chapter, .duo .chapter { padding-block: 52px; }
  .chapter__head { margin-bottom: 26px; }
  .band { padding-block: 56px; }
  .podcast { padding: 26px; }
  .eq { top: 24px; right: 22px; height: 26px; }
  .music { gap: 28px; }
  .music__list li { grid-template-columns: 1fr; gap: 4px; }
  .music__list .mono, .music__list strong, .music__list em { grid-column: 1; grid-row: auto; padding-top: 0; }
  .entry, .entries--plain .entry { grid-template-columns: 1fr; gap: 2px; }
  html { scroll-padding-top: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .eq i { transform: scaleY(.6); }
}
