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

/* ===============================
   Design Tokens
   Neobrutalist — flat, hard, chunky.
   Palette kept intact.
================================ */
:root {
    --bg-dark:        #0c0c0e;
    --bg-card:        #111215;
    --bg-surface:     #16171a;
    --parchment:      #f7f3ec;
    --parchment-warm: #f0ebe1;
    --parchment-mid:  #e8e2d6;
    --ink-dark:       #1e1c18;
    --ink-body:       #2e2c28;
    --ink-muted:      #6b6560;
    --border-dark:    rgba(255,255,255,0.1);
    --border-parch:   rgba(30,28,24,0.25);
    --accent:         #8b7355;
    --accent-light:   #b8956a;
    --accent-glow:    rgba(139,115,85,0.3);
    --cyan:           #4ab8c0;
    --cyan-dim:       rgba(74,184,192,0.12);
    --rule:           rgba(30,28,24,0.25);
    --shadow-hard:    4px 4px 0 0 rgba(0,0,0,0.45);
    --shadow-accent:  4px 4px 0 0 var(--accent);
}

.site-header + * { margin-top: 0; }

/* ===============================
   Base
================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: 'Spectral', 'Georgia', serif;
    margin: 0;
    color: #d4cfc8;
    background: var(--bg-dark);
    line-height: 1.7;
    font-size: 18px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.04em;
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
}

code, pre, .tag, .project-meta, .card-tags, small,
.site-logo span, .nav-links a, .cmd-palette-trigger {
    font-family: 'JetBrains Mono', monospace;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

a:hover { color: var(--parchment); }

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 40px 24px;
}

small { color: var(--ink-muted); font-size: 0.8em; }

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

/* ===============================
   Spring Animation System
================================ */
.spring-in {
    opacity: 0;
    animation: springIn var(--spring-duration) var(--spring-easing) forwards;
}

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

.home-page .hero,
.home-page .value-grid,
.home-page .how-steps,
.home-page .cta-band {
    opacity: 0;
    animation: springIn var(--spring-duration) var(--spring-easing) both;
}

.home-page .value-card { animation-delay: 0ms; }
.home-page .value-card:nth-child(2) { animation-delay: 0.08s; }
.home-page .value-card:nth-child(3) { animation-delay: 0.16s; }
.home-page .value-card:nth-child(4) { animation-delay: 0.24s; }

.home-page .how-step { animation-delay: 0ms; }
.home-page .how-step:nth-child(2) { animation-delay: 0.08s; }
.home-page .how-step:nth-child(3) { animation-delay: 0.16s; }
.home-page .how-step:nth-child(4) { animation-delay: 0.24s; }

.home-page .cta-band { animation-delay: 0.3s; }
.hero { animation-delay: 0.05s; }

/* ===============================
   Site Header
================================ */
.site-header {
    border-bottom: 2px solid var(--accent);
    background: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #f0ebe1 !important;
    text-decoration: none !important;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-logo img { max-height: 20px; width: auto; }

.site-logo span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
}

.site-logo:hover { transform: translateY(-1px); color: var(--accent-light) !important; }

.nav-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-links a {
    color: #7a756e;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 4px 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover {
    color: var(--parchment);
    border-bottom-color: var(--accent);
}

a.focus, .focus { color: var(--cyan) !important; }

/* ===============================
   Project List Cards
================================ */
.project-list { margin-bottom: 48px; }
.project-list ul { list-style: none; padding: 0; margin: 0; }
.project-list li {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 18px 20px;
    margin: 12px 0;
    background: var(--bg-card);
    border: 2px solid var(--border-dark);
    border-radius: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
}

.project-list li:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-accent);
    border-color: var(--accent);
}

.thumb-wrap {
    flex-shrink: 0;
    width: 80px;
    height: 58px;
    border: 2px solid var(--border-dark);
    border-radius: 0;
    overflow: hidden;
    background: #1a1a1e;
}

.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.85;
    filter: sepia(0.15) contrast(1.05);
}

.project-list li:hover .thumb-img {
    transform: scale(1.06);
    opacity: 1;
    filter: sepia(0) contrast(1);
}

.card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #e8e2d6;
    margin: 0;
    letter-spacing: -0.01em;
}

