:root {
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e5e4;
  --bg: #ffffff;
  --soft: #f5f5f4;
  --accent: #44403c;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.125rem; line-height: 1.65;
}
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.lead { font-size: 1.25rem; }
.notice { background: var(--soft); border-left: 3px solid var(--accent); padding: 0.5rem 0.9rem; font-size: 0.95rem; }

header.site { border-bottom: 1px solid var(--line); padding: 1.5rem 0; }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; }
.brand { font-family: Outfit, "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 600; font-size: 1.5rem; letter-spacing: 0.02em; text-decoration: none; }
nav.main ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.1rem; }
nav.main a { text-decoration: none; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
nav.main a[aria-current="page"], nav.main a:hover { color: var(--ink); }

main { padding: 3rem 0 4rem; }
h1, h2, h3 { font-family: Outfit, "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; }
h1 { font-size: 2rem; margin: 0 0 1.25rem; }
h2 { font-size: 1.2rem; margin: 2.25rem 0 0.75rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.25rem; }
p { margin: 0 0 1.1rem; }

/* Editor content */
.prose h2 { margin-top: 2rem; }
.prose h3 { text-transform: none; letter-spacing: 0; font-size: 1.15rem; margin-top: 1.5rem; }
.prose blockquote { margin: 1.5rem 0; padding: 0.25rem 1.25rem; border-left: 3px solid var(--line); color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.1rem; }
.prose figure { margin: 1.5rem 0; }
.prose figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }
.prose img { margin: 1.25rem auto; }
.prose iframe.ql-video { width: 100%; aspect-ratio: 16 / 9; border: 0; margin: 1.25rem 0; }
.prose pre { background: var(--soft); padding: 1rem; overflow-x: auto; font-size: 0.9rem; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }
.prose .ql-indent-1 { padding-left: 2em; }
.prose .ql-indent-2 { padding-left: 4em; }
.prose table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.prose td, .prose th { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; }

/* Home */
.hero { text-align: center; }
.hero figure { margin: 0 auto 1.5rem; max-width: 720px; }
.hero img { margin: 0 auto; }
.hero figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.5rem; }
.hero .tagline { font-size: 1.35rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 0.5rem; }
.list { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.list li { margin: 0 0 0.6rem; display: flex; flex-direction: column; }

/* Chips / filters */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; }
.chips a { text-decoration: none; font-size: 0.85rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.75rem; color: var(--muted); }
.chips a[aria-current="true"], .chips a:hover { border-color: var(--ink); color: var(--ink); }
.chips .count { color: var(--muted); font-size: 0.75rem; }
.badge { display: inline-block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; background: var(--ink); color: var(--bg); padding: 0.1rem 0.5rem; border-radius: 3px; }
.badge.light { background: var(--soft); color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: center; color: var(--muted); font-size: 0.95rem; margin: 0 0 0.75rem; }

/* Work timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 9rem 1fr; gap: 1.25rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.timeline .when { color: var(--muted); font-size: 0.95rem; padding-top: 0.15rem; }
.timeline .what p { margin: 0.25rem 0 0; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: 0.25rem; } }

/* Blog */
.post-list { display: flex; flex-direction: column; gap: 1.5rem; }
.post-card { display: grid; grid-template-columns: 1fr; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.post-card:has(.cover) { grid-template-columns: 200px 1fr; }
.post-card h2 { margin: 0 0 0.25rem; }
.post-card p { margin: 0 0 0.5rem; }
.post-card .cover img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
@media (max-width: 600px) { .post-card:has(.cover) { grid-template-columns: 1fr; } }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* Music */
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: end; background: var(--soft); padding: 1rem; margin: 0 0 1.5rem; }
.filters label { display: flex; flex-direction: column; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); gap: 0.25rem; }
.filters input, .filters select { font: inherit; font-size: 1rem; text-transform: none; letter-spacing: 0; padding: 0.35rem 0.5rem; border: 1px solid var(--line); background: var(--bg); color: var(--ink); min-width: 9rem; }
.filters button, .button { font: inherit; background: var(--ink); color: var(--bg); border: 1px solid var(--ink); padding: 0.45rem 1rem; cursor: pointer; text-decoration: none; display: inline-block; border-radius: 3px; }
.button.secondary { background: transparent; color: var(--ink); }
.button:hover { background: var(--accent); color: var(--bg); }
.tune-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.tune-card { display: flex; flex-direction: column; gap: 0.25rem; border: 1px solid var(--line); padding: 1rem; text-decoration: none; }
.tune-card:hover { border-color: var(--ink); }
.tune-card .formats { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.tune-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem 1.5rem; margin: 0 0 1.5rem; padding: 1rem; background: var(--soft); }
.tune-meta dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.tune-meta dd { margin: 0; }
.downloads { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.5rem; }
.downloads .muted { color: inherit; opacity: 0.7; }
audio { width: 100%; max-width: 560px; }
.abc-paper { overflow-x: auto; }
.abc-paper svg { max-width: 100%; height: auto; }
.abc-source pre { background: var(--soft); padding: 1rem; overflow-x: auto; font-size: 0.85rem; white-space: pre; }
.pdf-frame { width: 100%; height: 75vh; border: 1px solid var(--line); }

/* Contact / email */
.contact-big { font-size: 1.5rem; }
.email-fallback { color: var(--muted); }
.email-btn { font: inherit; color: var(--ink); background: none; border: 1px solid var(--ink); border-radius: 4px; padding: 0.15em 0.6em; cursor: pointer; }
.email-btn:hover { background: var(--ink); color: var(--bg); }

footer.site { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; font-size: 0.9rem; color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
footer.site a { color: var(--muted); }
