/* ============================================================
   monopole.wiki — Editorial Knowledge Vault
   Palette: Navy-Metallic with Marble Textures
   Layout: Layered-Depth with Glassmorphic Panels
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --silver-white: #E8ECF4;
    --cool-silver: #B0B8C8;
    --chrome: #8090A0;
    --deep-navy: #0C1020;
    --navy-mid: #1A2040;
    --metallic-gold: #C0A860;
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-blur: 12px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--deep-navy);
    color: var(--cool-silver);
    font-family: 'Source Serif 4', 'Georgia', serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.9;
    overflow-x: hidden;
    position: relative;
}

/* --- Marble Texture Background (Base Layer) --- */
#marble-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.05;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at 60% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 45%),
        linear-gradient(135deg, transparent 25%, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.04) 26%, transparent 26%),
        linear-gradient(225deg, transparent 25%, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.03) 26%, transparent 26%),
        linear-gradient(315deg, transparent 30%, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.05) 31%, transparent 31%),
        linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.02) 40%, rgba(255, 255, 255, 0.02) 41%, transparent 41%);
}

/* --- Glassmorphic Panel Mixin --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

/* --- Slide-Reveal Animation --- */
.slide-reveal {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
}

.slide-reveal.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* --- Navigation (Overlay Layer) --- */
#nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(12, 16, 32, 0.95) 0%, rgba(12, 16, 32, 0) 100%);
    transition: background 300ms ease;
}

#nav-overlay.scrolled {
    background: rgba(12, 16, 32, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-left {
    display: flex;
    align-items: baseline;
    gap: 0;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--silver-white);
    letter-spacing: 0.15em;
}

.nav-dot {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--metallic-gold);
}

.nav-ext {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: var(--chrome);
    letter-spacing: 0.15em;
}

.nav-right {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--chrome);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 300ms ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--metallic-gold);
    transition: width 300ms ease;
}

.nav-link:hover {
    color: var(--metallic-gold);
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
#hero-section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
}

.hero-content {
    max-width: 900px;
}

.hero-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 600ms 200ms ease-out forwards;
}

.hero-meta .meta-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--chrome);
    letter-spacing: 0.2em;
}

.hero-meta .meta-separator {
    color: var(--metallic-gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
}

#hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 5rem);
    color: var(--silver-white);
    letter-spacing: 0.08em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: scale(0.9);
    animation: heroTitleIn 800ms 400ms ease-out forwards;
    text-shadow: 0 0 40px rgba(232, 236, 244, 0.15);
}

.gold-dot {
    color: var(--metallic-gold);
}

.hero-subtitle {
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--cool-silver);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeInUp 600ms 700ms ease-out forwards;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    animation: fadeInUp 600ms 900ms ease-out forwards;
}

.stat-card {
    padding: 1.25rem 2rem;
    text-align: center;
    min-width: 140px;
    transition: transform 300ms ease, border-color 300ms ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(192, 168, 96, 0.3);
}

.stat-number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: var(--metallic-gold);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--chrome);
    letter-spacing: 0.15em;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    animation: fadeInUp 600ms 1200ms ease-out forwards;
}

.scroll-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--chrome);
    letter-spacing: 0.2em;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--metallic-gold), transparent);
    animation: scrollPulse 2s infinite ease-in-out;
}

/* --- Content Sections --- */
.content-section {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.section-header {
    margin-bottom: 3rem;
}

.section-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--metallic-gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: var(--silver-white);
    line-height: 1.2;
}

/* --- Entries Grid --- */
.entries-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.entry-card {
    padding: 2rem;
    transition: transform 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.entry-card:hover {
    transform: translateY(-6px);
    border-color: rgba(192, 168, 96, 0.25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.entry-category {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--metallic-gold);
    letter-spacing: 0.15em;
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(192, 168, 96, 0.3);
    border-radius: 3px;
}

.entry-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--chrome);
    letter-spacing: 0.1em;
}

.entry-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--silver-white);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    transition: color 300ms ease;
}

.entry-card:hover .entry-title {
    color: var(--metallic-gold);
}

.entry-excerpt {
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--cool-silver);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.entry-author {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--chrome);
    letter-spacing: 0.05em;
}

.entry-read-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--chrome);
    letter-spacing: 0.05em;
}

/* --- Archives Grid --- */
.archives-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.archive-card {
    padding: 2rem;
    text-align: center;
    transition: transform 300ms ease, border-color 300ms ease;
}

.archive-card:hover {
    transform: translateY(-6px);
    border-color: rgba(192, 168, 96, 0.25);
}

.archive-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.25rem;
}

.archive-icon svg {
    width: 100%;
    height: 100%;
}

.archive-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--silver-white);
    margin-bottom: 0.5rem;
}

.archive-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--metallic-gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.75rem;
}

.archive-desc {
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--chrome);
    line-height: 1.7;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 60px;
}

.timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, var(--metallic-gold), var(--glass-border), transparent);
}

.timeline-entry {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-marker {
    position: absolute;
    left: -48px;
    top: 1.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--metallic-gold);
    border: 2px solid var(--deep-navy);
    box-shadow: 0 0 12px rgba(192, 168, 96, 0.4);
}

.timeline-content {
    padding: 1.75rem;
    transition: border-color 300ms ease;
}

.timeline-content:hover {
    border-color: rgba(192, 168, 96, 0.25);
}

.timeline-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--metallic-gold);
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--silver-white);
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: var(--cool-silver);
    line-height: 1.8;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.about-main {
    padding: 2.5rem;
}

.about-text {
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: 1rem;
    color: var(--cool-silver);
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.about-text:last-child {
    margin-bottom: 0;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-card {
    padding: 1.5rem;
}

.sidebar-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--metallic-gold);
    margin-bottom: 0.5rem;
}

.sidebar-text {
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: var(--chrome);
    line-height: 1.7;
}

/* --- Footer --- */
#site-footer {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--silver-white);
    letter-spacing: 0.1em;
}

.footer-tagline {
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: 0.8rem;
    color: var(--chrome);
}

.footer-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.footer-meta .meta-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.55rem;
    color: var(--chrome);
    letter-spacing: 0.1em;
}

.footer-meta .meta-separator {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.55rem;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroTitleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 60px rgba(232, 236, 244, 0.2);
    }
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.2);
    }
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .entries-grid {
        grid-template-columns: 1fr;
    }

    .archives-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .stat-card {
        min-width: 200px;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .nav-right {
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    #nav-overlay {
        padding: 1rem 1.25rem;
    }

    .nav-right {
        gap: 0.75rem;
    }

    .nav-link {
        font-size: 0.6rem;
    }

    .archives-grid {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 4rem 1.25rem;
    }

    .timeline {
        padding-left: 40px;
    }

    .timeline-line {
        left: 10px;
    }

    .timeline-marker {
        left: -36px;
    }

    .footer-meta {
        flex-wrap: wrap;
        justify-content: center;
    }
}
