/* ============================================
   MacKenziePosts - Modern feminine design
   Palette: Dark Navy + Pinkish Red
   ============================================ */

:root {
    /* Dark navy still used for body text + mobile-toggle */
    --navy-darkest: #0d1530;
    --navy-dark: #1a2238;
    --navy: #232c4e;
    --navy-light: #2e3a64;

    /* Vermillion red — matches the cover */
    --accent: #dd3622;
    --accent-light: #ea4a36;
    --accent-soft: #f7d7d1;
    --accent-dark: #a82716;

    /* Cover's cornflower blue — used by the sidebar */
    --cover-blue: #a4b8d8;
    --cover-blue-deep: #8aa1c5;

    /* Body neutrals — back to warm cream + warm grays */
    --cream: #faf6f2;
    --white: #ffffff;
    --gray-50: #f7f5f3;
    --gray-100: #ece9e6;
    --gray-200: #d8d3ce;
    --gray-400: #8a8580;
    --gray-600: #4a4641;
    --gray-800: #1f1d1a;

    /* Typography */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Layout */
    --sidebar-width: 280px;
    --shadow-sm: 0 1px 3px rgba(13, 21, 48, 0.08);
    --shadow-md: 0 4px 16px rgba(13, 21, 48, 0.1);
    --shadow-lg: 0 12px 32px rgba(13, 21, 48, 0.12);
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: var(--cream);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--cover-blue) 0%, var(--cover-blue-deep) 100%);
    color: var(--navy-darkest);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(13, 21, 48, 0.16);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 21, 48, 0.28);
}

.sidebar-header {
    padding: 2.5rem 1.75rem 2rem;
    border-bottom: 1px solid rgba(13, 21, 48, 0.1);
}

.brand-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition);
}

.brand-link:hover {
    opacity: 0.8;
}

.brand {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--navy-darkest);
}

.brand-accent {
    color: var(--accent);
    font-style: italic;
}

.brand-tagline {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(13, 21, 48, 0.55);
    font-weight: 400;
}

/* Navigation */
.nav {
    flex: 1;
    padding: 1.5rem 1rem;
}

.nav-category {
    margin-bottom: 1.25rem;
}

.category-label {
    color: rgba(13, 21, 48, 0.5);
    padding: 0.5rem 0.875rem 0.65rem;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.category-items {
    list-style: none;
}

.nav-link {
    display: block;
    padding: 0.65rem 1.25rem 0.65rem 1.75rem;
    color: rgba(13, 21, 48, 0.72);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    border-radius: 6px;
    margin: 2px 0;
    transition: all var(--transition);
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: transparent;
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--navy-darkest);
    background: rgba(255, 255, 255, 0.35);
}

.nav-link:hover::before {
    background: rgba(221, 54, 34, 0.55);
}

.nav-link.active {
    color: var(--navy-darkest);
    background: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

.nav-link.active::before {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(221, 54, 34, 0.6);
}

.sidebar-footer {
    padding: 1.5rem 1.75rem;
    border-top: 1px solid rgba(13, 21, 48, 0.1);
    font-size: 0.75rem;
    color: rgba(13, 21, 48, 0.5);
    letter-spacing: 0.05em;
}

.v2-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--navy-darkest);
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(13, 21, 48, 0.12);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0;
    transition: background var(--transition), transform var(--transition);
}

.v2-link:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}

.v2-link svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.v2-link span:first-of-type {
    flex: 1;
}

