/* Shared styles for akashnshaji.com (About, Projects, Publications, Talks, Explorations).
   Article pages under /notes/ keep their own self-contained designs. */

:root {
    --bg: #ffffff;
    --bg-2: #f4f6f3;
    --sage: #aebfa6;       /* backgrounds/decoration only: 1.9:1 on white, never body text */
    --sage-soft: #c8d4c2;
    --sage-ink: #5e6e58;   /* small sage-toned text, 5.5:1 */
    --forest: #2f4636;
    --ink: #2a2e2b;
    --ink-2: #585e57;
    --ink-3: #676d64;      /* dates and labels, 5.3:1 */
    --rule: #e3e6e0;
    --rule-strong: #cdd2c9;
    --display: 'Cormorant Garamond', Georgia, serif;
    --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --meta: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --content: 1140px;
    --nav-h: 74px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 18px; }
body {
    font-family: var(--serif);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--forest); text-decoration: none; }

.container { max-width: var(--content); margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 4rem); }

/* ════════ HEADER ════════ */
header.site {
    position: sticky; top: 0; z-index: 100;
    background: var(--sage);
    border-bottom: 1px solid color-mix(in srgb, var(--forest) 22%, transparent);
}
.nav {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--nav-h);
    max-width: var(--content); margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand .mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand .name {
    font-family: var(--display);
    font-size: 1.55rem; font-weight: 600;
    color: var(--forest); letter-spacing: 0.01em;
    line-height: 1; white-space: nowrap;
}
.menu { display: flex; align-items: center; gap: 2rem; }
.menu a {
    font-family: var(--display);
    font-size: 1.16rem; font-weight: 500;
    color: var(--forest);
    letter-spacing: 0.01em;
    position: relative;
}
.menu a:not(.btn)::after {
    content: ''; position: absolute; left: 0; bottom: -3px;
    width: 0; height: 1.5px; background: var(--forest);
    transition: width 0.22s ease;
}
.menu a:not(.btn):hover::after, .menu a[aria-current="page"]::after { width: 100%; }
.btn {
    font-family: var(--display);
    font-size: 1.1rem; font-weight: 500;
    border: 1.5px solid var(--forest);
    color: var(--forest);
    padding: 0.42rem 1.25rem;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.btn:hover { background: var(--forest); color: #fff; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--forest); }
.menu-toggle svg { width: 26px; height: 26px; }

/* ════════ ABOUT HERO (home) ════════ */
.hero { padding: clamp(3rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.hero-grid {
    display: grid; grid-template-columns: 1fr 300px;
    gap: clamp(2.5rem, 6vw, 5rem); align-items: start;
}
.hero-text h1 {
    font-family: var(--display);
    font-size: clamp(2.8rem, 5vw, 3.8rem);
    font-weight: 600; line-height: 1.02;
    color: var(--forest); letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}
.hero-role {
    font-size: 1.08rem; color: var(--ink-2);
    margin-bottom: 1.8rem;
}
.hero-role a { border-bottom: 1px solid var(--sage-soft); }
.hero-role a:hover { border-color: var(--forest); }
.bio p {
    font-size: 1.1rem; line-height: 1.8; color: var(--ink);
    margin-bottom: 1.15rem; text-wrap: pretty; max-width: 36em;
}
.bio a { border-bottom: 1px solid var(--sage-soft); }
.bio a:hover { border-color: var(--forest); }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.4rem; margin-top: 1.8rem; }
.hero-links a {
    font-family: var(--meta); font-size: 0.86rem; font-weight: 500;
    color: var(--ink-2); transition: color 0.18s;
}
.hero-links a:hover { color: var(--forest); }
.hero-links a.cv {
    color: var(--forest); border: 1.5px solid var(--rule-strong);
    padding: 0.32rem 1rem; border-radius: 2px;
    transition: border-color 0.2s, background 0.2s;
}
.hero-links a.cv:hover { border-color: var(--forest); background: var(--bg-2); }
.hero-photo {
    width: 100%; height: auto; aspect-ratio: 300 / 360;
    object-fit: cover; object-position: center 30%;
    border: 1px solid var(--rule-strong);
    border-radius: 3px;
    box-shadow: 0 14px 36px -22px rgba(40,55,42,0.4);
    display: block;
}

/* ════════ INNER PAGE HEADER ════════ */
.page-head { padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(1.8rem, 3vw, 2.6rem); }
.page-head .eyebrow {
    font-family: var(--meta); font-size: 0.74rem; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--ink-3); margin-bottom: 0.7rem;
}
.page-head h1 {
    font-family: var(--display); font-size: clamp(2.8rem, 5vw, 3.8rem);
    font-weight: 600; line-height: 1.02; color: var(--forest);
    letter-spacing: -0.01em; margin-bottom: 0.8rem;
}
.page-head .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.page-head .lead a { border-bottom: 1px solid var(--sage-soft); }
.page-head .lead a:hover { border-color: var(--forest); }
.page-body { padding-bottom: clamp(3.5rem, 7vw, 5.5rem); }

/* ════════ SECTIONS (home) ════════ */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section.alt { background: var(--bg-2); }
.sec-title { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 3.6rem); }
.sec-title .top-rule, .sec-title .bot-rule { height: 1px; background: var(--rule-strong); }
.sec-title h2 {
    font-family: var(--display);
    font-size: clamp(2rem, 3.6vw, 2.7rem);
    font-weight: 500; color: var(--forest);
    padding: 1.1rem 0; letter-spacing: 0.005em;
}

/* ════════ ITEM LIST (Projects, Explorations) ════════ */
.rlist { max-width: 820px; }
.ritem { padding: 1.9rem 0; border-top: 1px solid var(--rule); }
.ritem:last-child { border-bottom: 1px solid var(--rule); }
.ritem-head {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 1.5rem; margin-bottom: 0.35rem;
}
.ritem h2, .ritem h3 {
    font-family: var(--display);
    font-size: 1.7rem; font-weight: 500;
    color: var(--forest); line-height: 1.18;
}
.ritem h2 a, .ritem h3 a { color: var(--forest); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.ritem h2 a:hover, .ritem h3 a:hover { border-color: var(--forest); }
.ritem .rrole {
    font-family: var(--meta); font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage-ink);
    margin-bottom: 0.3rem;
}
.ritem .rdate {
    font-family: var(--meta); font-size: 0.78rem;
    letter-spacing: 0.04em; color: var(--ink-3);
    white-space: nowrap; flex-shrink: 0;
}
.ritem .raffil {
    font-family: var(--meta); font-size: 0.82rem;
    letter-spacing: 0.04em; color: var(--sage-ink);
    font-weight: 600; margin-bottom: 1rem;
}
.ritem ul { list-style: none; }
.ritem li {
    position: relative; padding-left: 1.3rem;
    font-size: 1rem; color: var(--ink-2); line-height: 1.66;
    margin-bottom: 0.5rem; text-wrap: pretty;
}
.ritem li:last-child { margin-bottom: 0; }
.ritem li::before {
    content: ''; position: absolute; left: 0; top: 0.66em;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--sage); border: 1px solid var(--forest);
}
.ritem .excerpt { font-size: 1rem; color: var(--ink-2); line-height: 1.66; text-wrap: pretty; }
.more {
    font-family: var(--meta); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em;
    margin-top: 0.9rem; display: inline-block;
    border-bottom: 1px solid var(--sage-soft); padding-bottom: 1px;
}
.more:hover { border-color: var(--forest); }

