@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
    --bg-dark: #0a0a0a;
    --paper-light: #f4f4f0;
    --text-main: #e0e0e0;
    --text-dim: #aaaaaa;
    --accent: #ffffff;
    --card-bg: rgba(244, 244, 240, 0.06);
    --border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* --- ATMOSPHERE --- */

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 110%; /* Slightly wider for the pan effect */
    height: 100%;
    z-index: -2;
    background: url('assets/namcha-barwa.jpeg') no-repeat 70% 30%;
    background-size: cover;
    filter: grayscale(1) contrast(1.2) brightness(0.8);
    animation: backgroundPan 120s ease-in-out infinite alternate;
}

@keyframes backgroundPan {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-5%); }
}

/* Moving Mist Layer */
.mist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    background-size: 50% 100%;
    animation: mistMove 30s linear infinite;
    pointer-events: none;
}

@keyframes mistMove {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}

/* Film Grain / Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- UI LAYOUT --- */

.ui-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 3rem;
    z-index: 10;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.top-bar, .bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.branding {
    font-weight: 500;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

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

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
}

.location, .timestamp {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- MAIN CARD --- */

.content-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    padding: 4rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paperNoise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paperNoise)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
}

.card-title {
    font-family: 'EB Garamond', serif;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.card-body {
    font-family: 'EB Garamond', serif;
    font-size: 2.5rem;
    line-height: 1.1;
    font-weight: 400;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.card-body em {
    font-style: italic;
    color: var(--accent);
}

/* --- ANIMATIONS --- */

.fade-out {
    opacity: 0;
    transform: scale(0.98) translateY(4px);
}

.fade-in {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* --- RESPONSIVE --- */

/* Tablet (landscape + portrait) */
@media (max-width: 1024px) {
    .card-body {
        font-size: 2rem;
    }
}

/* Tablet portrait / large phone */
@media (max-width: 768px) {
    .ui-layer {
        padding: 1.5rem;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .card {
        padding: 2rem;
    }

    .card-body {
        font-size: 1.8rem;
    }

    .nav {
        gap: 1.25rem;
    }
}

/* Small phone */
@media (max-width: 480px) {
    .ui-layer {
        padding: 1.25rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card-body {
        font-size: 1.5rem;
    }

    .card-title {
        margin-bottom: 1.25rem;
    }

    .nav {
        gap: 1rem;
    }

    .location, .timestamp {
        font-size: 0.65rem;
    }
}
