/* Lá · la.rogerle.com · V1.3.4
   Dark-first. Every colour is a variable; light theme only swaps the tokens. */

:root {
  --bg: #12100e;
  --bg-elev: #1a1714;
  --bg-card: #1f1b17;
  --line: #2e2823;
  --text: #ece5db;
  --text-soft: #b6aca0;
  --muted: #7f776d;
  --accent: #e8a24a;
  --accent-ink: #12100e;
  --link: #f0b563;
  --code-bg: #0c0b0a;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 14px;
  --wrap: 760px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f7f3ec;
  --bg-elev: #fffdf9;
  --bg-card: #fffdf9;
  --line: #e4dccf;
  --text: #221d18;
  --text-soft: #4d453c;
  --muted: #857b6f;
  --accent: #b8651a;
  --accent-ink: #fffdf9;
  --link: #a1560f;
  --code-bg: #f0ebe2;
  --shadow: 0 10px 30px rgba(60, 40, 10, .10);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.65;
  transition: background-color .25s ease, color .25s ease;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; color: var(--text); }
.brand-mark { font-family: var(--serif); font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--accent); }
.brand-sub { font-family: var(--sans); font-size: .8rem; color: var(--muted); letter-spacing: .04em; }
.site-nav { display: flex; align-items: center; gap: .2rem; font-family: var(--sans); font-size: .95rem; }
.site-nav a { color: var(--text-soft); text-decoration: none; padding: .45rem .7rem; border-radius: 8px; }
.site-nav a:hover { color: var(--text); background: var(--bg-card); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.theme-toggle { margin-left: .3rem; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg-card); color: var(--text-soft); border-radius: 10px; cursor: pointer; transition: transform .2s ease, color .2s ease; }
.theme-toggle:hover { color: var(--accent); transform: rotate(15deg); }
[data-theme="dark"] .ico-sun { display: block; }
[data-theme="dark"] .ico-moon { display: none; }
[data-theme="light"] .ico-sun { display: none; }
[data-theme="light"] .ico-moon { display: block; }

/* Main */
main { padding: 2.5rem 1.25rem 4rem; animation: rise .5s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { main { animation: none; } .theme-toggle { transition: none; } }

.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 1rem; text-wrap: balance; }
.lede { font-size: 1.2rem; color: var(--text-soft); }
.hero .lede p { margin: 0 0 .8rem; }
.page-head h1, .post-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .6rem; text-wrap: balance; }
.page-head .lede, .post-head .lede { margin-top: 0; }
.eyebrow { font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 .6rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.post-meta { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin: .5rem 0 0; }
.post-head { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }

.section { margin-top: 3rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { margin: 0; font-size: 1.4rem; }
.section-head a { font-family: var(--sans); font-size: .9rem; }

/* Cards */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.card-link { display: block; padding: 1.2rem 1.3rem; color: inherit; text-decoration: none; height: 100%; }
.card h3 { margin: 0 0 .5rem; font-size: 1.25rem; line-height: 1.25; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--text-soft); font-size: 1rem; }
.card-meta { display: flex; gap: .8rem; margin-top: .9rem; font-family: var(--sans); font-size: .8rem; color: var(--muted); }

/* Prose */
.prose { font-size: 1.1rem; }
.prose h2 { font-size: 1.55rem; margin: 2.2rem 0 .8rem; letter-spacing: -.01em; line-height: 1.2; }
.prose h3 { font-size: 1.2rem; margin: 1.8rem 0 .6rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose li { margin: .3rem 0; }
.prose blockquote { margin: 1.4rem 0; padding: .2rem 0 .2rem 1.2rem; border-left: 3px solid var(--accent); color: var(--text-soft); font-style: italic; }
.prose blockquote p { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2rem 0; }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px; padding: .1em .4em; }
.prose pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; overflow-x: auto; margin: 1.3rem 0; }
.prose pre code { background: none; border: 0; padding: 0; font-size: .92rem; line-height: 1.55; }
.prose strong { color: var(--text); }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 1.6rem 0 2.2rem; font-family: var(--sans); font-size: .9rem; color: var(--text-soft); }
.foot-row p { margin: 0 0 .4rem; }

@media (max-width: 520px) {
  .brand-sub { display: none; }
  .site-nav { font-size: .9rem; }
  .site-nav a { padding: .4rem .5rem; }
}
@media (max-width: 760px) {
  .header-row { flex-wrap: wrap; row-gap: .3rem; }
  .site-nav { flex-wrap: wrap; justify-content: flex-start; margin-left: -.5rem; }
  .site-nav .theme-toggle { margin-left: auto; }
}
