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

:root {
    /* Bitroot Brand Colors */
    --bitroot-primary-blue: #1f76f9;
    --bitroot-dark-blue: #161d24;
    --bitroot-light-blue: #e8f1fe;
    --bitroot-pink: #fbcfd9;
    --off-white: #f5f3f2;
    --white: #ffffff;
    --black: #000000;
    --grey: #d9d9d9;
    --dark-grey: #595959;
    --light-grey: #f2f2f2;

    /* Theme Colors */
    --bg: var(--off-white);
    --bg-secondary: var(--white);
    --text-primary: var(--black);
    --text-secondary: var(--dark-grey);
    --text-muted: #888888;
    --border: var(--grey);
    --accent: var(--bitroot-primary-blue);
    --tag-bg: var(--bitroot-light-blue);
    --tag-text: var(--bitroot-primary-blue);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --max-width: 1232px;

    /* Grid Pattern */
    --grid-color: rgba(31, 118, 249, 0.06);
    --grid-size: 40px;
}

/* Dark theme — toggled via data-theme or system preference */
[data-theme="dark"] {
    --bg: #0a0a0a;
    --bg-secondary: #141414;
    --text-primary: #e5e5e5;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: #2a2a2a;
    --accent: #4a9aff;
    --tag-bg: rgba(31, 118, 249, 0.15);
    --tag-text: #6aafff;
    --grid-color: rgba(31, 118, 249, 0.03);
}

html {
    font-size: 16px;
}

body {
    font-family: 'Geist Mono', monospace;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: var(--grid-size) var(--grid-size);
    pointer-events: none;
    z-index: -1;
}


/* Pixelated floating clouds ticker */
.cloud-ticker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 45vh;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
    opacity: 0.12;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.cloud-ticker-track {
    display: flex;
    width: max-content;
    animation: cloud-scroll 60s linear infinite;
}

.cloud-ticker-track svg {
    flex-shrink: 0;
}

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

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
    background-color: rgba(245, 243, 242, 0.9);
}

[data-theme="dark"] .header {
    background-color: rgba(10, 10, 10, 0.9);
}

.nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 28px;
    width: auto;
}

.logo:hover {
    opacity: 0.8;
}
.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--bitroot-primary-blue);
}

.nav-link.active {
    color: var(--bitroot-primary-blue);
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 5px 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.2s, border-color 0.2s;
    font-family: inherit;
    line-height: 1;
}

.theme-toggle:hover {
    color: var(--bitroot-primary-blue);
    border-color: var(--bitroot-primary-blue);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    width: 16px;
    height: 16px;
}

/* Show moon in light mode, sun in dark mode */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Hero */
.hero {
    padding: var(--spacing-3xl) var(--spacing-xl) var(--spacing-2xl);
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    position: relative;
}

/* Blue accent decoration */
.hero::before {
    content: '';
    position: absolute;
    top: 20px;
    right: var(--spacing-xl);
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--bitroot-primary-blue) 0%, transparent 70%);
    opacity: 0.1;
    border-radius: 50%;
    pointer-events: none;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.hero-content h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--bitroot-primary-blue);
    margin-top: var(--spacing-sm);
    border-radius: 2px;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-md);
}

/* Showcase Grid */
.showcase {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-xl) var(--spacing-3xl);
    width: 100%;
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--spacing-xl);
}

/* Featured Post */
.featured-post {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

/* Progress bar */
.featured-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.06);
    z-index: 10;
    overflow: hidden;
}

[data-theme="dark"] .featured-progress {
    background: rgba(255, 255, 255, 0.06);
}

.featured-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--bitroot-primary-blue), var(--bitroot-pink));
    border-radius: 0 2px 2px 0;
    animation: progressFill 6000ms linear forwards;
}

@keyframes progressFill {
    from { width: 0%; }
    to { width: 100%; }
}

.featured-post::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--bitroot-primary-blue), var(--bitroot-pink));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-post {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease, opacity 0.3s ease;
}

.featured-post.fade-out {
    opacity: 0;
}

.featured-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(31, 118, 249, 0.12);
    border-color: var(--bitroot-primary-blue);
}

.featured-post:hover::before {
    opacity: 1;
}

.featured-post .post-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}

/* Video container */
.featured-post .video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.featured-post .video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video play button */
.video-play-btn {
    position: absolute;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.video-play-btn:hover {
    background: var(--bitroot-primary-blue);
    border-color: var(--bitroot-primary-blue);
    transform: scale(1.1);
}

.video-play-btn svg {
    margin-left: 3px;
}

/* Video mute button */
.video-mute-btn {
    position: absolute;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.video-mute-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: white;
}

.featured-post .post-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, rgba(0,0,0,0.1));
    pointer-events: none;
}