.card-title a { color: #e8e2d6; text-decoration: none; }
.card-title a:hover { color: var(--parchment); text-decoration: underline; text-underline-offset: 3px; }

.card-desc {
    font-family: 'Spectral', serif;
    font-size: 15px;
    line-height: 1.5;
    color: #8a847b;
    margin: 0;
}

.card-tags .tag {
    font-size: 10px;
    color: var(--accent-light);
    background: transparent;
    border: 1.5px solid rgba(139,115,85,0.35);
    border-radius: 0;
}

/* ===============================
   Page Title / Section Header
================================ */
h1 {
    font-size: 30px;
    margin-bottom: 8px;
    color: #f0ebe1;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.section-rule {
    border: none;
    border-top: 2px solid var(--border-dark);
    margin: 14px 0 32px 0;
}

/* ===============================
   Tags
================================ */
.tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: var(--accent-light);
    background: rgba(139,115,85,0.06);
    border: 1.5px solid rgba(139,115,85,0.35);
    border-radius: 0;
    padding: 3px 9px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    display: inline-block;
}

.tag:hover {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 2px 2px 0 0 var(--accent);
    text-decoration: none !important;
}

.project-tags {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ===============================
   Featured Badge
================================ */
.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--accent);
    color: var(--bg-dark);
    border: 2px solid var(--accent-light);
    border-radius: 0;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'JetBrains Mono', monospace;
}

/* ===============================
   Back Link
================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5a5650;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 28px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.back-link:hover {
    color: var(--parchment);
    border-bottom-color: var(--accent);
}

/* ===============================
   PROJECT PAGE — Parchment Reading Panel
================================ */
.site-header + .project-content { margin-top: 0; }
.home-page { margin-top: 0; }
.project-content { margin-top: 32px; }

.project-body {
    font-family: 'Spectral', Georgia, serif;
    font-size: 18px;
    line-height: 1.8;
    max-width: 66ch;
    margin: 0 auto;
    padding: 48px 52px;
    background: var(--parchment);
    color: var(--ink-body);
    border: 2px solid var(--ink-dark);
    border-radius: 0;
    box-shadow: var(--shadow-hard);
    position: relative;
}

.project-body::before {
    content: '';
    display: block;
    width: 100%;
    height: 4px;
    background: var(--accent);
    margin-bottom: 32px;
}

.project-body h2 {
    font-size: 20px;
    margin: 36px 0 10px 0;
    color: var(--ink-dark);
    border-bottom: 2px solid var(--rule);
    padding-bottom: 6px;
    font-weight: 700;
}

.project-body h3 {
    font-size: 17px;
    margin: 28px 0 8px 0;
    color: var(--ink-dark);
    font-weight: 600;
}

.project-body p {
    margin: 0 0 18px 0;
    color: var(--ink-body);
    text-align: justify;
    hyphens: auto;
}

.project-body ul, .project-body ol {
    margin: 0 0 18px 0;
    padding-left: 28px;
    color: var(--ink-body);
}

.project-body li {
    margin: 6px 0;
    line-height: 1.65;
}

.project-body a {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    transition: color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.project-body a:hover {
    color: var(--ink-dark);
    border-bottom-color: var(--ink-dark);
}

.project-body pre, .project-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: var(--parchment-warm);
    border: 2px solid var(--ink-dark);
    border-radius: 0;
    padding: 2px 6px;
    color: var(--ink-dark);
}

.project-body pre {
    padding: 16px 20px;
    overflow-x: auto;
    border-radius: 0;
}

.editorial-note {
    margin: 36px 0 0 0;
    padding: 18px 24px;
    background: var(--parchment-warm);
    border-left: 4px solid var(--accent);
    border-radius: 0;
    border-top: 2px solid var(--parchment-mid);
    border-right: 2px solid var(--parchment-mid);
    border-bottom: 2px solid var(--parchment-mid);
    font-style: italic;
    color: var(--ink-muted);
    font-size: 16px;
    line-height: 1.6;
}

@media (max-width: 720px) {
    .project-body { padding: 28px 24px; font-size: 17px; }
}

/* ===============================
   Project Page — Hero Header
================================ */
.project-title {
    font-size: 40px;
    margin: 0 0 10px 0;
    color: #f0ebe1;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.project-meta {
    color: #5a5650;
    font-size: 11px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

.hero-image {
    margin: 24px 0 0 0;
    border: 2px solid var(--border-dark);
    border-radius: 0;
    overflow: hidden;
    background: var(--bg-dark);
}

.hero-image img { width: 100%; display: block; }

/* ===============================
   Link Buttons (project page)
================================ */
.links-section { margin: 32px 0 0 0; }

.links-section h2 {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5a5650;
    margin-bottom: 12px;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-surface);
    color: var(--accent-light);
    border: 2px solid var(--border-dark);
    border-radius: 0;
    margin: 4px 8px 4px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    text-decoration: none;
}

