/* ==========================================================================
   hwaklyul.com  —  a catalogue of drowned knowledge
   drowned-library / dark-academia / subaquatic bento grid
   ========================================================================== */

:root {
    /* Palette — exact hex values from DESIGN.md */
    --void: #0a0812;            /* Abyssal Black — background void */
    --ink-pool: #12101e;        /* Ink Pool — bento cell surface */
    --neon-cyan: #00ffc8;       /* Electric Cyan — primary neon */
    --neon-magenta: #ff2d7b;    /* Neon Magenta — secondary neon */
    --ultraviolet: #8b5cf6;     /* Ultraviolet — tertiary neon */
    --lavender-ash: #c8bfc8;    /* Lavender Ash — body text */
    --parchment-glow: #e8e0d0;  /* Parchment Glow — headline text */
    --amber-ink: #d4a574;       /* Amber Ink — scholarly warm accent */

    /* Derived tonal layers */
    --cell-bg: rgba(10, 8, 18, 0.85);
    --cell-border: rgba(0, 255, 200, 0.12);
    --cell-border-hover: rgba(0, 255, 200, 0.30);

    /* Signature ultraviolet-bloom gradient */
    --page-gradient: linear-gradient(135deg, #0a0812 0%, #12101e 40%, rgba(139, 92, 246, 0.08) 100%);

    /* Typography */
    --font-display: "Playfair Display", "Lora", Georgia, serif;
    --font-body: "Lora", Georgia, "Times New Roman", serif;
    --font-mono: "IBM Plex Mono", "Menlo", "Courier New", monospace;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background: var(--void);
}

body {
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.72;
    color: var(--lavender-ash);
    background: var(--page-gradient);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
    /* Slow hue rotate — 360deg over 120s — imperceptible color drift */
    animation: hue-drift 120s linear infinite;
}

@keyframes hue-drift {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ---------- Wet-paper noise overlay ---------- */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.85  0 0 0 0 0.80  0 0 0 0 0.90  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    background-size: 220px 220px;
}

/* ---------- Bubble particle field ---------- */
.bubble-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.bubble {
    position: fixed;
    left: var(--x);
    bottom: -120px;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(0, 255, 200, 0.08) 0%,
        rgba(139, 92, 246, 0.04) 50%,
        transparent 70%);
    border: 1px solid rgba(0, 255, 200, 0.06);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    animation: float-up var(--duration) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    pointer-events: none;
    will-change: transform, opacity;
}

@keyframes float-up {
    0% {
        transform: translate3d(0, 0, 0) scale(0.9);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
    }
    50% {
        transform: translate3d(12px, -55vh, 0) scale(1.05);
        opacity: 0.7;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translate3d(-16px, -112vh, 0) scale(1);
        opacity: 0;
    }
}

/* ---------- Scholarly glyph navigation ---------- */
.nav-glyph {
    position: fixed;
    top: clamp(1rem, 2vw, 1.75rem);
    right: clamp(1rem, 2vw, 1.75rem);
    width: 52px;
    height: 52px;
    padding: 10px;
    background: rgba(10, 8, 18, 0.72);
    border: 1px solid var(--cell-border);
    border-radius: 50%;
    color: var(--neon-cyan);
    cursor: pointer;
    z-index: 60;
    transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
    box-shadow: 0 0 22px rgba(0, 255, 200, 0.08);
}

.nav-glyph svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 6px rgba(0, 255, 200, 0.4));
}

.nav-glyph:hover {
    transform: translateY(-2px) rotate(-3deg);
    border-color: var(--cell-border-hover);
    box-shadow: 0 0 34px rgba(0, 255, 200, 0.18);
}

/* ---------- Table of contents overlay ---------- */
.toc-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: min(520px, 100%);
    height: 100vh;
    background:
        linear-gradient(135deg, rgba(18, 16, 30, 0.98) 0%, rgba(10, 8, 18, 0.98) 100%),
        var(--ink-pool);
    border-left: 1px solid var(--cell-border);
    box-shadow: -24px 0 64px rgba(0, 0, 0, 0.6);
    transform: translateX(100%);
    transition: transform 400ms ease-out;
    z-index: 80;
    padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem);
    overflow-y: auto;
}

.toc-overlay.is-open {
    transform: translateX(0);
}

.toc-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid var(--cell-border);
    border-radius: 50%;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: color 300ms ease, border-color 300ms ease, transform 300ms ease;
}