.featured-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-post:hover .post-image img {
    transform: scale(1.05);
}

.featured-post .post-content {
    padding: var(--spacing-xl);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.post-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}

.post-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

.post-excerpt {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

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

.read-time {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.read-more {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bitroot-primary-blue);
    transition: opacity 0.2s ease;
}

.read-more:hover {
    opacity: 0.7;
}

/* Post List */
.post-list {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.list-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bitroot-primary-blue);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--bitroot-light-blue);
    margin-bottom: var(--spacing-md);
}

.list-item {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
    margin: 0 calc(-1 * var(--spacing-sm));
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}

.list-item:hover {
    background: var(--tag-bg);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item.active {
    background: var(--tag-bg);
}

.list-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 2px;
    font-weight: 500;
}

.list-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.list-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bitroot-primary-blue);
}

.list-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.list-read-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Pagination */
.pagination-container {
    margin-top: var(--spacing-2xl);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg) 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bitroot-light-blue);
    border-color: var(--bitroot-primary-blue);
    color: var(--bitroot-primary-blue);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn svg {
    flex-shrink: 0;
}

.pagination-info {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.pagination-info strong {
    color: var(--bitroot-primary-blue);
    font-weight: 600;
}

@media (max-width: 600px) {
    .pagination {
        gap: var(--spacing-sm);
    }

    .pagination-btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.875rem;
    }

    .pagination-btn span {
        display: none;
    }

    .pagination-info {
        font-size: 0.875rem;
    }
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    margin-top: auto;
    background: var(--bg-secondary);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--bitroot-primary-blue);
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    text-align: center;
}

.terminal {
    background: #1a1a2e;
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    font-family: 'Geist Mono', 'SF Mono', 'Monaco', monospace;
}