.link-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-accent);
}

/* ===============================
   Gallery
================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.project-gallery, .scanned-gallery, .video-gallery { margin-top: 48px; }

.project-gallery h2, .scanned-gallery h2, .video-gallery h2 {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5a5650;
    margin-bottom: 14px;
}

.video-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.video-gallery .video-card {
    aspect-ratio: 16 / 9;
    cursor: pointer;
    position: relative;
    background: var(--bg-card);
}

/* Specific overrides for Fredriksson Bouwadvies Heraldry Study video (Amsterdam project) */
.project-fredriksson-bouwadvies-heraldry-study .video-gallery .gallery-grid {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 14px;
}

.project-fredriksson-bouwadvies-heraldry-study .video-gallery .video-card {
    width: 100%;
    max-width: 500px;
    height: auto;
    background: #000000 !important;
    border: 2px solid var(--accent) !important;
    border-radius: 0;
    box-shadow: none !important;
    transform: none !important;
}

.project-fredriksson-bouwadvies-heraldry-study .video-gallery .video-card:hover {
    border-color: var(--accent-light) !important;
    transform: none !important;
    box-shadow: none !important;
}



.gallery-item {
    border: 2px solid var(--border-dark);
    border-radius: 0;
    overflow: hidden;
    background: var(--bg-card);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.gallery-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-accent);
    border-color: var(--accent);
}

.gallery-item img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    display: block;
    background: var(--bg-dark);
}

.gallery-item .gallery-item-caption {
    padding: 8px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #5a5650;
    letter-spacing: 0.04em;
    font-weight: 500;
    background: var(--bg-card);
    border-top: 2px solid var(--border-dark);
}

/* ===============================
   Authors
================================ */
.authors-list {
    margin: 10px 0 16px 0;
    color: #5a5650;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ===============================
   Lightbox
================================ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 8, 0.97);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.2s ease;
    overflow-y: auto;
}

.lightbox.visible { display: block; opacity: 1; }

.lightbox-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1100px;
    display: flex;
    gap: 0;
    align-items: stretch;
    justify-content: center;
    border: 2px solid var(--border-dark);
    background: var(--bg-card);
    box-shadow: var(--shadow-hard);
}

.lightbox-media {
    flex: 1 1 auto;
    max-width: 70%;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-dark);
}

.lightbox-main-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border: 2px solid var(--border-dark);
    background: var(--bg-card);
}

