/* Fonts are served from this site (SIL Open Font License 1.1, see assets/fonts/LICENSE.txt), so no visitor request goes to a third party. Latin subset only. */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/jetbrains-mono-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Klee One'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/klee-one-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Klee One'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/klee-one-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Zen Kaku Gothic New'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/zen-kaku-gothic-new-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Zen Kaku Gothic New'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/zen-kaku-gothic-new-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Zen Kaku Gothic New'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/zen-kaku-gothic-new-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Zen Old Mincho'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/zen-old-mincho-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Zen Old Mincho'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/zen-old-mincho-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Zen Old Mincho'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/zen-old-mincho-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* angelmiranda.dev — Artbook Default Edition. 100% CSP-safe. */
@view-transition { navigation: auto; }
:root {
  --paper: #faf7f0;
  --ink: #2b2833;
  --muted: #645e6e;
  --rule: rgba(43, 40, 51, .14);
  --accent: #4257a3;
  --warm: #c96f32;
  --band: #efeaf3;
  --title: "Zen Old Mincho", "Hiragino Mincho ProN", Georgia, serif;
  --text: "Zen Kaku Gothic New", system-ui, sans-serif;
  --hand: "Klee One", "Zen Kaku Gothic New", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--paper) url(../art/paper.webp) 0 0 / 1200px repeat; overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 17px/1.8 var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: color .15s, text-decoration-color .15s; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--title); font-weight: 600; letter-spacing: .01em; text-wrap: balance; }

.wrap { width: min(1160px, 100% - 32px); margin: 0 auto; position: relative; }
.col { width: min(720px, 100%); }
.hand { font-family: var(--hand); }

/* Watercolor accents: quiet background, never blocking text */
.deco { position: absolute; pointer-events: none; user-select: none; z-index: -1; height: auto; mix-blend-mode: multiply; }
.d-branch { top: 56px; right: -80px; width: min(240px, 20vw); opacity: .5; }
.d-peach { left: -70px; top: -20px; width: min(500px, 58vw); opacity: .34; }
.d-blue { right: -110px; top: 40px; width: min(460px, 42vw); opacity: .28; }
.d-leaves { left: -80px; top: 32px; width: min(320px, 28vw); opacity: .42; }
.hero, section { position: relative; }

/* Navigation: stays usable on mobile too (no hidden links, >=44px touch targets) */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 20px 0 14px; border-bottom: 1px solid var(--rule); }
.bar .home { font: 600 21px/1.2 var(--title); text-decoration: none; letter-spacing: .02em; padding: 6px 0; }
.bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.bar nav a, .lang {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--muted); font-size: 15px; text-decoration: none;
}
.bar nav a:hover, .lang:hover { color: var(--accent); }
.lang { font-family: inherit; background: none; border: 0; padding: 0 2px; cursor: pointer; font-weight: 500; }
.lang:active { transform: scale(.97); }

/* Default-first Hero: identity + CTA immediately visible alongside the watercolor desk */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: 36px 0 12px;
}
.eyebrow {
  margin: 0 0 10px;
  font: 500 12.5px/1.4 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--warm);
}
.hero h1 { margin: 0; font-size: clamp(44px, 6.2vw, 78px); line-height: 1.02; font-weight: 600; }
.hero .tagline { margin: 16px 0 0; font: 400 clamp(18px, 1.9vw, 22px)/1.55 var(--title); color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin: 24px 0 22px; }
.hero .tally {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0; padding-top: 16px; border-top: 1px solid var(--rule);
  font: 400 15px/1.5 var(--hand); color: var(--muted);
}
.hero .tally b { font: 600 clamp(30px, 3.2vw, 42px)/1 var(--title); color: var(--ink); font-variant-numeric: tabular-nums; }

.scene { position: relative; aspect-ratio: 3 / 2; margin: 0; overflow: hidden; }
.scene img { display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }

/* Buttons: paper-native primary ink pill + quiet text links */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  background: var(--ink); color: var(--paper);
  font: 500 15px/1 var(--text); text-decoration: none;
  border-radius: 999px;
  transition: background-color .15s, transform .12s;
}
.btn-primary:hover { background: var(--accent); color: var(--paper); }
.btn-primary:active { transform: scale(.98); }
.btn-quiet {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 500; font-size: 15.5px; color: var(--ink);
}

section { padding-top: 88px; }
h2 { font-size: clamp(32px, 3.8vw, 44px); line-height: 1.15; margin: 0 0 8px; }
.lede { margin: 0 0 42px; color: var(--muted); font: 400 16px/1.6 var(--hand); max-width: 58ch; }