.v2-badge {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

/* ============================================
   Main content
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 4rem 4rem 5rem;
    min-height: 100vh;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 400ms ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    margin-bottom: 3.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-100);
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
}

.page-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 500;
    color: var(--navy-dark);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
    font-weight: 300;
    font-style: italic;
}

/* ============================================
   Gallery toolbar (count + view toggle)
   ============================================ */
.gallery-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

.gallery-count {
    font-size: 0.85rem;
    color: var(--gray-400);
    font-style: italic;
}

.view-toggle {
    display: inline-flex;
    align-items: center;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.view-btn:hover {
    color: var(--navy-dark);
}

.view-btn.active {
    background: var(--white);
    color: var(--accent);
    box-shadow: 0 1px 3px rgba(13, 21, 48, 0.1);
}

/* ============================================
   Gallery
   ============================================ */
.gallery.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery.gallery-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 760px;
    margin: 0 auto;
}

.gallery.gallery-list .gallery-item {
    aspect-ratio: auto;
    width: 100%;
    border-radius: 14px;
    background: var(--gray-100);
}

.gallery.gallery-list .gallery-item img,
.gallery.gallery-list .gallery-item video {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    background: var(--gray-100);
}

.gallery.gallery-list .gallery-item:hover img,
.gallery.gallery-list .gallery-item:hover video {
    transform: none;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray-100);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    display: block;
    text-decoration: none;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.gallery-item video {
    pointer-events: none;
    background: var(--gray-200);
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.05);
}

.gallery-item-video {
    position: relative;
}

.video-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(13, 21, 48, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: transform 300ms cubic-bezier(0.34, 1.4, 0.64, 1),
                background 200ms ease;
    z-index: 5;
}

.video-play-badge svg {
    margin-left: 4px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.gallery-item-video:hover .video-play-badge {
    transform: translate(-50%, -50%) scale(1.12);
    background: rgba(220, 47, 68, 0.78);
}

.gallery-placeholder {
    grid-column: 1 / -1;
    background: var(--white);
    border: 2px dashed var(--gray-200);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--gray-400);
}

/* ============================================
   Pagination
   ============================================ */
.gallery-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

.gallery-pagination:empty {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.pg-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    color: var(--navy-dark);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition),
                border-color var(--transition),
                color var(--transition),
                transform var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.pg-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.pg-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pg-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pg-info {
    font-size: 0.85rem;
    color: var(--gray-400);
    font-style: italic;
    text-align: center;
}

.placeholder-icon {
    color: var(--accent);
    opacity: 0.5;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.gallery-placeholder p {
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
}

.gallery-placeholder code {
    background: var(--accent-soft);
    color: var(--accent-dark);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'SF Mono', Monaco, monospace;
}

/* ============================================
   Quotes
   ============================================ */
.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.quote-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem 2rem 2rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--gray-100);
}

.quote-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-soft);
}

.quote-mark {
    font-family: var(--font-serif);
    font-size: 5rem;
    line-height: 0.5;
    color: var(--accent);
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    opacity: 0.25;
}

.quote-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--navy-dark);
    line-height: 1.4;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
    white-space: pre-line;
    word-wrap: break-word;
}

.quote-author {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ============================================
   Notes
   ============================================ */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.note-card {
    text-align: left;
    cursor: pointer;
    background: var(--white);
    border-radius: 16px;
    padding: 1.65rem 1.75rem 1.25rem;
    border: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
    font-family: inherit;
    color: inherit;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 110px;
}

.note-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-soft);
}

.note-card-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navy-dark);
    line-height: 1.2;
}

.note-card-date {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-top: auto;
}

.notes-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.55rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    color: var(--navy-dark);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition);
}

.notes-back-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.note-article {
    max-width: 760px;
}