/* ════════ GROUP HEADINGS (Publications, Talks) ════════ */
.groups { max-width: 820px; counter-reset: pub; }
.group + .group { margin-top: clamp(2.6rem, 5vw, 3.6rem); }
.group-title {
    font-family: var(--meta); font-size: 0.74rem; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
    margin-bottom: 0.4rem;
}

/* ════════ PUBLICATIONS ════════ */
.pubs { max-width: 820px; }
.pubs > .pub {
    counter-increment: pub; position: relative;
    padding: 1.6rem 0 1.6rem 3rem;
    border-top: 1px solid var(--rule);
}
.pubs > .pub:last-child { border-bottom: 1px solid var(--rule); }
.pubs > .pub::before {
    content: counter(pub, decimal-leading-zero);
    position: absolute; left: 0; top: 1.75rem;
    font-family: var(--display); font-size: 1.4rem; font-weight: 500;
    color: var(--sage-ink); font-variant-numeric: tabular-nums;
}
.pub .pt {
    font-family: var(--display);
    font-size: 1.5rem; font-weight: 500; line-height: 1.22;
    color: var(--forest); margin-bottom: 0.45rem;
}
.pub .pa { font-size: 1rem; color: var(--ink-2); line-height: 1.55; }
.pub .pa strong { color: var(--ink); font-weight: 500; }
.pub .pv { font-size: 0.96rem; color: var(--ink-3); font-style: italic; margin-top: 0.15rem; }
.pub details.abs { margin-top: 0.8rem; }
.pub details.abs summary {
    font-family: var(--meta); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
    color: var(--forest); cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 0.35rem;
}
.pub details.abs summary::-webkit-details-marker { display: none; }
.pub details.abs summary::before { content: '\25B8'; font-size: 1.15em; line-height: 1; transition: transform 0.18s; }
.pub details.abs[open] summary::before { transform: rotate(90deg); }
.pub details.abs p {
    font-size: 0.98rem; line-height: 1.7; color: var(--ink-2);
    margin-top: 0.6rem; padding-left: 0.9rem; border-left: 2px solid var(--sage-soft);
    text-wrap: pretty;
}
.pub .pnote { font-family: var(--meta); font-size: 0.8rem; color: var(--ink-3); letter-spacing: 0.02em; }
.pub .plinks { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.pub .plinks a {
    font-family: var(--meta); font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.04em; border-bottom: 1px solid var(--sage-soft);
    padding-bottom: 1px;
}
.pub .plinks a:hover { border-color: var(--forest); }
.status {
    display: inline-block; font-family: var(--meta);
    font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; vertical-align: middle;
    border-radius: 2px; padding: 0.18rem 0.55rem; margin-left: 0.6rem;
    position: relative; top: -0.18em;
}
.status.wip { background: #efe8d3; color: #82672a; }
.status.done { background: var(--sage-soft); color: var(--forest); }

/* ════════ TALKS ════════ */
.talks { max-width: 820px; }
.talk {
    display: grid; grid-template-columns: 1fr auto;
    gap: 0.25rem 1.5rem; align-items: baseline;
    padding: 1.25rem 0; border-top: 1px solid var(--rule);
}
.talk:last-child { border-bottom: 1px solid var(--rule); }
.talk .role {
    grid-column: 1 / -1; font-family: var(--meta);
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--sage-ink);
    margin-bottom: 0.1rem;
}
.talk .tt { font-family: var(--display); font-size: 1.4rem; font-weight: 500; color: var(--forest); line-height: 1.25; }
.talk .td { font-family: var(--meta); font-size: 0.8rem; color: var(--ink-3); white-space: nowrap; text-align: right; }
.talk .tv { grid-column: 1 / -1; font-size: 0.98rem; color: var(--ink-2); }

/* ════════ EDUCATION ════════ */
.edu { max-width: 680px; margin: 0 auto; text-align: center; }
.edu .ed-item { padding: 1.6rem 0; border-top: 1px solid var(--rule); }
.edu .ed-item:first-child { border-top: none; padding-top: 0; }
.ed-deg { font-family: var(--display); font-size: 1.55rem; font-weight: 500; color: var(--forest); line-height: 1.22; }
.ed-school { font-size: 1.02rem; color: var(--ink-2); margin-top: 0.2rem; }
.ed-label {
    font-family: var(--meta); font-size: 0.68rem; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
    margin-top: 1rem;
}
.ed-fellows { list-style: none; margin-top: 0.25rem; }
.ed-fellows li { font-size: 0.98rem; color: var(--ink-2); line-height: 1.6; }

/* ════════ CONTACT ════════ */
.contact-wrap { max-width: 680px; margin: 0 auto; text-align: center; }
.contact-wrap p.lead { font-size: 1.2rem; line-height: 1.7; color: var(--ink-2); margin-bottom: 2.2rem; text-wrap: pretty; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; }
.contact-links a {
    font-family: var(--display); font-size: 1.14rem; font-weight: 500;
    border: 1.5px solid var(--rule-strong); color: var(--forest);
    padding: 0.5rem 1.4rem; border-radius: 2px;
    transition: border-color 0.2s, background 0.2s;
}
.contact-links a:hover { border-color: var(--forest); background: var(--bg-2); }
.contact-links a.primary { background: var(--forest); color: #fff; border-color: var(--forest); }
.contact-links a.primary:hover { background: transparent; color: var(--forest); }

/* ════════ FOOTER ════════ */
footer.site {
    background: var(--forest); color: color-mix(in srgb, #fff 75%, transparent);
    padding: 2.6rem 0;
}
.foot {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem;
    max-width: var(--content); margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 4rem);
}
.foot .fbrand { display: flex; align-items: center; gap: 0.7rem; font-family: var(--display); font-size: 1.4rem; font-weight: 600; color: #fff; }
.foot .fbrand .mark { width: 30px; height: 30px; }
.foot .fmeta { font-family: var(--meta); font-size: 0.82rem; letter-spacing: 0.02em; }
.foot .flinks { display: flex; gap: 1.4rem; }
.foot .flinks a { font-family: var(--meta); font-size: 0.82rem; color: color-mix(in srgb, #fff 78%, transparent); transition: color 0.2s; }
.foot .flinks a:hover { color: #fff; }

/* ════════ RESPONSIVE ════════ */
@media (max-width: 900px) {
    html { font-size: 17px; }
    .menu {
        position: fixed; inset: var(--nav-h) 0 auto 0; background: var(--sage);
        flex-direction: column; gap: 0; padding: 0.5rem 0;
        max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
        border-bottom: 1px solid color-mix(in srgb, var(--forest) 22%, transparent);
    }
    .menu.open { max-height: 460px; }
    .menu a { padding: 0.8rem 0; }
    .menu a.btn { padding: 0.4rem 1.6rem; margin: 0.5rem 0 0.7rem; }
    .menu-toggle { display: block; }
    .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-media { order: -1; max-width: 220px; }
}
@media (max-width: 520px) {
    .pubs > .pub { padding-left: 2.4rem; }
    .talk { grid-template-columns: 1fr; }
    .talk .td { text-align: left; }
    .ritem-head { flex-direction: column; gap: 0.2rem; }
}