.lightbox-sidebar {
    width: 260px;
    flex: 0 0 260px;
    background: var(--parchment);
    color: var(--ink-body);
    border-left: 2px solid var(--ink-dark);
    padding: 24px;
    font-family: 'Spectral', serif;
    font-size: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lightbox-sidebar h4 {
    margin: 0 0 10px 0;
    color: var(--ink-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 2px solid var(--rule);
    padding-bottom: 8px;
    font-weight: 700;
}

.lightbox-sidebar p { margin: 0 0 20px 0; line-height: 1.6; color: var(--ink-muted); }

.lightbox-close {
    position: absolute;
    top: 18px; right: 20px;
    font-size: 42px;
    color: #5a5650;
    background: var(--bg-card);
    border: 2px solid var(--border-dark);
    border-radius: 0;
    cursor: pointer;
    line-height: 1;
    z-index: 1001;
    width: 44px; height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lightbox-close:hover { color: var(--parchment); border-color: var(--accent); transform: translate(-1px,-1px); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 42px;
    color: #5a5650;
    background: var(--bg-card);
    border: 2px solid var(--border-dark);
    border-radius: 0;
    cursor: pointer;
    padding: 14px 10px;
    z-index: 1001;
    line-height: 1;
    transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lightbox-nav:hover {
    color: var(--parchment);
    border-color: var(--accent);
    transform: translateY(-50%) translate(-1px,-1px);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-caption { color: #5a5650; font-size: 14px; margin-top: 10px; font-weight: 500; }
.lightbox-counter { color: #3a3835; font-size: 11px; margin-top: 6px; }

@media (max-width: 900px) {
    .lightbox-content {
        position: relative;
        top: 0; left: 0;
        transform: none;
        width: 100%;
        margin: 60px auto 40px auto;
        padding: 0 16px;
        flex-direction: column;
        gap: 0;
        box-sizing: border-box;
    }
    .lightbox-media { max-width: 100%; width: 100%; border-bottom: 2px solid var(--border-dark); }
    .lightbox-main-img { max-height: 50vh; }
    .lightbox-sidebar {
        width: 100%; flex: 0 0 auto;
        padding: 20px; box-sizing: border-box;
        border-left: none;
    }
}

/* ===============================
   Editorial Grid (listing page)
================================ */
.editorial-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
    margin-top: 20px;
}

.grid-card {
    background: var(--bg-card);
    border: 2px solid var(--border-dark);
    border-radius: 0;
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
    grid-column: span 12;
}

.grid-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-accent);
    border-color: var(--accent);
}

.grid-card.featured {
    background: var(--bg-surface);
    border-color: var(--accent);
}

.grid-card .project-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid var(--border-dark);
    filter: contrast(1.05);
    transition: filter 0.15s ease, opacity 0.15s ease;
    opacity: 0.9;
}

.grid-card:hover .project-thumb { opacity: 1; filter: contrast(1.1); }

.grid-card .project-title {
    font-size: 17px;
    line-height: 1.3;
    margin: 16px 20px 6px 20px;
    font-weight: 700;
    color: #f0ebe1;
}

.grid-card .project-meta {
    font-size: 11px;
    color: #5a5650;
    margin: 0 20px 10px 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
}

.grid-card .project-desc {
    font-family: 'Spectral', serif;
    font-size: 15px;
    color: #8a847b;
    margin: 0 20px 16px 20px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid-card .project-tags { margin: 0 20px 16px 20px; }

.grid-break {
    background: var(--bg-card);
    border: 2px solid var(--accent);
    border-radius: 0;
    padding: 22px 32px !important;
    text-align: center;
    font-family: 'Spectral', serif;
    font-style: italic;
    color: var(--accent-light);
    font-size: 17px;
    line-height: 1.6;
    grid-column: span 12;
    margin: 16px 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.grid-break:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--shadow-accent);
}

/* ===============================
   Listing Page
================================ */
.listing-header { margin-bottom: 24px; }

.listing-subtitle {
    color: #5a5650;
    margin-top: -6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.listing-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.listing-card .project-thumb { height: 180px; }

.project-list li { margin: 0; }

.grid-card-inner { display: flex; gap: 0; }

.grid-thumb {
    flex-shrink: 0;
    width: 120px;
    overflow: hidden;
    background: var(--bg-dark);
    border-right: 2px solid var(--border-dark);
}

.grid-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    filter: contrast(1.05);
    display: block;
    min-height: 100%;
    transition: opacity 0.15s ease, filter 0.15s ease;
}

.grid-thumb-placeholder {
    width: 120px;
    height: 100%;
    min-height: 90px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3a3835;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 500;
}

.grid-content {
    flex: 1;
    padding: 18px 22px;
    background: var(--parchment);
    color: var(--ink-body);
}

.grid-content .project-title { color: var(--ink-dark); }

.grid-content .project-meta { color: var(--ink-muted); }

.grid-content .project-desc { color: var(--ink-body); }

.grid-content .tag {
    background: var(--parchment-warm);
    color: var(--ink-dark);
    border-color: var(--parchment-mid);
    font-weight: 600;
}

.grid-card:hover .grid-thumb img { opacity: 1; filter: contrast(1.1); }

/* ===============================
   Tag Cloud
================================ */
.tag-cloud {
    text-align: center;
    margin: 40px 0;
    padding: 24px;
    border-top: 2px solid var(--border-dark);
    border-bottom: 2px solid var(--border-dark);
}

.tag-cloud a {
    display: inline-block;
    margin: 4px 6px;
    padding: 6px 14px;
    background: var(--bg-surface);
    border: 2px solid var(--border-dark);
    border-radius: 0;
    color: #8a847b;
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tag-cloud a:hover {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 0 var(--accent);
}

/* ===============================
   STL / PDF Sections
================================ */
.stl-section, .pdf-section {
    margin-top: 48px;
    padding: 24px 0;
    border-top: 2px solid var(--border-dark);
}

.stl-section h2, .pdf-section h2 {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5a5650;
    margin-bottom: 20px;
}

.stl-item a { color: var(--accent-light); font-weight: 600; }
.stl-item a:hover { text-decoration: underline; text-underline-offset: 3px; }

.pdf-item embed {
    border: 2px solid var(--border-dark);
    border-radius: 0;
    display: block;
    width: 55%;
    margin: 0 auto;
    min-height: 700px;
    background: var(--bg-card);
}

@media (max-width: 900px) {
    .pdf-item embed { width: 100%; min-height: 500px; }
}

/* ===============================
   Site Footer
================================ */
.site-footer {
    margin-top: 80px;
    padding: 28px 0;
    border-top: 2px solid var(--border-dark);
    color: #3a3835;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.home-page + .site-footer {
    margin-top: 0;
}

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

.footer-left { color: #4a4742; text-transform: uppercase; font-weight: 600; }

.footer-right {
    display: flex;
    gap: 14px;
    align-items: center;
}

.footer-right a {
    color: #4a4742;
    display: flex;
    align-items: center;
    border: 2px solid transparent;
    border-radius: 0;
    padding: 3px;
    transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.footer-right a:hover { color: var(--accent-light); border-color: var(--accent); transform: translate(-1px,-1px); }
.footer-right svg { width: 18px; height: 18px; }

.footer-logo {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 900;
    opacity: 0.35;
    border: 2px solid var(--border-dark);
    background: var(--bg-dark);
    padding: 3px;
    transition: opacity 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.footer-logo:hover { opacity: 0.85; border-color: var(--accent); transform: translate(-1px,-1px); }
.footer-logo img { height: 32px; width: auto; display: block; }

/* ===============================
   Command Palette
================================ */
.cmd-palette {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2500;
}

.cmd-palette.visible { display: block; }

.cmd-palette-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6,6,8,0.94);
}

.cmd-palette-content {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translate(-50%, 0);
    background: var(--bg-card);
    border: 2px solid var(--border-dark);
    border-radius: 0;
    width: 92%;
    max-width: 580px;
    box-shadow: var(--shadow-hard);
    overflow: hidden;
}

.cmd-palette-input-wrap {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 2px solid var(--border-dark);
    background: var(--bg-dark);
    gap: 10px;
}

.cmd-palette-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--parchment);
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 500;
    outline: none;
}

.cmd-palette-input::placeholder { color: #3a3835; }

.cmd-palette-results {
    max-height: 340px;
    overflow-y: auto;
    padding: 6px 0;
    background: var(--bg-card);
}

.cmd-palette-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    color: #7a756e;
    cursor: pointer;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    transition: transform 0.1s ease, background 0.1s ease, color 0.1s ease;
}

.cmd-palette-item:hover,
.cmd-palette-item.active {
    background: var(--accent);
    color: var(--bg-dark);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 0 var(--accent);
}

.cmd-palette-item-title { font-weight: 700; }

.cmd-palette-item-badge {
    font-size: 10px;
    color: #5a5650;
    background: transparent;
    border: 1.5px solid var(--border-dark);
    border-radius: 0;
    padding: 1px 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.cmd-palette-item.active .cmd-palette-item-badge {
    color: var(--bg-dark);
    background: var(--bg-dark);
    border-color: var(--bg-dark);
}

.cmd-palette-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: var(--bg-dark);
    border-top: 2px solid var(--border-dark);
    font-size: 10px;
    color: #3a3835;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
}

.cmd-palette-keys span {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-dark);
    border-radius: 0;
    padding: 1px 5px;
    margin-left: 4px;
    color: #5a5650;
    font-weight: 700;
}

.cmd-palette-trigger {
    background: transparent;
    border: 2px solid var(--border-dark);
    color: #5a5650;
    border-radius: 0;
    padding: 5px 10px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    display: inline-flex;
    align-items: center;
}

.cmd-palette-trigger:hover {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
    transform: translate(-1px, -1px);
    box-shadow: 2px 2px 0 0 var(--accent);
}

/* ===============================
   Map
================================ */
#map, .map-wrapper {
    contain: layout paint style;
    position: relative;
    z-index: 1;
}

#map .leaflet-pane { z-index: auto !important; }

/* ===============================
   Homepage Hero
================================ */
.hero {
    min-height: calc(100vh - 40px);
    margin: 0;
    padding: 80px 24px 60px;
    background: var(--bg-dark);
    background-image: linear-gradient(rgba(12, 12, 14, 0.7), rgba(12, 12, 14, 0.8)), url('/aurora-9.9010edebd1f7.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 2px solid var(--accent);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(139,115,85,0.08) 0%, transparent 40%),
        repeating-linear-gradient(0deg, transparent 0px, transparent 39px, rgba(255,255,255,0.015) 39px, rgba(255,255,255,0.015) 40px);
    pointer-events: none;
}

.hero-inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }

.hero-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 14px;
    display: inline-block;
    border: 2px solid var(--accent);
    padding: 4px 10px;
    background: rgba(139,115,85,0.1);
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 52px;
    line-height: 1.05;
    font-weight: 800;
    color: #f0ebe1;
    letter-spacing: -0.05em;
    margin: 0 0 18px 0;
}

