/* angelmiranda.dev: paper, ink, one accent. The only bold thing is the opening scene. */
:root {
  --paper: #fafaf5;
  --ink: #1c1e26;
  --muted: #5c5f6b;
  --rule: #e2e4dc;
  --accent: #c93f74;
  --band: #eaf2e6;
  --text: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap { width: min(1100px, 100% - 32px); margin: 0 auto; }
.col { width: min(680px, 100%); }

.bar { display: flex; align-items: baseline; justify-content: space-between; padding: 22px 0 18px; }
.bar .home { font-weight: 600; text-decoration: none; }
.lang { font: inherit; font-size: 16px; color: var(--muted); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.lang:hover { color: var(--accent); }
.lang:active { transform: scale(.97); }

/* the opening scene */
.scene { position: relative; aspect-ratio: 3 / 2; margin: 0; overflow: hidden; background: var(--paper); }
.js .scene:not(.ready) img { opacity: 0; }
.scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .skip { position: absolute; right: 10px; bottom: 8px; font-size: 14px; color: var(--muted); }
.scene:not(.playing) .skip { display: none; }

.intro { padding: 36px 0 8px; }
.intro h1 { margin: 0; font-size: clamp(34px, 4.6vw, 48px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
.intro p { margin: 10px 0 0; font-size: clamp(19px, 2vw, 22px); color: var(--muted); max-width: 36ch; text-wrap: pretty; }

section { padding-top: 64px; }
h2 { font-size: 24px; line-height: 1.2; margin: 0 0 20px; font-weight: 700; letter-spacing: -.01em; }

.work { list-style: none; margin: 0; padding: 0; }
.work li { display: grid; grid-template-columns: 112px 1fr; gap: 22px; align-items: start; padding: 20px 0; border-top: 1px solid var(--rule); }
.work li:last-child { border-bottom: 1px solid var(--rule); }
.work img { width: 112px; height: 112px; object-fit: cover; mix-blend-mode: multiply; }
.work h3 { margin: 0 0 4px; font-size: 20px; line-height: 1.3; font-weight: 600; }
.work p { margin: 0 0 8px; color: var(--muted); max-width: 56ch; }
.links { display: flex; flex-wrap: wrap; gap: 18px; }

.reads { list-style: none; margin: 0; padding: 0; }
.reads li { padding: 14px 0; border-top: 1px solid var(--rule); }
.reads li:last-child { border-bottom: 1px solid var(--rule); }
.reads a { font-weight: 600; font-size: 20px; }
.reads span { display: block; color: var(--muted); }

.about p { margin: 0 0 14px; max-width: 60ch; }

footer { padding: 72px 0 40px; color: var(--muted); font-size: 15px; display: flex; gap: 20px; }

/* reading pages */
.page { padding: 36px 0 24px; }
.page h1 { font-size: clamp(32px, 4.8vw, 46px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 700; text-wrap: balance; }
.page .meta { color: var(--muted); font-size: 16px; margin: 0 0 36px; }
.prose { font-size: 20px; line-height: 1.7; }
.prose p { margin: 0 0 1.05em; text-wrap: pretty; }
.prose h2 { font-size: 24px; margin: 1.8em 0 .5em; }
.prose code { font: .85em var(--mono); background: var(--band); padding: 1px 5px; border-radius: 3px; }
.prose figure { margin: 2em 0; }
.prose figure img { width: 100%; border-radius: 4px; outline: 1px solid rgba(0,0,0,.1); outline-offset: -1px; }
.prose figcaption { font-size: 15px; color: var(--muted); margin-top: 6px; }

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

@media (max-width: 640px) {
  body { font-size: 17px; }
  .work li { grid-template-columns: 76px 1fr; gap: 16px; }
  .work img { width: 76px; height: 76px; }
  .prose { font-size: 19px; }
}