.toc-close:hover {
    color: var(--neon-magenta);
    border-color: var(--neon-magenta);
    transform: rotate(90deg);
}

.toc-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    margin: 0 0 1rem;
}

.toc-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: var(--parchment-glow);
    margin: 0 0 2.5rem;
    text-shadow: 0 0 20px rgba(0, 255, 200, 0.15);
}

.toc-list {
    list-style: none;
    margin: 0 0 3rem;
    padding: 0;
    counter-reset: folio;
}

.toc-list li {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(212, 165, 116, 0.18);
}

.toc-roman {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: var(--amber-ink);
    min-width: 3rem;
    flex-shrink: 0;
    text-transform: uppercase;
}

.toc-entry {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--lavender-ash);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 280ms ease, letter-spacing 280ms ease;
}

.toc-entry:hover {
    color: var(--neon-cyan);
    letter-spacing: 0.05em;
}

.toc-footer {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--amber-ink);
    text-align: center;
    opacity: 0.75;
    margin: 0;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem clamp(1.5rem, 4vw, 4rem) 4rem;
    text-align: center;
    z-index: 5;
}

.hero-inner {
    animation: hero-float 6s ease-in-out infinite;
    max-width: 960px;
}

@keyframes hero-float {
    0%, 100% { transform: translateY(-6px); }
    50%      { transform: translateY(6px); }
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 1.12;
    letter-spacing: 0.03em;
    color: var(--parchment-glow);
    text-shadow:
        0 0 20px rgba(0, 255, 200, 0.15),
        0 0 60px rgba(139, 92, 246, 0.08);
    margin: 0;
    display: inline-block;
}

.hero-title span {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    animation: letter-surface 900ms cubic-bezier(0.22, 0.8, 0.32, 1) forwards;
    animation-delay: calc(800ms + var(--i) * 80ms);
}

@keyframes letter-surface {
    0%   { opacity: 0; transform: translateY(14px); filter: blur(4px); }
    60%  { opacity: 0.8; filter: blur(0.5px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.hero-sub {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    margin: 2rem 0 0.75rem;
    opacity: 0;
    animation: hero-sub-in 800ms ease-out forwards;
    animation-delay: 2000ms;
}

.hero-meta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--amber-ink);
    opacity: 0;
    margin: 0;
    animation: hero-sub-in 800ms ease-out forwards;
    animation-delay: 2400ms;
}

@keyframes hero-sub-in {
    0%   { opacity: 0; transform: translateY(8px); }
    100% { opacity: 0.85; transform: translateY(0); }
}

.hero-chevron {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--neon-magenta);
    opacity: 0;
    pointer-events: none;
    transition: opacity 600ms ease;
}

.hero-chevron.is-visible {
    opacity: 0.85;
    animation: chevron-pulse 2.2s ease-in-out infinite;
}

.hero-chevron svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 10px rgba(255, 45, 123, 0.5));
}

.chevron-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--neon-magenta);
}

@keyframes chevron-pulse {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
    50%      { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ---------- Archive main ---------- */
.archive {
    position: relative;
    z-index: 5;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 4rem);
    padding-top: clamp(0.5rem, 2vw, 2rem);
}

/* ---------- Bento grid ---------- */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

/* ---------- Cell base ---------- */
.cell {
    position: relative;
    background: var(--cell-bg);
    border: 1px solid var(--cell-border);
    border-radius: 6px;
    padding: clamp(1.25rem, 2vw, 1.9rem);
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 500ms cubic-bezier(0.22, 0.8, 0.32, 1),
        transform 300ms ease,
        box-shadow 300ms ease,
        border-color 300ms ease;
    isolation: isolate;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.cell.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 500ms cubic-bezier(0.22, 0.8, 0.32, 1),
        transform 500ms cubic-bezier(0.22, 0.8, 0.32, 1),
        box-shadow 300ms ease,
        border-color 300ms ease;
    transition-delay: calc(var(--stagger, 0) * 120ms);
}

/* Water-light ripple distortion inside each cell */
.cell::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 255, 200, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    box-shadow: inset 0 0 30px rgba(0, 255, 200, 0.04);
    animation: cell-ripple 9s ease-in-out infinite;
    z-index: 0;
    opacity: 0.9;
}