.note-body {
    font-family: var(--font-serif);
    font-size: 1.18rem;
    line-height: 1.7;
    color: var(--gray-800);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================
   Music
   ============================================ */
.music-tabs {
    display: flex;
    gap: 2.5rem;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 2rem;
}

.music-tab {
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--gray-400);
    background: transparent;
    border: none;
    padding: 0.85rem 0;
    cursor: pointer;
    position: relative;
    transition: color var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.music-tab:hover {
    color: var(--navy-dark);
}

.music-tab.active {
    color: var(--navy-dark);
}

.music-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.music-section {
    margin-bottom: 0;
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

/* Albums get wider tiles since the 352px Spotify embed shows the tracklist
   and benefits from more horizontal breathing room. */
.music-grid-albums {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.5rem;
}

.music-embed {
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    box-shadow:
        0 4px 16px rgba(13, 21, 48, 0.08),
        0 0 0 1px rgba(13, 21, 48, 0.04);
    transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.music-embed:hover {
    transform: translateY(-3px);
    box-shadow:
        0 16px 40px rgba(13, 21, 48, 0.16),
        0 0 0 1px rgba(220, 47, 68, 0.18);
}

.music-embed iframe {
    display: block;
    width: 100%;
    border: 0;
}

.music-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.78) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 18px;
    padding: 1.15rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 4px 16px rgba(13, 21, 48, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        inset 0 0 0 1px rgba(220, 47, 68, 0.04);
    position: relative;
    overflow: hidden;
    transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.music-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 30%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(220, 47, 68, 0.06) 60%,
        transparent 75%
    );
    transform: translateX(-110%);
    transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.music-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 18px 44px rgba(13, 21, 48, 0.16),
        0 0 0 1px rgba(220, 47, 68, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.music-card:hover::before {
    transform: translateX(110%);
}

.music-art {
    width: 68px;
    height: 68px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 6px 18px rgba(13, 21, 48, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.14);
    transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.music-art::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.15) 35%,
        rgba(255, 255, 255, 0.03) 70%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 3;
    border-radius: 14px 14px 0 0;
}

.music-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 60%,
        rgba(0, 0, 0, 0.2) 100%
    );
    pointer-events: none;
    z-index: 2;
    border-radius: 14px;
}

.music-card:hover .music-art {
    transform: scale(1.06);
    box-shadow:
        0 12px 28px rgba(13, 21, 48, 0.45),
        0 0 28px rgba(220, 47, 68, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.music-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

.music-art > svg {
    position: relative;
    z-index: 4;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.music-art.has-thumb {
    background: var(--gray-100);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(13, 21, 48, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
    transition: opacity 240ms ease,
                transform 240ms cubic-bezier(0.34, 1.4, 0.64, 1);
    z-index: 5;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.music-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.play-overlay svg {
    margin-left: 2px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.music-meta {
    min-width: 0;
    flex: 1;
    position: relative;
    z-index: 1;
}

.music-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--navy-dark);
    line-height: 1.2;
    margin-bottom: 0.25rem;
    transition: color 220ms ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-card:hover .music-title {
    color: var(--accent);
}

.music-artist {
    font-size: 0.85rem;
    color: var(--gray-400);
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   Mobile toggle
   ============================================ */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: var(--cover-blue);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: var(--shadow-md);
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--navy-darkest);
    border-radius: 1px;
    transition: all var(--transition);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 968px) {
    .main-content {
        padding: 4rem 2rem 4rem;
    }

    .page-title {
        font-size: 2.5rem;
    }
}

/* ============================================
   Cover page — editorial poster
   ============================================ */
.cover-body {
    --cover-blue: #a4b8d8;
    --cover-blue-deep: #8aa1c5;
    --cover-red: #dd3622;
    --cover-red-deep: #b32a18;
    background: var(--cover-blue);
    color: var(--cover-red);
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    overflow: hidden;
}

/* Film-grain overlay — SVG fractal noise multiplied onto the blue. */
.cover-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 240px 240px;
    opacity: 0.42;
    mix-blend-mode: multiply;
}

/* Subtle vignette so the corners feel like aged paper. */
.cover-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 35%,
        rgba(85, 110, 145, 0.18) 80%,
        rgba(85, 110, 145, 0.32) 100%
    );
}

.cover-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1100px;
    animation: cover-rise 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cover-rise {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cover-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--cover-red);
    opacity: 0.85;
    margin-bottom: 1.5rem;
}

