/* =====================
   Archive Homepage
   newsletter.rayo.gg
   ===================== */

:root {
            --teal: #16EAE3;
            --pink: #F52D9E;
            --dark: #181819;
            --mid: #2a2a2b;
            --text: #e8e8e8;
            --muted: #888;
            --border: rgba(255,255,255,0.08);
            --card-bg: rgba(255,255,255,0.04);
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        html { scroll-behavior: smooth; }

        body {
            font-family: 'Bricolage Grotesque', sans-serif;
            background: var(--dark);
            color: var(--text);
            min-height: 100vh;
            overflow-x: hidden;
        }

        /* Noise texture overlay */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            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='0.04'/%3E%3C/svg%3E");
            pointer-events: none;
            z-index: 0;
            opacity: 0.5;
        }

        /* Glow blobs */
        .blob {
            position: fixed;
            border-radius: 50%;
            filter: blur(120px);
            pointer-events: none;
            z-index: 0;
        }
        .blob-1 {
            width: 500px; height: 500px;
            background: rgba(22, 234, 227, 0.06);
            top: -150px; left: -150px;
        }
        .blob-2 {
            width: 400px; height: 400px;
            background: rgba(245, 45, 158, 0.05);
            bottom: 10%; right: -100px;
        }

        /* Layout */
        .wrapper {
            position: relative;
            z-index: 1;
            max-width: 760px;
            margin: 0 auto;
            padding: 0 24px;
        }

        /* Header */
        header {
            padding: 64px 0 48px;
            border-bottom: 1px solid var(--border);
        }

        .header-eyebrow {
            font-family: 'DM Mono', monospace;
            font-size: 11px;
            letter-spacing: 0.15em;
            color: var(--teal);
            text-transform: uppercase;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .header-eyebrow::before {
            content: '';
            display: inline-block;
            width: 20px;
            height: 1px;
            background: var(--teal);
        }

        header h1 {
            font-size: clamp(36px, 6vw, 56px);
            font-weight: 800;
            line-height: 1.05;
            letter-spacing: -1.5px;
            color: #fff;
            margin-bottom: 16px;
        }

        header h1 span {
            color: var(--teal);
        }

        .header-sub {
            font-size: 16px;
            color: var(--muted);
            font-weight: 400;
            max-width: 440px;
            line-height: 1.6;
        }

        .header-meta {
            margin-top: 28px;
            display: flex;
            align-items: center;
            gap: 24px;
            flex-wrap: wrap;
        }

        .meta-item {
            font-family: 'DM Mono', monospace;
            font-size: 12px;
            color: var(--muted);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .meta-item strong {
            color: var(--text);
            font-family: 'Bricolage Grotesque', sans-serif;
            font-weight: 600;
        }

        .dot {
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: var(--border);
        }

        /* Subscribe CTA */
        .subscribe-bar {
            margin-top: 32px;
            display: flex;
            gap: 10px;
            align-items: center;
            flex-wrap: wrap;
        }

        .subscribe-bar a {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: var(--teal);
            color: var(--dark);
            font-weight: 700;
            font-size: 13px;
            padding: 10px 20px;
            border-radius: 6px;
            text-decoration: none;
            letter-spacing: -0.2px;
            transition: opacity 0.15s;
        }

        .subscribe-bar a:hover { opacity: 0.85; }

        .subscribe-bar .rayo-link {
            background: transparent;
            color: var(--muted);
            border: 1px solid var(--border);
            font-weight: 500;
        }

        .subscribe-bar .rayo-link:hover {
            color: var(--text);
            border-color: rgba(255,255,255,0.2);
            opacity: 1;
        }

        /* Archive list */
        main {
            padding: 48px 0 80px;
        }

        .archive-label {
            font-family: 'DM Mono', monospace;
            font-size: 11px;
            letter-spacing: 0.12em;
            color: var(--muted);
            text-transform: uppercase;
            margin-bottom: 24px;
        }

        .issue-list {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .issue-card {
            display: grid;
            grid-template-columns: 1fr auto;
            align-items: center;
            gap: 16px;
            padding: 20px 24px;
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 10px;
            text-decoration: none;
            color: inherit;
            transition: all 0.18s ease;
            position: relative;
            overflow: hidden;
        }

        .issue-card::before {
            content: '';
            position: absolute;
            left: 0; top: 0; bottom: 0;
            width: 3px;
            background: var(--teal);
            opacity: 0;
            transition: opacity 0.18s;
        }

        .issue-card:hover {
            background: rgba(255,255,255,0.07);
            border-color: rgba(22, 234, 227, 0.25);
            transform: translateX(2px);
        }

        .issue-card:hover::before {
            opacity: 1;
        }

        .issue-card.latest {
            background: rgba(22, 234, 227, 0.05);
            border-color: rgba(22, 234, 227, 0.2);
        }

        .issue-card.latest::before {
            opacity: 1;
        }

        .issue-left {
            display: flex;
            flex-direction: column;
            gap: 6px;
            min-width: 0;
        }

        .issue-title {
            font-size: 16px;
            font-weight: 700;
            color: #fff;
            letter-spacing: -0.3px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .issue-meta {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .issue-date {
            font-family: 'DM Mono', monospace;
            font-size: 12px;
            color: var(--muted);
        }

        .issue-tags {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .tag {
            font-size: 11px;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 4px;
            background: rgba(255,255,255,0.06);
            color: var(--muted);
            border: 1px solid var(--border);
            letter-spacing: 0.02em;
        }

        .tag.teal {
            background: rgba(22, 234, 227, 0.1);
            color: var(--teal);
            border-color: rgba(22, 234, 227, 0.2);
        }

        .tag.pink {
            background: rgba(245, 45, 158, 0.1);
            color: var(--pink);
            border-color: rgba(245, 45, 158, 0.2);
        }

        .issue-right {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
        }

        .latest-badge {
            font-family: 'DM Mono', monospace;
            font-size: 10px;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--teal);
            background: rgba(22, 234, 227, 0.1);
            border: 1px solid rgba(22, 234, 227, 0.25);
            padding: 3px 8px;
            border-radius: 4px;
        }

        .arrow {
            color: var(--muted);
            font-size: 18px;
            transition: transform 0.15s, color 0.15s;
        }

        .issue-card:hover .arrow {
            transform: translateX(3px);
            color: var(--teal);
        }

        /* Empty state for future issues */
        .pagination + .coming-soon {
            margin-top: 44px;
        }

        .coming-soon {
            margin-top: 40px;
            padding: 32px;
            border: 1px dashed var(--border);
            border-radius: 10px;
            text-align: center;
        }

        .coming-soon p {
            font-size: 14px;
            color: var(--muted);
            line-height: 1.6;
        }

        .coming-soon strong {
            color: var(--text);
        }

        /* Pagination */
        .pagination {
            margin-top: 36px;
            margin-bottom: 8px;
            padding: 28px 28px 30px;
            display: flex;
            flex-direction: column;
            gap: 22px;
            align-items: stretch;
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
        }

        .pagination-status {
            font-family: 'DM Mono', monospace;
            font-size: 13px;
            color: var(--muted);
            letter-spacing: 0.04em;
            text-align: center;
            padding: 4px 8px 0;
            line-height: 1.5;
        }

        .pagination-status strong {
            color: var(--text);
            font-weight: 600;
        }

        .pagination-actions {
            display: flex;
            align-items: stretch;
            gap: 14px;
            flex-wrap: wrap;
            justify-content: center;
            padding: 4px 0 2px;
        }

        .pagination-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 40px;
            padding: 12px 24px;
            font-family: 'Bricolage Grotesque', sans-serif;
            font-size: 14px;
            font-weight: 600;
            letter-spacing: -0.2px;
            border-radius: 8px;
            text-decoration: none;
            border: 1px solid var(--border);
            color: var(--text);
            background: rgba(255, 255, 255, 0.04);
            transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
            box-sizing: border-box;
        }

        a.pagination-btn:hover {
            border-color: rgba(22, 234, 227, 0.35);
            color: var(--teal);
            background: rgba(22, 234, 227, 0.08);
            box-shadow: 0 0 0 1px rgba(22, 234, 227, 0.12);
        }

        .pagination-btn--primary {
            border-color: rgba(22, 234, 227, 0.4);
            color: var(--teal);
            background: rgba(22, 234, 227, 0.1);
        }

        a.pagination-btn--primary:hover {
            background: rgba(22, 234, 227, 0.16);
            border-color: rgba(22, 234, 227, 0.55);
            box-shadow: 0 0 0 1px rgba(22, 234, 227, 0.2);
        }

        .pagination-btn--disabled {
            color: var(--muted);
            opacity: 0.5;
            cursor: not-allowed;
            pointer-events: none;
            user-select: none;
            padding: 12px 24px;
            background: rgba(255, 255, 255, 0.02);
            border-style: dashed;
        }

        .archive-label-page {
            font-weight: 400;
            color: var(--muted);
            text-transform: none;
            letter-spacing: 0;
            font-size: 13px;
        }

        /* Footer */
        footer {
            border-top: 1px solid var(--border);
            padding: 32px 0;
        }

        .footer-inner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 16px;
        }

        .footer-brand {
            font-weight: 700;
            font-size: 15px;
            color: #fff;
            text-decoration: none;
        }

        .footer-brand span { color: var(--teal); }

        .footer-links {
            display: flex;
            gap: 20px;
        }

        .footer-links a {
            font-size: 13px;
            color: var(--muted);
            text-decoration: none;
            transition: color 0.15s;
        }

        .footer-links a:hover { color: var(--text); }

        /* Animations */
        @keyframes fadeUp {
            from { opacity: 0; transform: translateY(16px); }
            to { opacity: 1; transform: translateY(0); }
        }

        header { animation: fadeUp 0.5s ease both; }
        .archive-label { animation: fadeUp 0.5s 0.1s ease both; }
        .issue-card:nth-child(1) { animation: fadeUp 0.4s 0.15s ease both; }
        .issue-card:nth-child(2) { animation: fadeUp 0.4s 0.2s ease both; }
        .issue-card:nth-child(3) { animation: fadeUp 0.4s 0.25s ease both; }
        .issue-card:nth-child(4) { animation: fadeUp 0.4s 0.3s ease both; }
        .issue-card:nth-child(5) { animation: fadeUp 0.4s 0.35s ease both; }

        @media (min-width: 601px) {
            .pagination {
                flex-direction: row;
                flex-wrap: wrap;
                align-items: center;
                justify-content: space-between;
                gap: 20px 24px;
                padding: 26px 32px 28px;
            }

            .pagination-status {
                text-align: left;
                padding: 0;
                flex: 1 1 auto;
                min-width: 0;
            }

            .pagination-actions {
                flex: 0 0 auto;
                justify-content: flex-end;
                padding: 0;
                gap: 12px;
            }
        }

        @media (max-width: 600px) {
            header { padding: 40px 0 32px; }
            .issue-card { padding: 16px 18px; }
            .issue-title { font-size: 14px; }
            .footer-inner { flex-direction: column; align-items: flex-start; }
            .pagination {
                padding: 24px 20px 26px;
                margin-top: 32px;
                gap: 20px;
            }
            .pagination-status {
                padding: 0 4px;
            }
            .pagination-actions {
                width: 100%;
                flex-direction: column;
                gap: 10px;
            }
            .pagination-btn {
                width: 100%;
                min-height: 44px;
                padding: 14px 20px;
            }
        }