@keyframes cell-ripple {
    0%, 100% {
        border-radius: 6px;
        box-shadow: inset 0 0 30px rgba(0, 255, 200, 0.04);
    }
    33% {
        border-radius: 10px 6px 12px 8px;
        box-shadow: inset 0 0 40px rgba(139, 92, 246, 0.06);
    }
    66% {
        border-radius: 8px 12px 6px 10px;
        box-shadow: inset 0 0 34px rgba(0, 255, 200, 0.07);
    }
}

.cell > * {
    position: relative;
    z-index: 2;
}

.cell:hover {
    transform: translateY(-3px);
    border-color: var(--cell-border-hover);
    box-shadow:
        0 10px 34px rgba(0, 0, 0, 0.55),
        0 0 24px rgba(0, 255, 200, 0.12),
        inset 0 0 40px rgba(0, 255, 200, 0.04);
}

/* Ripple generated on click (injected span) */
.click-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    margin-top: -7px;
    background: radial-gradient(circle,
        rgba(0, 255, 200, 0.45) 0%,
        rgba(0, 255, 200, 0.18) 40%,
        transparent 70%);
    transform: scale(0);
    opacity: 0.5;
    animation: ripple-out 600ms ease-out forwards;
    z-index: 3;
}

@keyframes ripple-out {
    0%   { transform: scale(0); opacity: 0.5; }
    100% { transform: scale(12); opacity: 0; }
}

/* Grid span modifiers */
.cell--featured {
    grid-column: span 2;
    grid-row: span 2;
}

.cell--wide {
    grid-column: span 2;
}

.cell--tall {
    grid-row: span 2;
}

.cell--wide-icon {
    grid-column: span 2;
}

/* ---------- Cell: stamp (page-number catalog) ---------- */
.cell-stamp {
    position: absolute;
    top: 0.9rem;
    left: 1rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    opacity: 0.72;
    z-index: 3;
}

/* ---------- Cell: spine line ---------- */
.cell-spine {
    position: absolute;
    top: 1rem;
    bottom: 1rem;
    left: 0;
    width: 3px;
    background: var(--amber-ink);
    opacity: 0.4;
    z-index: 3;
}

.cell-spine--magenta { background: var(--neon-magenta); opacity: 0.35; }
.cell-spine--violet  { background: var(--ultraviolet);    opacity: 0.45; }
.cell-spine--amber   { background: var(--amber-ink);      opacity: 0.55; }

/* ---------- Cell: typography ---------- */
.cell--text {
    padding-top: 2.75rem;
}

.cell-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.4vw, 2.1rem);
    line-height: 1.18;
    letter-spacing: 0.02em;
    color: var(--parchment-glow);
    text-shadow: 0 0 20px rgba(0, 255, 200, 0.15);
    margin: 0 0 1rem;
}

.cell-heading--sm {
    font-size: clamp(1.15rem, 1.7vw, 1.5rem);
}

.cell-heading--md {
    font-size: clamp(1.3rem, 2vw, 1.85rem);
}

.cell--featured .cell-heading {
    font-size: clamp(1.75rem, 3vw, 2.6rem);
}

.cell-body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--lavender-ash);
    margin: 0 0 1rem;
}

.cell-body + .cell-body { margin-top: 0.25rem; }

.cell-footnote {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--amber-ink);
    margin: 1.25rem 0 0;
    opacity: 0.85;
}

/* ---------- Cell: icon ---------- */
.cell--icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    padding-top: 2.75rem;
    padding-bottom: 1.75rem;
}

.icon-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.motif {
    width: min(58%, 140px);
    height: auto;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 255, 200, 0.25));
    animation: motif-pulse 7s ease-in-out infinite;
}

.motif--wide {
    width: min(78%, 260px);
}

@keyframes motif-pulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(0, 255, 200, 0.22)); transform: translateY(0); }
    50%      { filter: drop-shadow(0 0 16px rgba(0, 255, 200, 0.42)); transform: translateY(-3px); }
}

.icon-caption {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--amber-ink);
    margin: 0;
    opacity: 0.8;
}

/* ---------- Cell: data ---------- */
.cell--data {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 2.75rem;
    padding-bottom: 1.75rem;
    text-align: center;
}

.data-value {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    line-height: 1;
    letter-spacing: 0.05em;
    color: var(--parchment-glow);
    margin: 0;
    text-shadow:
        0 0 18px rgba(0, 255, 200, 0.25),
        0 0 46px rgba(139, 92, 246, 0.15);
}

.data-value--secondary {
    color: var(--neon-cyan);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    margin-top: 0.25rem;
    opacity: 0.85;
}