.hero-subtitle {
    font-family: 'Spectral', Georgia, serif;
    font-size: 20px;
    color: #8a847b;
    line-height: 1.55;
    max-width: 52ch;
    margin: 0 auto 32px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.hero-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-badges span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a847b;
    border: 2px solid var(--border-dark);
    padding: 5px 10px;
    border-radius: 0;
    background: var(--bg-surface);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 0;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    border: 2px solid transparent;
}

.btn-primary {
    color: var(--bg-dark);
    background: var(--parchment);
    border-color: var(--parchment-mid);
    box-shadow: var(--shadow-hard);
}

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    color: var(--bg-dark);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-accent);
}

.btn-secondary {
    color: var(--accent-light);
    background: transparent;
    border-color: var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--bg-dark);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-accent);
}

/* ===============================
   Value Props
================================ */
.what-i-do-section {
    background-image: linear-gradient(rgba(12, 12, 14, 0.75), rgba(12, 12, 14, 0.8)), url('/aurora-10.58930a28f826.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 2px solid var(--accent);
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 48px 0;
}

.value-card {
    padding: 26px 22px;
    background: var(--bg-card);
    border: 2px solid var(--border-dark);
    border-radius: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
}

.value-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-accent);
    border-color: var(--accent);
}

@media (min-width: 768px) {
    .value-card.span-2 {
        grid-column: span 2;
    }
}