/* Projects: one plate per project, one obvious CTA */
.plate { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4.5vw, 64px); align-items: center; margin: 0 0 92px; }
.plate.flip { grid-template-columns: 1fr 1.15fr; }
.plate.flip .art { order: 2; }
.art { position: relative; margin: 0; }
.art > img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; filter: saturate(.88); }
.art > canvas.agencia-hero { display: block; width: 100%; height: auto; aspect-ratio: 900 / 500; mix-blend-mode: multiply; }
.art.capture > img { mix-blend-mode: normal; filter: none; background: #fff; padding: 7px; transform: rotate(-.6deg); box-shadow: 0 14px 30px -14px rgba(43,40,51,.42), 0 1px 2px rgba(43,40,51,.12); }
.art .real { position: absolute; width: 38%; right: -2%; bottom: -8%; margin: 0; background: #fff; padding: 6px 6px 4px; transform: rotate(2deg); box-shadow: 0 10px 26px -12px rgba(43,40,51,.42), 0 1px 2px rgba(43,40,51,.12); }
.plate.flip .art .real { right: auto; left: -2%; transform: rotate(-2deg); }
.art .real img { display: block; width: 100%; height: auto; }
.art .real figcaption { font: 12.5px/1.4 var(--hand); color: var(--muted); padding: 4px 2px 0; }

mark { color: inherit; background: linear-gradient(100deg, transparent 0 .2em, rgba(217,135,78,.24) .35em, rgba(217,135,78,.17) 70%, rgba(217,135,78,.26) calc(100% - .3em), transparent 100%) 0 86% / 100% .55em no-repeat; padding: 0 .12em; margin: 0 -.06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.count b, .tally b { background: linear-gradient(176deg, transparent 0 62%, rgba(66,87,163,.16) 63% 84%, transparent 86%) no-repeat; padding: 0 .1em; }

.words .when { margin: 0 0 6px; font: 500 13.5px/1.4 var(--mono); color: var(--warm); }
.words h3 { margin: 0 0 12px; font-size: clamp(28px, 3vw, 36px); line-height: 1.18; }
.words .count { margin: 0 0 14px; font: 400 15px/1.4 var(--hand); color: var(--muted); }
.words .count b { font-weight: 600; font-size: 30px; line-height: 1; font-family: var(--title); color: var(--ink); margin-right: 8px; }
.words p { margin: 0 0 18px; max-width: 46ch; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.links a:not(.btn-primary) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; font-size: 15px; }
.more { text-align: center; margin: -12px 0 0; font: 400 17.5px/1.6 var(--hand); }

.nap { margin: 32px 0 -32px; }
.nap img { display: block; width: min(380px, 68%); height: auto; margin: 0 auto; mix-blend-mode: multiply; }

/* Two-tier Writing section */
.split { display: grid; grid-template-columns: 1fr 1.65fr; gap: clamp(24px, 4.5vw, 64px); align-items: start; }
.tier-label { margin: 0 0 12px; font: 500 12.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.reads { list-style: none; margin: 0; padding: 0; }
.reads li { padding: 18px 0; border-top: 1px solid var(--rule); }
.reads li:last-child { border-bottom: 1px solid var(--rule); }
.reads a { font: 600 22px/1.38 var(--title); text-decoration: none; }
.reads a:hover { text-decoration: underline; }
.reads span { display: block; color: var(--muted); margin-top: 4px; font-size: 15.5px; line-height: 1.6; }
.reads .when { display: block; font: 13.5px/1.4 var(--hand); color: var(--warm); margin: 0 0 2px; }

/* Native HTML progressive disclosure for forensic logs */
.logs-drawer { margin-top: 28px; }
.logs-drawer summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  cursor: pointer; list-style: none;
  font: 500 14px/1.4 var(--mono); color: var(--accent);
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
}
.logs-drawer summary::-webkit-details-marker { display: none; }
.logs-drawer summary::before { content: "+"; font-weight: 700; width: 1ch; }
.logs-drawer[open] summary::before { content: "−"; }
.logs-drawer .reads { margin-top: 14px; }
.archive-link { margin: 18px 0 0; font: 500 15px/1.4 var(--hand); }

/* About */
.about p { margin: 0 0 14px; max-width: 58ch; }
.about strong { display: block; font: 600 clamp(22px, 2.3vw, 27px)/1.38 var(--title); margin: 0 0 16px; }
.crew { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 10px; margin: 0; padding: 0; position: sticky; top: 24px; }
.crew figure { margin: 0; text-align: center; }
.crew img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); }
.crew figcaption { font: 13px/1.3 var(--hand); color: var(--muted); margin-top: -4px; }
.peek { display: block; width: 140px; height: auto; margin: 0 0 -6px 32px; mix-blend-mode: multiply; }

footer { padding: 72px 0 40px; color: var(--muted); font-size: 15px; display: flex; flex-wrap: wrap; gap: 18px 24px; align-items: end; border-top: 1px solid var(--rule); margin-top: 72px; }
footer a { display: inline-flex; align-items: center; min-height: 44px; }
footer .walk { width: 110px; height: auto; margin-left: auto; mix-blend-mode: multiply; }

/* Gallery (preserved for site/gallery/) */
.topic { padding-top: 80px; }
.topic > p { color: var(--muted); max-width: 60ch; margin: 0 0 26px; }
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px 26px; }
.shots figure { margin: 0; }
.shots .wide { grid-column: 1 / -1; }
.shots button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shots img { display: block; width: 100%; height: auto; }
.shots .shot button { background: #fff; padding: 6px; box-shadow: 0 10px 26px -14px rgba(43,40,51,.45), 0 1px 2px rgba(43,40,51,.12); }
.shots .paint img { mix-blend-mode: multiply; }
.shots figcaption { font: 14.5px/1.5 var(--hand); color: var(--muted); margin-top: 8px; }
.code { display: grid; grid-template-columns: 1.05fr 1fr; font: 12px/1.6 var(--mono); background: #fff; box-shadow: 0 10px 26px -14px rgba(43,40,51,.45), 0 1px 2px rgba(43,40,51,.12); }
.code pre { margin: 0; padding: 14px 16px; overflow: auto; max-height: 470px; }
.code pre + pre { border-left: 1px solid var(--rule); }
.code .hl { background: color-mix(in srgb, var(--accent) 14%, transparent); display: inline-block; width: 100%; }
dialog.view { border: 0; padding: 0; background: none; max-width: 94vw; max-height: 92vh; }
dialog.view::backdrop { background: rgba(250,247,240,.95); }
dialog.view img { display: block; max-width: 94vw; max-height: 92vh; }

/* Reading & Archive pages (preserved for site/essay/, site/updates/*) */
.page { padding: 36px 0 24px; }
.page h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.15; margin: 0 0 10px; }
.page .meta { color: var(--warm); font: 16px/1.6 var(--hand); margin: 0 0 36px; max-width: 56ch; }
.archive-group { margin: 0 0 44px; }
.prose { font-size: 18.5px; line-height: 1.9; }
.prose p { margin: 0 0 1.05em; text-wrap: pretty; }
.prose h2 { font-size: 30px; margin: 1.7em 0 .4em; }
.prose code { font: .85em var(--mono); background: var(--band); padding: 1px 5px; border-radius: 3px; }
.prose figure { margin: 2.2em 0; }
.prose figure img { width: 100%; background: #fff; padding: 6px; box-shadow: 0 10px 26px -14px rgba(43,40,51,.45), 0 1px 2px rgba(43,40,51,.12); }
.prose figcaption { font: 15px var(--hand); color: var(--muted); margin-top: 8px; }

[data-lang-only] { display: none; }
html[lang="en"] [data-lang-only="en"], html[lang="es"] [data-lang-only="es"] { display: block; }

@media (max-width: 900px) {
  .hero, .plate, .plate.flip, .split { grid-template-columns: 1fr; }
  .plate.flip .art { order: 0; }
  .hero { padding-top: 24px; }
  .hero .scene { order: -1; }
  .crew { position: static; }
  .art .real { width: 42%; right: 0; bottom: -6%; }
  .plate.flip .art .real { left: 0; }
}
@media (max-width: 640px) {
  html { background-size: 800px; }
  body { font-size: 16.5px; }
  section { padding-top: 68px; }
  .plate { margin-bottom: 72px; }
  .deco.hide-s { display: none; }
  .hero .tally { flex-direction: column; gap: 4px; }
  .crew { grid-template-columns: repeat(3, 1fr); }
  .shots { grid-template-columns: 1fr; }
  .code { grid-template-columns: minmax(0, 1fr); }
  .code pre + pre { border-left: 0; border-top: 1px solid var(--rule); }
  .prose { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a, .lang:active, .btn-primary { transition: none; transform: none; }
}