.cover-brand {
    font-family: var(--font-serif);
    color: var(--cover-red);
    line-height: 0.86;
    letter-spacing: -0.035em;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cover-brand-line {
    display: block;
    font-size: clamp(4.5rem, 17vw, 13rem);
}

.cover-brand-italic {
    font-style: italic;
    font-weight: 500;
    /* Slight nudge so the italic descenders don't crowd the line above. */
    margin-top: -0.05em;
}

.cover-tagline {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-style: italic;
    color: var(--cover-red);
    opacity: 0.78;
    margin-top: 1.6rem;
    line-height: 1.5;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.cover-enter {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 3rem;
    padding: 0.9rem 2.4rem;
    font-family: var(--font-sans);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--cover-red);
    background: transparent;
    border: 1.5px solid var(--cover-red);
    border-radius: 999px;
    text-decoration: none;
    transition: background 260ms ease,
                color 260ms ease,
                transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cover-enter:hover {
    background: var(--cover-red);
    color: var(--cover-blue);
    transform: scale(1.04);
}

.cover-enter svg {
    transition: transform 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cover-enter:hover svg {
    transform: translateX(4px);
}

.cover-footer {
    position: absolute;
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--cover-red);
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.cover-footer-divider {
    opacity: 0.6;
}

@media (max-width: 600px) {
    .cover-body { padding: 2.5rem 1.5rem; }
    .cover-eyebrow { letter-spacing: 0.3em; font-size: 0.66rem; }
    .cover-tagline { padding: 0 0.5rem; }
    .cover-enter { padding: 0.85rem 2rem; }
    .cover-footer { font-size: 0.6rem; letter-spacing: 0.22em; }
}

/* ============================================
   Cover starscape — meteors + ambient sparkles
   ============================================ */
.cover-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.cover-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Meteor: a thin SVG line with a gradient that fades from transparent (tail) to
   bright white (head) plus a small bright circle as the leading dot. The whole
   SVG carries a layered drop-shadow glow so it reads as a luminous streak. */
.meteor {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    overflow: visible;
    will-change: transform, opacity;
    filter:
        drop-shadow(0 0 1.5px rgba(255, 255, 255, 1))
        drop-shadow(0 0 5px rgba(255, 248, 235, 0.85))
        drop-shadow(0 0 14px rgba(255, 220, 200, 0.45));
}

.m-1 { width: 280px; height: 6px;  animation: shoot-1 12s linear infinite -2s; }
.m-2 { width: 380px; height: 8px;  animation: shoot-2 15s linear infinite 3s; }
.m-3 { width: 200px; height: 5px;  animation: shoot-3 9s  linear infinite 6s; }
.m-4 { width: 240px; height: 6px;  animation: shoot-4 13s linear infinite 9s; }
.m-5 { width: 320px; height: 7px;  animation: shoot-5 14s linear infinite 4.5s; }

@keyframes shoot-1 {
    0%   { transform: translate(-22vw, 14vh) rotate(22deg); opacity: 0; }
    9%   { opacity: 1; }
    91%  { opacity: 1; }
    100% { transform: translate(118vw, 68vh) rotate(22deg); opacity: 0; }
}
@keyframes shoot-2 {
    0%   { transform: translate(115vw, 8vh) rotate(155deg); opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { transform: translate(-26vw, 82vh) rotate(155deg); opacity: 0; }
}
@keyframes shoot-3 {
    0%   { transform: translate(-12vw, 80vh) rotate(7deg); opacity: 0; }
    11%  { opacity: 1; }
    89%  { opacity: 1; }
    100% { transform: translate(115vw, 90vh) rotate(7deg); opacity: 0; }
}
@keyframes shoot-4 {
    0%   { transform: translate(40vw, -16vh) rotate(74deg); opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { transform: translate(72vw, 116vh) rotate(74deg); opacity: 0; }
}
@keyframes shoot-5 {
    0%   { transform: translate(-14vw, 88vh) rotate(-24deg); opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { transform: translate(118vw, 6vh) rotate(-24deg); opacity: 0; }
}

/* Ambient four-pointed sparkles: small fixed stars that twinkle gently. */
.sparkle {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
    overflow: visible;
    filter:
        drop-shadow(0 0 3px rgba(255, 255, 255, 0.95))
        drop-shadow(0 0 8px rgba(255, 240, 220, 0.5));
    animation: sparkle-twinkle 4s ease-in-out infinite;
}

.sp-1 { top: 14%; left: 18%;  width: 18px; height: 18px; animation-duration: 4.2s; animation-delay: -0.5s; }
.sp-2 { top: 22%; right: 14%; width: 12px; height: 12px; animation-duration: 3.4s; animation-delay: -1.7s; }
.sp-3 { top: 60%; left: 8%;   width: 14px; height: 14px; animation-duration: 4.8s; animation-delay: -3s; }
.sp-4 { bottom: 18%; right: 22%; width: 11px; height: 11px; animation-duration: 3.8s; animation-delay: -2.4s; }
.sp-5 { top: 9%;  left: 56%;  width: 9px;  height: 9px;  animation-duration: 5.2s; animation-delay: -1s; }
.sp-6 { bottom: 28%; left: 38%; width: 16px; height: 16px; animation-duration: 4.4s; animation-delay: -0.2s; }
.sp-7 { top: 44%; right: 30%; width: 10px; height: 10px; animation-duration: 3.6s; animation-delay: -2.8s; }
.sp-8 { bottom: 10%; left: 14%; width: 8px;  height: 8px;  animation-duration: 5s;   animation-delay: -1.4s; }

@keyframes sparkle-twinkle {
    0%, 100% { opacity: 0;   transform: scale(0.45) rotate(0deg); }
    45%, 55% { opacity: 0.95; transform: scale(1) rotate(180deg); }
}

@media (prefers-reduced-motion: reduce) {
    .meteor, .sparkle { animation: none; opacity: 0; }
}

/* ============================================
   Cursor diamond
   ============================================ */
@media (pointer: fine) {
    body,
    body *,
    body *::before,
    body *::after {
        cursor: none !important;
    }
}

.cursor-wand {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    pointer-events: none;
    z-index: 10001;
    will-change: transform, opacity;
    transform: translate3d(-100px, -100px, 0);
    opacity: 0;
    transition: opacity 220ms ease;
}

.cursor-wand.visible {
    opacity: 1;
}

.cursor-wand svg {
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
    transition: transform 140ms cubic-bezier(0.4, 0, 0.2, 1);
    filter:
        drop-shadow(0 0 6px rgba(220, 47, 68, 0.4))
        drop-shadow(0 0 2px rgba(255, 255, 255, 0.7))
        drop-shadow(0 1px 1px rgba(13, 21, 48, 0.25));
}

.cursor-wand.hovering svg {
    transform: scale(1.18);
}

.cursor-wand.clicking svg {
    transform: scale(0.82);
    transition-duration: 80ms;
}

.cursor-wand .sparkle {
    transform-origin: center;
    animation: twinkle 2.2s ease-in-out infinite;
}

.cursor-wand .sparkle-1 { animation-delay: 0s; }
.cursor-wand .sparkle-2 { animation-delay: 0.7s; animation-duration: 2.6s; }
.cursor-wand .sparkle-3 { animation-delay: 1.3s; animation-duration: 1.9s; }

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.7);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

/* ============================================
   Cursor bubbles
   ============================================ */
.bubble {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    overflow: hidden;
    --bubble-hue: 350;
    background:
        radial-gradient(
            circle at 50% 50%,
            rgba(255, 255, 255, 0.05) 0%,
            hsla(var(--bubble-hue), 75%, 65%, 0.07) 35%,
            hsla(var(--bubble-hue), 80%, 55%, 0.2) 65%,
            hsla(var(--bubble-hue), 75%, 80%, 0.45) 85%,
            rgba(255, 255, 255, 0.72) 94%,
            rgba(255, 255, 255, 0.4) 100%
        );
    box-shadow:
        inset 0 0 10px rgba(255, 255, 255, 0.45),
        inset 2px 3px 14px rgba(255, 255, 255, 0.2),
        inset -2px -3px 10px hsla(var(--bubble-hue), 80%, 50%, 0.2),
        0 0 14px hsla(var(--bubble-hue), 80%, 60%, 0.28),
        0 0 6px hsla(var(--bubble-hue), 85%, 75%, 0.3);
    will-change: transform, opacity;
    z-index: 9999;
    animation: bubble-life 1800ms cubic-bezier(0.34, 0.05, 0.56, 1) forwards;
}

.bubble::before {
    content: '';
    position: absolute;
    top: 12%;
    left: 18%;
    width: 32%;
    height: 24%;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.55) 40%,
        rgba(255, 255, 255, 0.05) 80%,
        transparent 100%
    );
    transform: rotate(-22deg);
    filter: blur(0.4px);
}

.bubble::after {
    content: '';
    position: absolute;
    top: 62%;
    right: 20%;
    width: 14%;
    height: 14%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.75) 0%,
        rgba(255, 255, 255, 0.2) 60%,
        transparent 100%
    );
    filter: blur(0.6px);
}

@keyframes bubble-life {
    0% {
        transform: scale(0.2) translate(0, 0);
        opacity: 0;
    }
    14% {
        transform: scale(1) translate(0, 0);
        opacity: 1;
    }
    72% {
        transform: scale(1.06) translate(var(--drift-x), var(--drift-y));
        opacity: 0.95;
    }
    84% {
        transform: scale(1.35) translate(var(--drift-x), var(--drift-y));
        opacity: 0.55;
    }
    100% {
        transform: scale(1.7) translate(var(--drift-x), var(--drift-y));
        opacity: 0;
    }
}

.bubble-sparkle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.5) 45%,
        transparent 100%
    );
    box-shadow:
        0 0 4px rgba(255, 255, 255, 0.95),
        0 0 8px hsla(var(--bubble-hue, 350), 85%, 75%, 0.55);
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    animation: bubble-sparkle 1100ms ease-in-out infinite;
}

