/* januverma.com — shared design system
   Type: Libre Caslon Text (body, headings), Instrument Sans (labels, nav), JetBrains Mono (dates, tags, venues)
   Tone: warm paper, one oxblood accent, hairline rules. */

:root {
    --bg: #f9f7f2;
    --paper: #fdfcf9;
    --ink: #15120e;
    --ink-2: #3f3a33;
    --muted: #7a736a;
    --rule: #15120e;
    --hair: #d6d0c4;
    --hair-soft: #e9e4da;
    --accent: #a3321b;
    --photo: #ddd3c3;

    --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
    --sans: 'Newsreader', 'Iowan Old Style', Georgia, serif;
    --mono: 'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;

    --measure: 1080px;
    --gutter: clamp(1.25rem, 5vw, 6rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--serif);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

.sans { font-family: var(--sans); }
.mono { font-family: var(--mono); }

/* ---------- Shell ---------- */

.wrap {
    max-width: var(--measure);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.site-header {
    padding-top: 2.5rem;
}

.site-header .bar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule);
    font-family: var(--sans);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    color: var(--muted);
}

.site-header .name {
    color: var(--ink);
    font-weight: 500;
}

.site-header .name:hover { color: var(--accent); }

.site-header .links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.75rem;
}

.site-header .links a { color: var(--muted); }
.site-header .links a:hover,
.site-header .links a[aria-current="page"] { color: var(--accent); }

.site-footer {
    margin-top: clamp(4rem, 8vw, 6.5rem);
    padding-bottom: 4rem;
}

.site-footer .bar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--rule);
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--muted);
}

.site-footer .links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.site-footer .links a { color: var(--muted); }

/* ---------- Opening ---------- */

.opening {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 1fr) minmax(0, 3fr);
    gap: 2rem;
    align-items: start;
    margin-top: clamp(3.5rem, 8vw, 6rem);
}

.opening .statement {
    font-weight: 400;
    font-size: clamp(1.6rem, 2.8vw, 2.125rem);
    line-height: 1.32;
    letter-spacing: -0.01em;
    text-wrap: pretty;
}

.opening .lede {
    margin-top: 1.75rem;
    font-size: clamp(1.05rem, 1.4vw, 1.125rem);
    line-height: 1.65;
    color: var(--ink-2);
    max-width: 40em;
    text-wrap: pretty;
}

.opening .now {
    margin-top: 1.75rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: baseline;
}

.opening .now .tag {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: var(--accent);
}

.opening .now p {
    font-size: 1rem;
    line-height: 1.55;
}

.opening .now a,
.prose a,
.lede a,
.note a {
    border-bottom: 1px solid var(--hair);
}
.opening .now a:hover,
.prose a:hover,
.lede a:hover,
.note a:hover { border-bottom-color: var(--accent); }

.opening .portrait {
    grid-column: 3;
    padding-top: 0.4rem;
}

.opening .portrait img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
    background: var(--photo);
    border: 1px solid var(--hair);
}

/* Page opening variant for inner pages (catalogue, tracks) */
.page-opening {
    margin-top: clamp(3.5rem, 8vw, 6rem);
    max-width: 44em;
}

.page-opening .kicker {
    font-family: var(--sans);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
}

.page-opening .kicker .mono { text-transform: none; letter-spacing: 0.02em; color: var(--muted); }

.page-opening h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    line-height: 1.25;
    letter-spacing: -0.012em;
    text-wrap: pretty;
}

.page-opening .lede {
    margin-top: 1.25rem;
    font-size: clamp(1.05rem, 1.4vw, 1.125rem);
    line-height: 1.65;
    color: var(--ink-2);
    text-wrap: pretty;
}

/* ---------- Sections ---------- */

.section {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    gap: 2rem;
    margin-top: clamp(4rem, 8vw, 6.5rem);
}

.section > .aside {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.section .label {
    font-family: var(--sans);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.section .note {
    font-family: var(--sans);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--muted);
}

.section .note a { color: var(--accent); border-bottom: none; }

.section h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(1.5rem, 2.4vw, 1.9rem);
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
    text-wrap: pretty;
}

.prose { max-width: 40em; }
.prose p { font-size: 1.0625rem; line-height: 1.7; color: var(--ink-2); margin-bottom: 1.25rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { color: var(--ink); }

.question {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--hair);
    font-size: 1.25rem;
    line-height: 1.45;
    font-style: italic;
    max-width: 34em;
}

/* ---------- Ledger (rows of dated entries) ---------- */

.ledger {
    border-top: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
}

.ledger .row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) auto;
    gap: 1.25rem;
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--hair);
    align-items: baseline;
}

.ledger .row.compact {
    padding: 0.85rem 0;
    grid-template-columns: 8.5rem minmax(0, 1fr);
}

.ledger .row.plain { grid-template-columns: minmax(0, 1fr) auto; }

.ledger .row.record {
    grid-template-columns: 11rem minmax(0, 1fr);
    align-items: start;
}
.ledger .row.record .title { font-size: 1.125rem; line-height: 1.4; }
.ledger .row.record .venue { color: var(--ink); line-height: 1.7; }
.ledger .row.record .venue .sub { display: block; color: var(--muted); }

.ledger .date,
.ledger .venue,
.ledger .kind {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.6;
}

.ledger .kind { text-align: right; white-space: nowrap; font-size: 0.7rem; }

.ledger .body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.ledger .title {
    font-size: 1.375rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.ledger .row.compact .title { font-size: 1.0625rem; line-height: 1.5; }
.ledger .row.plain .title { font-size: 1.0625rem; line-height: 1.45; }

.ledger .desc {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--ink-2);
}

.ledger .meta {
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--muted);
}

.ledger .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.ledger a.row:hover .title { color: var(--accent); }

.after {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.75rem;
    padding-top: 1.1rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--muted);
}

.after a { color: var(--muted); }
.after a:hover, .after a.accent { color: var(--accent); }

/* Two lists side by side inside one section's content column */
.split {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
    gap: 2.5rem;
}

.split .label { display: block; margin-top: -1.8rem; margin-bottom: 0.65rem; }

/* Definition-style list (e.g. threads on a track page) */
.deflist {
    border-top: 1px solid var(--rule);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
}

.deflist .item {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--hair);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.deflist .item .num {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
}

.deflist .item h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.35;
}

.deflist .item p {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--ink-2);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .opening {
        grid-template-columns: minmax(0, 1fr) 160px;
        gap: 1.5rem;
    }
    .opening .portrait { grid-column: 2; }
    .section { grid-template-columns: 1fr; gap: 1rem; margin-top: 3.5rem; }
    .split { grid-template-columns: 1fr; gap: 2.5rem; }
    .deflist { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .site-header { padding-top: 1.5rem; }
    .site-header .bar { font-size: 0.8rem; }
    .opening { grid-template-columns: 1fr; }
    .opening .portrait { grid-column: 1; grid-row: 1; width: 132px; }
    .opening .portrait img { aspect-ratio: 1; }
    .ledger .row { grid-template-columns: 1fr; gap: 0.35rem; }
    .ledger .row .kind { text-align: left; }
    .ledger .row.compact { grid-template-columns: 1fr; gap: 0.2rem; }
    .ledger .row.record { grid-template-columns: 1fr; gap: 0.4rem; }
    .ledger .row.record .venue .sub { display: inline; }
    .ledger .row.record .venue .sub::before { content: " · "; }
    .ledger .title { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition-duration: 0.01ms !important; }
}
