/* Shared styles for the inner pages of akashnshaji.com (About, Projects, Publications, Talks, Explorations).
   Same colors and fonts as the homepage, whose own styles live inside index.html.
   The essay pages under /explorations/ still use the older site.css.

   Sizes follow common web-typography guidance: reading text about 17px at 1.55 line height, lines of 45-75 characters,
   sizes stepping by about 1.25 (11 / 17 / 21.5 / 34px), spacing in multiples of 8px, and a capped content width.

   One entry on any page is a two-column grid: a narrow column of labels, then the title and text. */

:root {
    --bg: #0d1310; --ink: #ece7da; --ink-2: #b9beb1; --ink-3: #848c80; --line: rgba(236, 231, 218, 0.18);
    --accent: #aebfa6; --rust: #dd7d55;
    --wide: 58rem;   /* content never gets wider than this */
    --side: 11.5rem; /* the narrow left column: role, date, type */
    --read: 30em;    /* running text: about 70 characters a line */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 18px; }
body { background: var(--bg); color: var(--ink); font-family: 'Newsreader', Georgia, serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
.mono, .eyebrow, .group-title, .rrole, .rdate, .pstat, .pv, .pnote, .talk .role, .td, .more, .plinks a, summary {
    font-family: 'DM Mono', ui-monospace, monospace; font-size: 0.62rem; font-weight: 400; letter-spacing: 0.13em; text-transform: uppercase; line-height: 1.5;
}

/* ── Header ── */
.top { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.6rem 5vw; }
.name { display: flex; align-items: center; gap: 0.6rem; font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-size: 1.3rem; letter-spacing: -0.015em; font-variation-settings: 'SOFT' 50, 'opsz' 40; }
.name em { font-style: italic; color: var(--accent); }
.name svg { width: 24px; height: 24px; color: var(--accent); }
.pages { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pages a { font-size: 0.68rem; letter-spacing: 0.14em; color: var(--ink-3); padding: 0.25rem 0; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.pages a:hover { color: var(--ink); }
.pages a[aria-current] { color: var(--ink); border-color: var(--accent); }

/* ── Page frame ── */
.page { flex: 1; width: 100%; max-width: calc(var(--wide) + 10vw); padding: 3.5rem 5vw 5rem; }
.eyebrow, .label { color: var(--ink-3); }
.page-head h1 { font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-size: 1.9rem; line-height: 1.1; letter-spacing: -0.02em; font-variation-settings: 'SOFT' 50, 'opsz' 60; margin: 0.6rem 0 0.75rem; }
.lead { font-size: 0.94rem; line-height: 1.55; color: var(--ink-2); max-width: var(--read); text-wrap: pretty; }
.lead a, .bio a { color: var(--ink); border-bottom: 1px solid var(--line); transition: border-color 0.2s; }
.lead a:hover, .bio a:hover { border-color: var(--accent); }
.page-body { margin-top: 2.75rem; }
.group + .group { margin-top: 3rem; }
.group-title { color: var(--ink-3); padding-bottom: 0.9rem; }

/* ── One entry: a narrow column of labels, then the title and text ── */
.ritem, .pub, .talk { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); column-gap: 3rem; align-items: start; padding: 1.78rem 0; border-top: 1px solid var(--line); }
.rlist > :last-child, .pubs > :last-child, .talks > :last-child { border-bottom: 1px solid var(--line); }
.ritem-head { display: contents; }

.ritem h2, .pt, .tt { grid-column: 2; grid-row: 1; font-family: 'Fraunces', Georgia, serif; font-weight: 350; font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.01em; font-variation-settings: 'SOFT' 50, 'opsz' 30; text-wrap: balance; }
.ritem h2 a { background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat; transition: background-size 0.3s, color 0.2s; }
.ritem h2 a:hover { background-size: 100% 1px; }

.rrole, .pstat, .talk .role { grid-column: 1; grid-row: 1; color: var(--accent); padding-top: 0.42rem; }
.pstat.wip { color: var(--ink-3); }
.rdate, .td { grid-column: 1; grid-row: 2; color: var(--ink-3); padding-top: 0.5rem; }
.raffil, .tv, .pa { grid-column: 2; grid-row: 2; font-style: italic; font-size: 0.94rem; line-height: 1.5; color: var(--ink-3); margin-top: 0.3rem; max-width: var(--read); }
.pa strong { font-weight: 400; color: var(--ink); }
.pv { grid-column: 2; color: var(--ink-3); margin-top: 0.55rem; }

.sum, .excerpt, details p, details li { font-size: 0.94rem; line-height: 1.55; color: var(--ink-2); max-width: var(--read); text-wrap: pretty; }
.sum, .excerpt { grid-column: 2; margin-top: 0.75rem; }
.sum strong, details strong { font-weight: 400; color: var(--ink); }

/* Detail that waits for a click: the rest of a project, an abstract */
details { grid-column: 2; margin-top: 0.9rem; }
summary { display: inline-flex; align-items: center; gap: 0.55rem; list-style: none; cursor: pointer; color: var(--ink-2); padding-bottom: 0.2rem; border-bottom: 1px solid var(--line); transition: color 0.2s, border-color 0.2s; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 0.8rem; line-height: 1; }
details[open] summary::after { content: '\2212'; }
summary:hover { color: var(--ink); border-color: var(--accent); }
details ul { list-style: none; display: grid; gap: 0.7rem; margin-top: 1rem; }
details li { position: relative; padding-left: 1.1rem; }
details li::before { content: ''; position: absolute; left: 0; top: 0.78em; width: 6px; height: 1px; background: var(--ink-3); }
details p { margin-top: 1rem; }

.more, .plinks { grid-column: 2; justify-self: start; margin-top: 1rem; }
.more, .plinks a { display: inline-block; color: var(--ink-2); padding-bottom: 0.2rem; border-bottom: 1px solid var(--line); transition: color 0.2s, border-color 0.2s; }
.more:hover, .plinks a:hover { color: var(--ink); border-color: var(--accent); }
.pnote { color: var(--ink-3); }

/* Explorations: type and date in the narrow column, the blurb beside the date */
.p-explorations .raffil { grid-column: 1; grid-row: 1; font-family: 'DM Mono', ui-monospace, monospace; font-style: normal; font-size: 0.62rem; letter-spacing: 0.13em; text-transform: uppercase; line-height: 1.5; color: var(--accent); margin-top: 0; padding-top: 0.42rem; }
.p-explorations .excerpt { grid-row: 2; margin-top: 0.5rem; }

/* ── About ── */
.cols { display: grid; grid-template-columns: minmax(0, 30em) 12.5rem; gap: 2rem 4.5rem; align-items: start; font-size: 0.94rem; margin-top: 1.4rem; }
.bio p { line-height: 1.65; color: var(--ink-2); margin-bottom: 1.2em; text-wrap: pretty; }
.bio p:first-child { color: var(--ink); }
.cols img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 28%; border-radius: 2px; filter: saturate(0.85) brightness(0.95); }
.edu { margin-top: 3.5rem; max-width: 30em; font-size: 0.94rem; }
.edu .label { margin-bottom: 1.4rem; }
.edu .row { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.edu .row:last-child { border-bottom: 1px solid var(--line); }
.edu .deg { font-family: 'Fraunces', Georgia, serif; font-weight: 350; font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.01em; font-variation-settings: 'SOFT' 50, 'opsz' 30; }
.edu .where { color: var(--accent); margin-top: 0.45rem; }
.edu .sub { color: var(--ink-3); margin-top: 1rem; }
.edu .also { color: var(--ink-2); line-height: 1.55; margin-top: 0.3rem; }

/* ── Footer ── */
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem 1.6rem; padding: 1.4rem 5vw 2.2rem; color: var(--ink-3); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
.foot a { transition: color 0.2s; }
.foot a:hover { color: var(--ink); }

/* ── Small screens: one column, in reading order ── */
@media (max-width: 820px) {
    .top { flex-direction: column; align-items: flex-start; padding: 1.4rem 6vw; }
    .page { padding: 2.5rem 6vw 4rem; }
    .foot { padding: 1.2rem 6vw 2rem; }
    .ritem, .pub, .talk { grid-template-columns: 1fr; }
    .ritem > *, .ritem-head > *, .pub > *, .talk > * { grid-column: 1 !important; grid-row: auto !important; }
    .rrole, .pstat, .talk .role, .p-explorations .raffil { padding-top: 0; margin-bottom: 0.4rem; }
    .cols { grid-template-columns: 1fr; }
    .cols img { order: -1; max-width: 9.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
