/* Graph Neural Networks — shared minimal styles */

/*
 * Palette sampled from the Minard-map hero image (assets/images/hero.jpg) —
 * this is the site's color template going forward:
 *   --paper       background, kept consistent across every page
 *   --ink         the connective/black tone — text, edges, lines
 *   --accent      the strong tone from the map's marching band — marks
 *                 "published" (the 3 papers with a live article)
 *   --accent-line light/translucent accent — marks "drafted" (has a folder
 *                 in gnn-admin/papers/ — work has started — but isn't
 *                 published yet, shows "Coming soon")
 *   --muted       grey — marks "radar" (no gnn-admin folder yet at all;
 *                 the plain/default node look, otherwise used sparingly
 *                 for secondary UI chrome)
 */
:root {
    --paper: #ddceb4;
    --ink: #1a1410;
    --ink-soft: rgba(26, 20, 16, 0.68);
    --line: rgba(26, 20, 16, 0.18);
    --accent: #a35a3c;
    --accent-soft: rgba(163, 90, 60, 0.14);
    --accent-faint: rgba(163, 90, 60, 0.08);
    --accent-light: #c9a58a;
    --accent-line: rgba(163, 90, 60, 0.55);
    --muted: #746c5e;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- Nav ---------- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 40px;
    z-index: 10;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nav a {
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.nav a:hover { opacity: 1; }

.nav__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: 0.18em;
}

.nav__logo { width: 34px; height: 34px; flex: none; object-fit: contain; }

.nav__links {
    display: flex;
    align-items: baseline;
    gap: 32px;
}

/* Nav on the hero image — the hero wash is now light (paper-toned), so this
   reads the same as the on-paper nav. Kept as a separate class in case a
   future hero image goes dark again. */
.nav--on-image { color: var(--ink); }
.nav--on-image a { color: var(--ink); }

/* Dark nav (on paper background) */
.nav--on-paper { color: var(--ink); }

@media (max-width: 600px) {
    .nav { padding: 20px; }
    .nav__links { gap: 18px; font-size: 11px; }
}

/* ---------- Hero (cover page) ---------- */

.hero {
    position: relative;
    height: 100vh;
    min-height: 560px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: linear-gradient(rgba(221, 206, 180, 0.73), rgba(221, 206, 180, 0.81)), url("../images/hero-vignette.jpg");
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    text-align: center;
    overflow: hidden;
}

.hero__content {
    position: relative;
    padding: 0 24px;
    color: var(--ink);
}

.hero__title {
    margin: 0;
    font-weight: 200;
    font-size: clamp(2.2rem, 7vw, 4.6rem);
    letter-spacing: 0.14em;
    line-height: 1.25;
    text-transform: uppercase;
}

.hero__subtitle {
    margin: 22px 0 0;
    font-size: clamp(0.85rem, 1.6vw, 1.05rem);
    letter-spacing: 0.06em;
    font-weight: 200;
    color: var(--ink-soft);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero__cta {
    display: inline-block;
    margin-top: 38px;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
    padding-bottom: 6px;
    color: var(--ink);
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.hero__cta:hover { border-color: var(--ink); }

.hero__footer {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
}

.hero__footer a:hover { color: var(--ink); }

.hero__copyright {
    display: block;
    margin-top: 10px;
    font-size: 10px;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

/* On wide/landscape viewports, zoom the hero image in a bit further than
   cover so the lower chart reads bigger — cropping more from the sides is
   fine there. Skipped on portrait/mobile, where cover is already
   height-driven and a fixed size would leave gaps. */
@media (min-aspect-ratio: 1/1) {
    .hero { background-size: 112% auto; }
}

/* ---------- Simple content pages ---------- */

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 24px 100px;
    text-align: center;
}

.page__inner { max-width: 560px; }

.page__eyebrow {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 18px;
}

.page__title {
    font-weight: 300;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    letter-spacing: 0.06em;
    margin: 0 0 20px;
}

.page__body {
    font-size: 15px;
    line-height: 1.8;
    color: var(--ink-soft);
    font-weight: 300;
}

.page__back {
    display: inline-block;
    margin-top: 36px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
    padding-bottom: 5px;
}

/* ---------- About page ---------- */

.about {
    max-width: 980px;
    margin: 0 auto;
    padding: 140px 24px 100px;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 64px;
    align-items: start;
}

.about__content { min-width: 0; }

.about__title {
    font-weight: 300;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    letter-spacing: 0.04em;
    margin: 0 0 22px;
}

.about__lede,
.about__content p:not(.page__eyebrow) {
    font-size: 15px;
    line-height: 1.85;
    color: var(--ink-soft);
    font-weight: 300;
    margin: 0 0 24px;
}

.about__content em {
    color: var(--ink);
    font-style: italic;
}

.about__content strong {
    color: var(--ink);
    font-weight: 600;
}

.about__heading {
    font-weight: 400;
    font-size: 1.3rem;
    letter-spacing: 0.02em;
    color: var(--ink);
    margin: 44px 0 18px;
}

.about__content a,
.about__figure figcaption a {
    text-decoration: underline;
    text-decoration-color: var(--accent-line);
    text-underline-offset: 2px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.about__content a:hover,
.about__figure figcaption a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

.about__figure {
    margin: 0 0 8px;
}

.about__figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.about__figure img:hover {
    opacity: 0.85;
}

.about__figure-note {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
    opacity: 0.75;
}

.about__sidebar {
    border-left: 1px solid var(--line);
    padding-left: 28px;
}

.about__sidebar-eyebrow {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 16px;
}

.about__sidebar-body {
    font-size: 13px;
    line-height: 1.8;
    color: var(--ink-soft);
    font-weight: 300;
    margin: 0 0 14px;
}

@media (max-width: 760px) {
    .about {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 120px 20px 80px;
    }

    .about__sidebar {
        border-left: none;
        border-top: 1px solid var(--line);
        padding-left: 0;
        padding-top: 28px;
    }
}


.lightbox {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: rgba(26, 20, 16, 0.85);
}

.lightbox__image {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox__close {
    position: fixed;
    top: 22px;
    right: 26px;
    border: none;
    background: none;
    color: var(--paper);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    padding: 6px;
    opacity: 0.85;
}

.lightbox__close:hover { opacity: 1; }

/* ---------- Graph page (Overview) ---------- */
/* Full-bleed, non-scrolling layout: the graph canvas fills the entire
   viewport under the standard fixed nav, seamless against the page — same
   --paper background throughout, no boxed panel. A short intro (heading +
   paragraph) floats statically over one corner; it does not pan/zoom with
   the graph beneath it. */

html.graph-html,
html.graph-html body {
    height: 100%;
    overflow: hidden;
    margin: 0;
}

.graph-full {
    position: relative;
    height: 100vh;
    background: var(--paper);
}

.graph-intro {
    position: fixed;
    top: 108px;
    left: 40px;
    z-index: 4;
    max-width: 380px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    background: rgba(221, 206, 180, 0.82);
    backdrop-filter: blur(3px);
    padding: 4px 14px 8px 6px;
}

.graph-intro__title {
    font-weight: 300;
    font-size: 1.4rem;
    letter-spacing: 0.02em;
    line-height: 1.25;
    margin: 0 0 12px;
}

.graph-intro__body {
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-soft);
    font-weight: 300;
    margin: 0 0 10px;
}

.graph-intro__hint {
    font-size: 11px;
    line-height: 1.6;
    color: var(--ink-soft);
    opacity: 0.75;
    margin: 0;
}

.graph-intro__toggle-icon {
    display: none;
}

.graph-shell {
    position: absolute;
    inset: 0;
    height: 100%;
    overflow: hidden;
    background: var(--paper);
    cursor: grab;
}

.graph-shell:active { cursor: grabbing; }

.graph-canvas {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.graph-canvas svg {
    position: absolute;
    top: 0;
    left: 0;
    overflow: visible;
}

.graph-edge {
    fill: none;
    stroke: var(--ink);
    stroke-opacity: 0.5;
    stroke-width: 1.3px;
}

.graph-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: 1.4px solid var(--muted);
    border-radius: 5px;
    padding: 4px 10px;
    font-family: inherit;
    color: var(--ink);
    cursor: pointer;
    text-align: center;
    line-height: 1.25;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, background 0.15s ease;
}

.graph-node:hover {
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.graph-node__name {
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.graph-node__year {
    font-size: 10px;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
}

.graph-node--synthesized {
    background: var(--accent-light);
    border-color: var(--accent);
    border-width: 1.6px;
}

.graph-node--synthesized::after {
    content: "";
    position: absolute;
    top: -4px;
    right: -4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.graph-node--synthesized:hover {
    background: var(--accent-light);
}

.graph-node--drafted {
    background: var(--accent-faint);
    border-color: var(--accent-line);
}

.graph-node--active {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 4px 14px rgba(26, 20, 16, 0.15);
}

.graph-controls {
    position: absolute;
    bottom: 16px;
    right: 18px;
    display: flex;
    gap: 10px;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    z-index: 3;
}

.graph-controls button {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 5px 9px;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: var(--ink-soft);
    cursor: pointer;
}

.graph-controls button:hover { color: var(--ink); border-color: var(--muted); }

@media (max-width: 600px) {
    .graph-intro {
        top: 92px;
        left: 20px;
        right: 20px;
        max-width: none;
        max-height: calc(100vh - 120px);
    }

    .graph-intro__header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        cursor: pointer;
    }

    .graph-intro__title { font-size: 1.3rem; margin-bottom: 0; }

    .graph-intro__toggle-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 20px;
        height: 20px;
        font-size: 18px;
        line-height: 1;
        color: var(--accent);
    }

    .graph-intro__toggle-icon::before { content: "+"; }
    .graph-intro__header[aria-expanded="true"] .graph-intro__toggle-icon::before { content: "\2212"; }

    .graph-intro__details {
        display: none;
        margin-top: 12px;
    }

    .graph-intro.is-open .graph-intro__details { display: block; }
}

.paper-card {
    position: absolute;
    z-index: 5;
    width: min(280px, 84vw);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(26, 20, 16, 0.18);
    padding: 16px 18px 18px;
    text-align: left;
}

.paper-card__close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: none;
    font-size: 15px;
    line-height: 1;
    color: var(--ink-soft);
    cursor: pointer;
    padding: 4px;
}

.paper-card__close:hover { color: var(--ink); }

.paper-card__title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 22px 4px 0;
}

.paper-card__meta {
    font-size: 11px;
    color: var(--ink-soft);
    letter-spacing: 0.03em;
    margin: 0 0 10px;
}

.paper-card__note {
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--ink);
    font-weight: 300;
    margin: 0 0 12px;
}

.paper-card__status {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0;
}

.paper-card__link {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
    padding-bottom: 3px;
    color: var(--ink);
}