.terminal-header {
    background: #16213e;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27ca40; }

.terminal-title {
    margin-left: var(--spacing-md);
    color: #8892b0;
    font-size: 0.75rem;
}

.terminal-body {
    padding: var(--spacing-lg);
    color: #a0f0a0;
    font-size: 0.875rem;
    line-height: 1.6;
    min-height: 280px;
}

.ascii-art {
    color: var(--bitroot-primary-blue);
    font-size: 0.65rem;
    line-height: 1.2;
    margin-bottom: var(--spacing-lg);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.terminal-line {
    margin: var(--spacing-xs) 0;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.terminal-line:nth-child(2) { animation-delay: 0.5s; }
.terminal-line:nth-child(3) { animation-delay: 1.2s; }
.terminal-line:nth-child(4) { animation-delay: 1.8s; }
.terminal-line:nth-child(5) { animation-delay: 2.5s; }
.terminal-line:nth-child(6) { animation-delay: 3s; }

.prompt {
    color: #50fa7b;
    margin-right: var(--spacing-sm);
}

.command {
    color: #f8f8f2;
}

.output {
    color: #8892b0;
    padding-left: 1.2rem;
}

.error {
    color: #ff5f56;
}

.cursor {
    color: #50fa7b;
    animation: blink 1s infinite;
}

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

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

.empty-message {
    margin-top: var(--spacing-xl);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.empty-submessage {
    margin-top: var(--spacing-sm);
    font-size: 1rem;
    color: var(--text-muted);
}

/* ============================================
   Sunrise Intro Overlay
   ============================================ */

/* Overlay: fullscreen, centered */
.sunrise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    opacity: 1;
    transition: opacity 0.7s ease;
}

/* Hidden by default; shown only when intro-active */
html:not(.intro-active) .sunrise-overlay {
    display: none;
}

/* Fade out when done */
.sunrise-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Scene layout */
.sunrise-scene {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Radial glow behind sun */
.sunrise-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 118, 249, 0.18) 0%, rgba(31, 118, 249, 0.05) 45%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: glowExpand 1.8s ease-out 0.1s forwards;
    pointer-events: none;
}

@keyframes glowExpand {
    0%   { transform: translate(-50%, -50%) scale(0.1); opacity: 0; }
    50%  { opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Sun + rays container */
.sunrise-sun-wrapper {
    position: relative;
    width: min(300px, 65vw);
    height: min(300px, 65vw);
    z-index: 1;
    opacity: 0;
    transform: translateY(50px) scale(0.92);
    animation: sunRise 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

@keyframes sunRise {
    0%   { opacity: 0; transform: translateY(50px) scale(0.92); }
    30%  { opacity: 1; }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Both SVGs fill the wrapper */
.sunrise-sun-svg,
.sunrise-rays-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Sun circle */
.sunrise-sun-svg {
    z-index: 2;
}

/* Rays: burst outward from center */
.sunrise-rays-svg {
    z-index: 1;
    fill: #1f76f9;
    opacity: 0;
    transform: scale(0.45);
    transform-origin: center center;
    animation: raysBurst 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

@keyframes raysBurst {
    0%   { opacity: 0; transform: scale(0.45); }
    40%  { opacity: 0.7; }
    100% { opacity: 0.55; transform: scale(1); }
}

/* Gentle pulse on the whole sun after rise */
.sunrise-sun-svg {
    animation: sunGlow 1.6s ease-in-out infinite alternate 1.3s;
}

@keyframes sunGlow {
    0%   { filter: drop-shadow(0 0 0px rgba(31, 118, 249, 0)); }
    100% { filter: drop-shadow(0 0 24px rgba(31, 118, 249, 0.35)); }
}

/* Sun spins away when overlay fades */
.sunrise-sun-wrapper.spin-away {
    animation: spinAway 0.7s cubic-bezier(0.55, 0, 1, 0.45) forwards !important;
}

.sunrise-sun-wrapper.spin-away .sunrise-rays-svg {
    animation: raysDissolve 0.5s ease-out forwards !important;
}

@keyframes spinAway {
    0%   { transform: rotate(0deg) scale(1); opacity: 1; }
    100% { transform: rotate(200deg) scale(0.2); opacity: 0; }
}

@keyframes raysDissolve {
    0%   { opacity: 0.55; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.5); }
}

/* Greeting text */
.sunrise-greeting {
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    animation: greetReveal 0.6s ease forwards 1s;
    z-index: 2;
    margin-top: 24px;
}

@keyframes greetReveal {
    to { opacity: 1; transform: translateY(0); }
}

.sunrise-greeting-text {
    font-family: 'Geist Mono', monospace;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 500;
    color: var(--text-primary);
    display: block;
}

.sunrise-greeting-sub {
    display: block;
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 0.08em;
}

/* ============================================
   Content Reveal (after intro)
   ============================================ */

/* While intro is active, page content is invisible */
html.intro-active .header,
html.intro-active .hero,
html.intro-active .showcase,
html.intro-active .cloud-ticker,
html.intro-active .footer {
    opacity: 0;
}

/* Staggered slide-in after overlay fades */
html.intro-reveal .cloud-ticker {
    animation: cloudsReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

html.intro-reveal .header {
    animation: revealUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cloudsReveal {
    from { opacity: 0; }
    to   { opacity: 0.12; }
}

html.intro-reveal .hero {
    animation: revealUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.06s forwards;
}

html.intro-reveal .showcase {
    opacity: 1 !important;
}

html.intro-reveal .showcase .featured-post {
    opacity: 0;
    animation: cardSlideIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}

html.intro-reveal .showcase .post-list {
    opacity: 0;
    animation: cardSlideIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
}

html.intro-reveal .showcase .pagination-container {
    opacity: 0;
    animation: revealUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.32s forwards;
}

html.intro-reveal .footer {
    animation: revealUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

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

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

/* Accessibility: skip animations */
@media (prefers-reduced-motion: reduce) {
    .sunrise-overlay { display: none !important; }
    html.intro-active .header,
    html.intro-active .hero,
    html.intro-active .showcase,
    html.intro-active .cloud-ticker,
    html.intro-active .footer { opacity: 1; }
}

/* Dark-mode glow tweak */
[data-theme="dark"] .sunrise-glow {
    background: radial-gradient(circle, rgba(74, 154, 255, 0.12) 0%, rgba(74, 154, 255, 0.03) 45%, transparent 70%);
}

/* Responsive */
@media (max-width: 1000px) {
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .post-list {
        order: 1;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 15px;
    }

    .nav {
        padding: var(--spacing-md);
    }

    .hero {
        padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-xl);
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .showcase {
        padding: 0 var(--spacing-md) var(--spacing-2xl);
    }

    .featured-post .post-content {
        padding: var(--spacing-lg);
    }

    .post-list {
        padding: var(--spacing-md);
    }

    .list-item {
        grid-template-columns: 45px 1fr;
    }

    .footer-content {
        padding: var(--spacing-lg) var(--spacing-md);
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
}