.bubble-sparkle::before,
.bubble-sparkle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.95) 50%,
        transparent 100%
    );
    pointer-events: none;
}

.bubble-sparkle::before {
    width: calc(14px * var(--arm-scale, 1));
    height: 1px;
    transform: translate(-50%, -50%);
}

.bubble-sparkle::after {
    width: 1px;
    height: calc(14px * var(--arm-scale, 1));
    transform: translate(-50%, -50%);
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.95) 50%,
        transparent 100%
    );
}

@keyframes bubble-sparkle {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    40% {
        transform: translate(-50%, -50%) scale(1.2) rotate(45deg);
        opacity: 1;
    }
    60% {
        transform: translate(-50%, -50%) scale(1) rotate(90deg);
        opacity: 0.9;
    }
}

.bubble-fragment {
    position: fixed;
    pointer-events: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    --bubble-hue: 350;
    background: radial-gradient(
        circle at 35% 32%,
        rgba(255, 255, 255, 0.95) 0%,
        hsla(var(--bubble-hue), 80%, 80%, 0.65) 40%,
        hsla(var(--bubble-hue), 80%, 55%, 0.5) 75%,
        hsla(var(--bubble-hue), 80%, 50%, 0.18) 100%
    );
    box-shadow:
        0 0 5px hsla(var(--bubble-hue), 80%, 60%, 0.45),
        inset 0 0 2px rgba(255, 255, 255, 0.5);
    will-change: transform, opacity;
    z-index: 9998;
    animation: fragment-pop 650ms cubic-bezier(0.2, 0.4, 0.4, 1) forwards;
}

@keyframes fragment-pop {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.25);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .main-content {
        margin-left: 0;
        padding: 5rem 1.5rem 3rem;
    }

    .page-title {
        font-size: 2.25rem;
    }

    .quotes-grid,
    .music-grid,
    .gallery {
        grid-template-columns: 1fr;
    }
}