.card-video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 2px solid var(--border-dark);
    margin-top: 14px;
    display: block;
}

.value-icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: inline-block;
    padding: 6px;
    border: 2px solid var(--border-dark);
    background: var(--bg-surface);
}

.value-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #f0ebe1;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.value-card p {
    font-family: 'Spectral', serif;
    font-size: 15px;
    color: #8a847b;
    line-height: 1.55;
    margin: 0 0 14px 0;
}

.value-card .tag {
    font-size: 10px;
    padding: 2px 8px;
    display: inline-block;
    border-width: 1.5px;
}

/* ===============================
   Design Tokens
   Neobrutalist — flat, hard, chunky.
   Palette kept intact.
================================ */
:root {
    --bg-dark:        #0c0c0e;
    --bg-card:        #111215;
    --bg-surface:     #16171a;
    --parchment:      #f7f3ec;
    --parchment-warm: #f0ebe1;
    --parchment-mid:  #e8e2d6;
    --ink-dark:       #1e1c18;
    --ink-body:       #2e2c28;
    --ink-muted:      #6b6560;
    --border-dark:    rgba(255,255,255,0.1);
    --border-parch:   rgba(30,28,24,0.25);
    --accent:         #8b7355;
    --accent-light:   #b8956a;
    --accent-glow:    rgba(139,115,85,0.3);
    --cyan:           #4ab8c0;
    --cyan-dim:       rgba(74,184,192,0.12);
    --rule:           rgba(30,28,24,0.25);
    --shadow-hard:    4px 4px 0 0 rgba(0,0,0,0.45);
    --shadow-accent:  4px 4px 0 0 var(--accent);
    --spring-easing:  linear(
        0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017,
        1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%,
        1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%,
        0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1
    );
    --spring-duration: 1.333s;
}

.how-work-section {
    background-image: linear-gradient(rgba(12, 12, 14, 0.75), rgba(12, 12, 14, 0.8)), url('/aurora-11.8db7ba5df62c.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 2px solid var(--accent);
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 48px 0;
}

.how-step {
    padding: 24px;
    background: var(--bg-card);
    border: 2px solid var(--border-dark);
    border-radius: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.how-step:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-accent);
    border-color: var(--accent);
}

.how-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    color: var(--accent);
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.04em;
}

.how-step h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #e8e2d6;
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.how-step p {
    font-family: 'Spectral', serif;
    font-size: 15px;
    color: #8a847b;
    line-height: 1.55;
    margin: 0;
}

