/* ===========================================================================
   unscrambled — simple episode blog
   Black background, Rubik type, a single centered reading column.
   =========================================================================== */

:root {
    --bg:        #0a0a0a;
    --bg-elev:   #141414;
    --bg-hover:  #1c1c1c;
    --border:    #262626;
    --fg:        #f5f5f5;
    --fg-mute:   #b4b4b4;
    --fg-dim:    #7a7a7a;
    --accent:    #ff5a36;
    --radius:    10px;

    /* Frosted-glass tokens */
    --glass-bg:      rgba(22, 22, 24, 0.55);
    --glass-border:  rgba(255, 255, 255, 0.10);
    --glass-blur:    14px;
    --glass-shadow:  0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--fg);
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Soft colour glows behind everything, so the frosted panels have light to
   refract. Fixed so they stay put while the page scrolls. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60% 50% at 78% 8%,  rgba(255, 90, 54, 0.16), transparent 60%),
        radial-gradient(55% 45% at 12% 92%, rgba(78, 130, 255, 0.12), transparent 60%),
        radial-gradient(45% 40% at 50% 50%, rgba(120, 120, 140, 0.05), transparent 70%);
}

/* Fade the whole page in on every load. */
body {
    opacity: 0;
    animation: fade-in 1.2s ease-in-out 0.1s forwards;
    /* Full-height column so the footer is always pinned to the bottom. */
    display: flex;
    flex-direction: column;
}
main.wrap { flex: 1 0 auto; }

@keyframes fade-in { to { opacity: 1; } }

/* Respect users who prefer no motion. */
@media (prefers-reduced-motion: reduce) {
    body { opacity: 1; animation: none; }
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 1px 5px;
}

/* --- Layout shell -------------------------------------------------------- */
.wrap {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

main.wrap { padding-top: 56px; padding-bottom: 80px; }

.site-footer {
    border-top: 1px solid var(--glass-border);
    background: rgba(10, 10, 11, 0.45);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    color: var(--fg-dim);
    font-size: 0.85rem;
    padding: 24px 0;
}

/* --- Landing page -------------------------------------------------------- */
.intro { text-align: center; margin-bottom: 48px; }
.intro .wordmark {
    font-size: 3.25rem;
    font-weight: 500;
    letter-spacing: 2px;
    margin: 0;
}
.intro .tagline { color: var(--fg-mute); margin: 10px 0 0; }
@media (max-width: 600px) { .intro .wordmark { font-size: 2.25rem; } }

.episode-list { list-style: none; margin: 0; padding: 0; }
.episode-list li { margin-bottom: 14px; }

.episode-card {
    display: block;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    padding: 18px 20px;
    color: var(--fg);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.episode-card:hover {
    text-decoration: none;
    background: rgba(32, 32, 36, 0.6);
    border-color: rgba(255, 90, 54, 0.55);
    transform: translateY(-2px);
}

.ep-number {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}
.episode-card .ep-title {
    display: block;
    font-size: 1.3rem;
    font-weight: 500;
}
.episode-card .ep-date {
    display: block;
    color: var(--fg-dim);
    font-size: 0.82rem;
    margin-top: 2px;
}
.episode-card .ep-summary {
    display: block;
    color: var(--fg-mute);
    font-size: 0.95rem;
    margin-top: 8px;
}

.empty {
    color: var(--fg-dim);
    text-align: center;
    padding: 48px 0;
}

/* --- Episode page -------------------------------------------------------- */
.back {
    display: inline-block;
    color: var(--fg-mute);
    font-size: 0.9rem;
    margin-bottom: 24px;
}
.back:hover { color: var(--accent); text-decoration: none; }

.episode-head { margin-bottom: 28px; }
.episode-head h1 {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.25;
    margin: 6px 0 0;
}
.episode-head .ep-date { color: var(--fg-dim); font-size: 0.9rem; margin: 8px 0 0; }

/* Responsive 16:9 YouTube embed */
.video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0 0 36px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}
.video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Essay typography */
.essay { font-size: 1.075rem; color: #ececec; }
.essay p { margin: 0 0 1.25em; }
.essay h2 {
    font-size: 1.35rem;
    font-weight: 500;
    margin: 2em 0 0.6em;
    color: var(--fg);
}
.essay h3 { font-size: 1.1rem; font-weight: 500; margin: 1.6em 0 0.5em; }
.essay a { text-decoration: underline; }
.essay strong { font-weight: 700; }
.essay blockquote {
    margin: 1.5em 0;
    padding: 0.4em 1.1em;
    border-left: 3px solid var(--accent);
    color: var(--fg-mute);
}
.essay img { max-width: 100%; height: auto; border-radius: var(--radius); }
.essay ul, .essay ol { margin: 0 0 1.25em; padding-left: 1.4em; }
.essay li { margin-bottom: 0.4em; }

/* --- 404 ----------------------------------------------------------------- */
.notfound { text-align: center; padding: 64px 0; }
.notfound h1 { font-weight: 500; }
