/* showcase-paper.css
   Paper/cream theme overlay for the Gallery (project.html), aligned with the
   Fraunces + Inter Tight + JetBrains Mono palette used on index.html.
   ONLY applies when data-theme="light" so dark mode keeps showcase.css defaults.
*/

:root[data-theme="light"] {
    /* Surface tokens — match index2-theme.css palette */
    --bg0: #f5f1e8;
    --bg1: #ece5d7;

    --card: #fbf8f1;
    --card2: #fffdf6;

    --surface: var(--card);
    --surface2: var(--card2);

    --text: #101216;
    --muted: #5d6573;

    --border: rgba(16, 18, 22, 0.14);
    --borderStrong: rgba(16, 18, 22, 0.24);

    --shadow: 0 14px 42px rgba(16, 18, 22, 0.12);

    --chipBg: linear-gradient(180deg, #fffdf6 0%, #f1ead7 100%);
    --chipBgHover: linear-gradient(135deg, #c5372d 0%, #e0563d 100%);
    --chipBgOn: linear-gradient(135deg, #101216 0%, #2f7a72 100%);

    --pillBg: linear-gradient(180deg, #fffdf6 0%, #f1ead7 100%);
    --searchBg: #fffdf6;

    --backdrop: rgba(16, 18, 22, 0.55);

    --modalBg:
        radial-gradient(900px 600px at 15% 10%, rgba(197, 55, 45, 0.10), transparent 55%),
        radial-gradient(800px 600px at 85% 25%, rgba(199, 154, 58, 0.10), transparent 60%),
        radial-gradient(800px 700px at 60% 95%, rgba(47, 122, 114, 0.08), transparent 55%),
        linear-gradient(180deg, #fbf8f1 0%, #f5f1e8 100%);

    --bgFx1: radial-gradient(900px 700px at 15% 10%, rgba(197, 55, 45, 0.16), transparent 60%);
    --bgFx2: radial-gradient(900px 700px at 85% 25%, rgba(199, 154, 58, 0.16), transparent 65%);
    --bgFx3: radial-gradient(900px 900px at 60% 95%, rgba(47, 122, 114, 0.10), transparent 60%);
}

/* Paper-grain overlay (light mode only) */
:root[data-theme="light"] body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99;
    opacity: 0.18;
    mix-blend-mode: multiply;
    background-image: radial-gradient(rgba(0, 0, 0, 0.07) 0.5px, transparent 0.5px);
    background-size: 4px 4px;
}

/* ── Typography (applies regardless of theme so dark mode keeps the fonts) ── */
html, body {
    font-family: 'Inter Tight', 'Open Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Account for fixed bootstrap navbar */
body { padding-top: 60px; }

/* Hide the showcase-internal theme toggle since we use the shared dark-mode-toggle in the navbar now */
.topRight .themeToggle { display: none; }

/* Constrain Gallery sections to bootstrap container width */
.top,
.gridWrap,
main {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

/* Header / brand row — flat, no card, blends with page bg */
.top {
    padding-top: 18px;
    padding-bottom: 10px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.brand { display: none !important; }

/* Search bar */
.searchWrap { gap: 10px; }
.searchWrap .search {
    font-size: 13.5px !important;
    padding: 9px 14px !important;
    border-radius: 8px !important;
}
.searchWrap .hitCount {
    font-size: 11px !important;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.05em;
}

/* Filter chip pills */
.filterRow { gap: 8px; }
.chipGroup { gap: 5px; }
.chipGroup .chip {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 9.5px !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase;
    padding: 4px 9px !important;
    border-radius: 999px !important;
    gap: 4px;
    line-height: 1.3;
}

/* Toggles and buttons */
.toggles { gap: 12px; }
.toggles label,
.toggles .toggle,
.toggles .btn {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 10px !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase;
}

/* Card grid */
.grid { gap: 14px !important; }

/* Cards: cream paper card with serif title */
:root[data-theme="light"] .card {
    background: var(--card) !important;
    border: 1px solid rgba(16, 18, 22, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 2px 10px rgba(16,18,22,0.05) !important;
}
:root[data-theme="light"] .card:hover {
    border-color: rgba(197, 55, 45, 0.35) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 12px 26px rgba(16,18,22,0.12) !important;
}

.cardBody { padding: 12px 13px 13px !important; }
.cardTitle {
    font-family: 'Inter Tight', sans-serif !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    line-height: 1.32 !important;
    letter-spacing: -0.005em !important;
    margin-bottom: 6px !important;
}
.authorsLine { font-size: 11.5px !important; line-height: 1.4; margin-bottom: 8px !important; }

.metaRow .chip,
.cardBody .chip {
    font-family: 'JetBrains Mono', monospace !important;
    font-size: 8.5px !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase;
    padding: 2px 6px !important;
    border-radius: 999px !important;
}

/* Card hero: slightly shorter, cleaner gradient on light */
.hero { height: 160px !important; }
.dense .hero { height: 96px !important; }
:root[data-theme="light"] .hero::after {
    background:
        linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.32)) !important;
}

/* Footer + cardHint legibility */
.cardHint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.brand .title,
h1, h2, h3, h4 {
    font-family: 'Fraunces', Georgia, serif !important;
    font-weight: 450;
    letter-spacing: -0.01em;
}

.brand .title { font-size: 28px; font-weight: 500; }
.brand .subtitle {
    font-family: 'Inter Tight', sans-serif;
    font-size: 14px;
}

/* ── Light theme component overrides ──────────────────────── */

:root[data-theme="light"] .chipGroup .chip,
:root[data-theme="light"] .pill,
:root[data-theme="light"] .btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid rgba(16, 18, 22, 0.14);
    background: linear-gradient(180deg, #fffdf6 0%, #f1ead7 100%);
    color: var(--text);
    transition: transform .18s ease, background .22s ease, color .2s ease, box-shadow .2s ease;
    box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 2px 4px rgba(16,18,22,0.05);
}

:root[data-theme="light"] .chipGroup .chip:hover,
:root[data-theme="light"] .pill:hover,
:root[data-theme="light"] .btn:hover {
    background: linear-gradient(135deg, #c5372d 0%, #e0563d 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(197,55,45,0.28);
}

:root[data-theme="light"] .chipGroup .chip[aria-pressed="true"],
:root[data-theme="light"] .chipGroup .chip.on,
:root[data-theme="light"] .chipGroup .chip.active {
    background: linear-gradient(135deg, #101216 0%, #2f7a72 100%);
    color: #fff;
    border-color: transparent;
}

/* Search bar */
:root[data-theme="light"] .searchWrap .search {
    background: #fffdf6;
    border: 1px solid rgba(16, 18, 22, 0.18);
    color: var(--text);
    font-family: 'Inter Tight', sans-serif;
    border-radius: 6px;
}
:root[data-theme="light"] .searchWrap .search::placeholder { color: var(--muted); }
:root[data-theme="light"] .searchWrap .search:focus {
    border-color: rgba(197, 55, 45, 0.5);
    box-shadow: 0 0 0 3px rgba(197, 55, 45, 0.12);
}

/* Cards in the grid */
:root[data-theme="light"] .card,
:root[data-theme="light"] .tile,
:root[data-theme="light"] .gridItem {
    background: var(--card);
    border: 1px solid rgba(16, 18, 22, 0.12);
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 4px 12px rgba(16,18,22,0.06);
    color: var(--text);
}
:root[data-theme="light"] .card:hover,
:root[data-theme="light"] .tile:hover,
:root[data-theme="light"] .gridItem:hover {
    transform: translateY(-2px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 12px 28px rgba(16,18,22,0.12);
}

/* Top bar layout polish */
:root[data-theme="light"] .top {
    border-bottom: 1px solid rgba(16, 18, 22, 0.08);
}

:root[data-theme="light"] .logoImg { filter: none; }

/* Theme toggle button */
:root[data-theme="light"] .themeToggle {
    background: linear-gradient(180deg, #fffdf6 0%, #f1ead7 100%);
    border: 1px solid rgba(16, 18, 22, 0.18);
    color: var(--text);
    border-radius: 6px;
}
:root[data-theme="light"] .themeToggle:hover {
    background: #101216;
    color: #fff;
    border-color: transparent;
}

/* ── Dark mode: just ensure readable text where defaults may miss ── */
:root[data-theme="dark"] .brand .title,
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4 {
    color: var(--text);
}
:root[data-theme="dark"] .brand .subtitle { color: var(--muted); }
:root[data-theme="dark"] .themeToggle {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
}
:root[data-theme="dark"] .themeToggle:hover {
    background: rgba(255, 255, 255, 0.14);
}