/* ===============================
   Sections
================================ */
.container > h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #f0ebe1;
    margin: 64px 0 6px 0;
    letter-spacing: -0.04em;
}

.container > h2 + .section-rule { margin-top: 10px; }

.section-rule {
    border: none;
    border-top: 2px solid var(--border-dark);
    margin: 8px 0 32px 0;
}

/* CTA band */
.cta-band {
    margin: 0;
    padding: 72px 24px;
    background: var(--bg-card);
    background-image: linear-gradient(rgba(12, 12, 14, 0.75), rgba(12, 12, 14, 0.8)), url('/aurora-12.89266e273382.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    text-align: center;
    position: relative;
}

.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(139,115,85,0.06);
    pointer-events: none;
}

.cta-band h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #f0ebe1;
    margin: 0 0 10px 0;
    letter-spacing: -0.04em;
    position: relative;
}

.cta-band p {
    font-family: 'Spectral', serif;
    font-size: 18px;
    color: #8a847b;
    margin: 0 0 24px 0;
    position: relative;
}

.cta-band .btn-primary {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
    box-shadow: var(--shadow-accent);
    position: relative;
}

.cta-band .btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translate(-2px,-2px);
    box-shadow: 6px 6px 0 0 var(--accent);
}

/* ===============================
   Responsive
================================ */
@media (max-width: 768px) {
    .project-title { font-size: 26px; }
    .project-body { padding: 22px 18px; }
    .hero-title { font-size: 36px; }
    .hero-subtitle { font-size: 17px; }
    .container > h2 { font-size: 20px; }
    .value-grid, .how-grid { grid-template-columns: 1fr; }
    .site-footer {
        background-image: linear-gradient(to top, rgba(12, 12, 14, 0) 0%, var(--bg-dark) 100%), url('/aurora-8.345568e4045e.webp');
        background-size: cover;
        background-position: bottom center;
        background-repeat: no-repeat;
        padding-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .project-body { padding: 22px 18px; font-size: 17px; }
    .grid-thumb { display: none; }
    .project-title { font-size: 22px; }
    .hero-title { font-size: 30px; }
    .nav-links { gap: 10px; }
    .nav-links a { font-size: 9px; letter-spacing: 0.1em; }
}

/* ===============================
   Thumbnail placeholder
================================ */
.thumbnail {
    width: 100%;
    border: 2px solid var(--border-dark);
    border-radius: 0;
    background: var(--bg-surface);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3a3835;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ===============================
   Utility: force neobrutalist layout
   for picker/overlay siblings
================================ */
.picker-layer, .leaflet-pane { z-index: auto !important; }

/* Homepage Hero Layout with Left Image */
.hero-inner.has-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    max-width: 1000px;
    text-align: center;
    margin: 0 auto;
}

.hero-image-left {
    width: 100%;
    max-width: 380px;
    border: 2px solid var(--border-dark);
    border-radius: 0;
    overflow: hidden;
    background: var(--bg-dark);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
}

.hero-image-left img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-content-right {
    flex: 1;
}

@media (min-width: 768px) {
    .site-header {
        background-image: linear-gradient(rgba(12, 12, 14, 0.75), rgba(12, 12, 14, 0.75)), url('/aurora-8.345568e4045e.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    .hero-inner.has-image {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }
    .hero-image-left {
        flex: 0 0 350px;
        max-width: 350px;
    }
    .hero-inner.has-image .hero-subtitle {
        margin-left: 0;
        margin-right: 0;
    }
    .hero-inner.has-image .hero-actions {
        justify-content: flex-start;
    }
    .hero-inner.has-image .hero-badges {
        justify-content: flex-start;
    }
}

/* Print styles — keep readable */
@media print {
    body { background: #fff; color: #000; }
    .site-header, .footer-logo, .cmd-palette, .lightbox { display: none !important; }
    .project-body { box-shadow: none; border: 1px solid #ccc; }
}

/* ===============================
   Footnotes
================================ */
.project-body sup {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    top: -0.5em;
}

.footnote-ref a {
    color: var(--accent) !important;
    border-bottom: none !important;
    font-weight: 600;
    padding: 0 2px;
}

.footnote-ref a:hover {
    color: var(--ink-dark) !important;
    text-decoration: underline;
}

.footnotes-sep {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 40px 0 20px 0;
}

.footnotes {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-muted);
}

.footnotes h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    color: var(--ink-dark);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.footnotes-list {
    padding-left: 20px;
    margin: 0;
}

.footnote-item {
    margin-bottom: 8px;
}

.footnote-backref {
    color: var(--accent) !important;
    border-bottom: none !important;
    margin-left: 4px;
    font-family: sans-serif;
}

.footnote-backref:hover {
    color: var(--ink-dark) !important;
}

/* ===============================
   KiloLiqu Radio Floating Dock
================================ */
.radio-dock {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2200;
    max-width: 340px;
    width: calc(100% - 48px);
    background: var(--bg-card, #121215);
    border: 2px solid var(--border-dark, #2a2825);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
    color: var(--parchment, #e6e0d4);
    font-family: 'JetBrains Mono', monospace;
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.radio-dock.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.radio-dock.is-playing {
    border-color: #00f0ff;
    box-shadow: 0 12px 36px rgba(0, 240, 255, 0.15), 0 0 12px rgba(0, 240, 255, 0.25);
}

.radio-dock-inner {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-dock-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-dark, #2a2825);
}

.radio-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ff3366;
    font-weight: 700;
}

.radio-live-dot {
    width: 8px;
    height: 8px;
    background: #ff3366;
    border-radius: 50%;
    box-shadow: 0 0 8px #ff3366;
    animation: radioBlink 1.2s infinite ease-in-out;
}

@keyframes radioBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

.radio-station-title {
    color: #8a847b;
    font-weight: 600;
    font-size: 10px;
}

.radio-close-btn {
    background: none;
    border: none;
    color: #8a847b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.radio-close-btn:hover {
    color: #f0ebe1;
}

.radio-dock-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.radio-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
    width: 22px;
    padding: 2px;
}

.radio-visualizer .bar {
    flex: 1;
    background: #5a5650;
    height: 4px;
    border-radius: 1px;
    transition: height 0.15s ease, background 0.15s ease;
}

.radio-dock.is-playing .radio-visualizer .bar {
    background: #00f0ff;
    animation: radioEq 0.8s infinite alternate ease-in-out;
}

.radio-dock.is-playing .radio-visualizer .bar:nth-child(1) { animation-delay: 0.1s; }
.radio-dock.is-playing .radio-visualizer .bar:nth-child(2) { animation-delay: 0.3s; }
.radio-dock.is-playing .radio-visualizer .bar:nth-child(3) { animation-delay: 0.5s; }
.radio-dock.is-playing .radio-visualizer .bar:nth-child(4) { animation-delay: 0.2s; }

@keyframes radioEq {
    0% { height: 4px; }
    100% { height: 18px; }
}

.radio-track-info {
    flex: 1;
    min-width: 0;
}

.radio-track-title {
    font-size: 13px;
    font-weight: 700;
    color: #f0ebe1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.radio-track-sub {
    font-size: 10px;
    color: #8a847b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-dock-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 6px;
    border-top: 1px solid var(--border-dark, #2a2825);
}

.radio-play-btn {
    background: #00f0ff;
    color: #0c0c0e;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.radio-play-btn:hover {
    background: #39ff14;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
}

.radio-vol-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8a847b;
    flex: 1;
}

.radio-vol-slider {
    width: 100%;
    accent-color: #00f0ff;
    cursor: pointer;
    height: 4px;
}

.radio-studio-link {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a847b;
    text-decoration: none;
    padding: 4px 8px;
    border: 1px solid var(--border-dark, #2a2825);
    transition: all 0.15s ease;
}

.radio-studio-link:hover {
    color: #00f0ff;
    border-color: #00f0ff;
}

/* Pulsing effect on the footer radio icon when active */
.radio-playing-pulse {
    color: #39ff14 !important;
    border-color: #39ff14 !important;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
    animation: radioPulseGlow 1.8s infinite ease-in-out;
}

@keyframes radioPulseGlow {
    0%, 100% {
        box-shadow: 0 0 6px rgba(57, 255, 20, 0.3);
    }
    50% {
        box-shadow: 0 0 14px rgba(57, 255, 20, 0.7);
    }
}


/* Preserve original artwork; only defer sections outside the viewport. */
html.portfolio-media-managed [data-portfolio-background]:not([data-portfolio-media-loaded]) { background-image: none; }
video[data-portfolio-video] { display: none; }
html.portfolio-media-managed video[data-portfolio-video] { display: block; }
