/* ===========================================
   nonri.day - Dark Academia x Retro-Futuristic
   A speculative-academic archive at 2 AM
   =========================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #020208;
    color: #B8A890;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Background Field Layer --- */
#background-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#radial-gradient-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, #0A0A1A 0%, #020208 70%);
}

/* Grid Lines Overlay */
#grid-lines {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 2s ease;
    background-image:
        linear-gradient(rgba(207, 165, 90, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(207, 165, 90, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
}

#grid-lines.visible {
    opacity: 1;
}

/* Bokeh Container */
#bokeh-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.bokeh-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(30px);
    pointer-events: none;
    will-change: transform;
}

/* --- Noise Overlay --- */
#noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* --- Perspective Container --- */
#perspective-container {
    position: relative;
    z-index: 10;
    perspective: 1200px;
    perspective-origin: 50% 40%;
    padding: 10vh 0 20vh;
}

/* --- Content Panels (Frosted Glass) --- */
.content-panel {
    max-width: 900px;
    margin: 0 auto 12vh;
    padding: 0 24px;
    opacity: 0;
    transform: translateZ(-50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.content-panel.visible {
    opacity: 1;
    transform: translateZ(0);
}

.panel-inner {
    background: rgba(15, 15, 35, 0.55); /* #0F0F23 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(207, 165, 90, 0.1);
    border-radius: 2px;
    padding: clamp(32px, 5vw, 64px);
    position: relative;
}

.panel-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(207, 165, 90, 0.3), transparent);
}

.panel-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(207, 165, 90, 0.15), transparent);
}

/* --- Hero Panel --- */
#hero-panel {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15vh;
}

#hero-panel .panel-inner {
    text-align: center;
    background: rgba(15, 15, 35, 0.35);
    padding: clamp(48px, 8vw, 96px) clamp(32px, 6vw, 80px);
}

.panel-ornament {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

.ornament-svg {
    width: 200px;
    height: 20px;
}

.domain-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(72px, 10vw, 160px);
    color: #CFA55A;
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 24px 0;
    text-shadow: 0 0 60px rgba(207, 165, 90, 0.15);
}

.tagline {
    font-family: 'IBM Plex Serif', serif;
    font-style: italic;
    font-size: clamp(14px, 2vw, 20px);
    color: #B8A890;
    opacity: 0.7;
    margin-bottom: 32px;
    letter-spacing: 0.02em;
}

.metadata-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.meta-tag {
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    color: #8B5E3C;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.meta-separator {
    color: rgba(207, 165, 90, 0.3);
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
}

/* --- Section Headings --- */
.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(28px, 4vw, 48px);
    color: #CFA55A;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.section-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, #CFA55A, transparent);
    margin-bottom: 32px;
}

/* --- Body Text --- */
.body-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(15px, 1.8vw, 17px);
    font-weight: 300;
    color: #B8A890;
    line-height: 1.8;
    margin-bottom: 24px;
    max-width: 680px;
}

/* --- Pull Quote --- */
.pull-quote {
    border-left: 2px solid rgba(207, 165, 90, 0.3);
    padding: 24px 0 24px 32px;
    margin: 40px 0 16px;
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: clamp(18px, 2.5vw, 24px);
    color: #E8DCC8;
    line-height: 1.6;
    position: relative;
}

.quote-mark {
    color: #CFA55A;
    opacity: 0.4;
    font-size: 1.3em;
}

.quote-attribution {
    display: block;
    margin-top: 16px;
    font-family: 'Space Grotesk', monospace;
    font-style: normal;
    font-size: 11px;
    color: #8B5E3C;
    letter-spacing: 0.1em;
}

/* --- Research Grid --- */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 8px;
}

.research-card {
    background: #0F0F23; background: rgba(10, 10, 26, 0.6);
    border: 1px solid rgba(207, 165, 90, 0.08);
    border-radius: 2px;
    padding: 28px;
    transition: border-color 0.4s ease, background 0.4s ease;
    position: relative;
}

.research-card:hover {
    border-color: rgba(207, 165, 90, 0.25);
    background: rgba(15, 15, 35, 0.7);
}

.card-index {
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    color: #CFA55A;
    opacity: 0.5;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 20px;
    color: #E8DCC8;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.card-description {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 300;
    color: #B8A890;
    line-height: 1.7;
    opacity: 0.8;
    margin-bottom: 20px;
}

.card-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot.active {
    background: #CFA55A;
    box-shadow: 0 0 8px rgba(207, 165, 90, 0.5);
}

.status-dot.pending {
    background: #C4652A;
    box-shadow: 0 0 8px rgba(196, 101, 42, 0.5);
}

.status-dot.archived {
    background: #8B5E3C;
    opacity: 0.5;
}

.status-text {
    font-family: 'Space Grotesk', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: #8B5E3C;
}

/* --- Catalogue List --- */
.catalogue-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.catalogue-entry {
    display: grid;
    grid-template-columns: 120px 1fr 100px;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(207, 165, 90, 0.06);
    transition: background 0.3s ease;
}

.catalogue-entry:hover {
    border-left: 2px solid #5A8CCF;
    background: rgba(207, 165, 90, 0.03);
}

.catalogue-entry:last-child {
    border-bottom: none;
}

.entry-code {
    font-family: 'Space Grotesk', monospace;
    font-size: 12px;
    color: #CFA55A;
    opacity: 0.6;
    letter-spacing: 0.05em;
}

.entry-title {
    font-family: 'IBM Plex Serif', serif;
    font-size: 15px;
    color: #E8DCC8;
    font-style: italic;
}

.entry-date {
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    color: #8B5E3C;
    text-align: right;
    letter-spacing: 0.05em;
}

/* --- Terminal Block --- */
.terminal-block {
    background: rgba(2, 2, 8, 0.8);
    border: 1px solid rgba(207, 165, 90, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 40px;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(15, 15, 35, 0.6);
    border-bottom: 1px solid rgba(207, 165, 90, 0.08);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(139, 94, 60, 0.4);
}

.terminal-dot:first-child {
    background: rgba(196, 101, 42, 0.6);
}

.terminal-title {
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    color: #8B5E3C;
    letter-spacing: 0.05em;
    margin-left: 8px;
}

.terminal-body {
    padding: 20px 24px;
}

.terminal-line {
    font-family: 'Space Grotesk', monospace;
    font-size: 13px;
    color: #B8A890;
    line-height: 2;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.terminal-line.typed {
    opacity: 1;
    transform: translateY(0);
}

.terminal-prompt {
    color: #CFA55A;
    margin-right: 8px;
}

.terminal-response {
    padding-left: 20px;
    color: #8B5E3C;
}

.terminal-highlight {
    color: #CFA55A;
}

.terminal-cursor {
    display: inline-block;
    animation: blink 1s step-end infinite;
    color: #CFA55A;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Footer --- */
.footer-info {
    text-align: center;
    padding-top: 20px;
}

.footer-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 16px;
    color: #CFA55A;
    opacity: 0.6;
    margin-bottom: 8px;
}

.footer-subtext {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #8B5E3C;
    opacity: 0.5;
    letter-spacing: 0.05em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .content-panel {
        padding: 0 16px;
        margin-bottom: 8vh;
    }

    .panel-inner {
        padding: 28px 20px;
    }

    #hero-panel .panel-inner {
        padding: 40px 24px;
    }

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

    .catalogue-entry {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .entry-date {
        text-align: left;
    }

    .metadata-line {
        gap: 8px;
    }

    .meta-tag {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    #hero-panel {
        min-height: 80vh;
    }

    .domain-title {
        font-size: clamp(48px, 15vw, 72px);
    }
}