.data-value--lg {
    font-size: clamp(2.6rem, 5vw, 4rem);
}

.data-value--xl {
    font-size: clamp(3.5rem, 7vw, 5.5rem);
    color: var(--neon-cyan);
    text-shadow:
        0 0 24px rgba(0, 255, 200, 0.45),
        0 0 60px rgba(0, 255, 200, 0.2);
}

.data-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--amber-ink);
    margin: 1.25rem 0 0;
    opacity: 0.85;
}

/* ---------- Cell: atmosphere ---------- */
.cell--atmo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 2.75rem;
    padding-bottom: 1.5rem;
    min-height: 220px;
}

.atmo-bubbles {
    position: relative;
    flex: 1;
    width: 100%;
    min-height: 120px;
}

.mini-bubble {
    position: absolute;
    left: var(--mx);
    top: var(--my);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        rgba(0, 255, 200, 0.25) 0%,
        rgba(139, 92, 246, 0.12) 55%,
        transparent 75%);
    border: 1px solid rgba(0, 255, 200, 0.22);
    animation: mini-float var(--md, 10s) ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 255, 200, 0.15);
}

.cell--bubbles-dense .mini-bubble {
    width: 18px;
    height: 18px;
}

@keyframes mini-float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    25%      { transform: translate(4px, -10px) scale(1.08); opacity: 1; }
    50%      { transform: translate(-6px, -22px) scale(0.95); opacity: 0.65; }
    75%      { transform: translate(8px, -14px) scale(1.1); opacity: 0.9; }
}

.atmo-pulse {
    width: 70%;
    height: 120px;
    border-radius: 40% 38% 42% 45% / 50% 48% 52% 50%;
    background: radial-gradient(ellipse at center,
        rgba(139, 92, 246, 0.65) 0%,
        rgba(139, 92, 246, 0.25) 40%,
        rgba(10, 8, 18, 0.0) 75%);
    filter: blur(8px);
    animation: atmo-pulse 4.5s ease-in-out infinite;
}

@keyframes atmo-pulse {
    0%, 100% {
        transform: scale(0.85);
        opacity: 0.55;
        background: radial-gradient(ellipse at center,
            rgba(139, 92, 246, 0.55) 0%,
            rgba(139, 92, 246, 0.2) 40%,
            transparent 75%);
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
        background: radial-gradient(ellipse at center,
            rgba(139, 92, 246, 0.8) 0%,
            rgba(0, 255, 200, 0.15) 50%,
            transparent 80%);
    }
}

.atmo-ripple {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.atmo-ripple .ring {
    position: absolute;
    inset: 40%;
    border: 1px solid var(--neon-cyan);
    border-radius: 50%;
    opacity: 0;
    animation: ring-expand 3s ease-out infinite;
    box-shadow: 0 0 12px rgba(0, 255, 200, 0.35);
}

.atmo-ripple .ring--2 { animation-delay: 1s; }
.atmo-ripple .ring--3 { animation-delay: 2s; }

@keyframes ring-expand {
    0%   { inset: 45%; opacity: 0.9; }
    100% { inset: -8%; opacity: 0; }
}

.atmo-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--amber-ink);
    margin: 1rem 0 0;
    opacity: 0.75;
}

/* ---------- Archive footer ---------- */
.archive-footer {
    margin-top: clamp(3rem, 6vw, 5rem);
    padding: 3rem 0 2rem;
    text-align: center;
    border-top: 1px solid rgba(212, 165, 116, 0.15);
}

.footer-line {
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.3em;
    color: var(--amber-ink);
    margin: 0 0 1rem;
    opacity: 0.6;
}

.footer-text {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--parchment-glow);
    font-size: 1rem;
    margin: 0 0 0.5rem;
    opacity: 0.85;
}

.footer-ref {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    margin: 0;
    opacity: 0.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .bento {
        grid-template-columns: repeat(2, 1fr);
    }
    .cell--featured { grid-column: span 2; grid-row: span 2; }
    .cell--wide,
    .cell--wide-icon { grid-column: span 2; }
    .cell--tall { grid-row: span 2; }
}

@media (max-width: 560px) {
    .bento {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(160px, auto);
    }
    .cell--featured,
    .cell--wide,
    .cell--wide-icon { grid-column: span 1; }
    .cell--tall,
    .cell--featured { grid-row: auto; }

    .hero-title { font-size: clamp(3rem, 16vw, 5rem); }

    .toc-overlay { width: 100%; }
}
