/*
Theme Name: SafehouseLab
Theme URI:
Author: Echo Dev
Author URI:
Description: SafehouseLab v3.0 — Minimal noble engineer. Bootstrap 5. Zero Webflow dependency.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
License: Private
Text Domain: safehouselab
*/

/* ─────────────────────────────────────────────────────────────────────────────
   Design Tokens
───────────────────────────────────────────────────────────────────────────── */
:root {
    --bg:              #0e0e0e;
    --surface:         #141414;
    --surface-2:       #1a1a1a;
    --surface-3:       #202020;
    --border:          rgba(255,255,255,0.065);
    --border-mid:      rgba(255,255,255,0.10);
    --border-strong:   rgba(255,255,255,0.16);
    --text:            #e2e2e2;
    --text-dim:        #7e7e7e;
    --text-muted:      #3e3e3e;
    --accent:          #c4983a;       /* warm gold */
    --accent-pastel:   #c9aa72;       /* pastel gold — softer, lower saturation */
    --accent-dim:      rgba(196,152,58,0.12);
    --gold:            #c4983a;       /* same gold */
    --font-display:    'Space Grotesk', sans-serif;
    --font-body:       'Inter', sans-serif;
    --font-mono:       'JetBrains Mono', monospace;
    --nav-h:           62px;
    --r:               2px;
    --section-pad:     6rem;
}

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

html {
    overflow-x: hidden;
    scroll-behavior: auto;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.75;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: inherit; }
p   { margin-top: 0; margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   Typography Scale
───────────────────────────────────────────────────────────────────────────── */
.t-display {
    font-family: var(--font-display);
    font-size: clamp(3.4rem, 9vw, 8rem);
    font-weight: 700;
    line-height: 0.93;
    letter-spacing: -0.04em;
    color: var(--text);
}

.t-title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text);
}

.t-heading {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text);
}

.t-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.t-label-accent { color: var(--accent); }

.t-body {
    font-family: var(--font-body);
    font-size: 0.975rem;
    color: var(--text-dim);
    line-height: 1.8;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Navigation
───────────────────────────────────────────────────────────────────────────── */
.shl-nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    padding: 0 2.5rem;
    transition: background 0.35s ease, backdrop-filter 0.35s ease, transform 0.3s ease;
}

.shl-nav.nav-scrolled {
    background: rgba(14,14,14,0.92);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}

.shl-nav.nav-hidden {
    transform: translateY(-100%);
}

/* Logo */
.nav-logo {
    font-family: 'Primal', var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-logo-text {
    display: inline-block;
    min-width: 9.5rem; /* locks width of SAFEHOUSE LAB — scramble never reflows nav */
    white-space: nowrap;
}
.nav-coords {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
}
.nav-coords-text {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}
.nav-terminal {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    animation: terminal-blink 3s ease-in-out infinite;
    flex-shrink: 0;
}

@media (max-width: 860px) {
    .nav-coords { display: none; }
}

/* Desktop links */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.67rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta-link {
    padding: 0.45rem 1.1rem;
    border: 1px solid var(--border-mid);
    border-radius: var(--r);
    color: var(--text) !important;
    transition: border-color 0.2s, color 0.2s !important;
}
.nav-cta-link:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

/* Mobile toggle */
.nav-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.4rem;
    margin-left: auto;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}
.nav-toggle-btn span {
    display: block;
    height: 1px;
    background: currentColor;
    transition: width 0.2s;
}
.nav-toggle-btn span:nth-child(1) { width: 22px; }
.nav-toggle-btn span:nth-child(2) { width: 16px; }
.nav-toggle-btn span:nth-child(3) { width: 22px; }

/* Mobile menu */
.nav-mobile {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(14,14,14,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 2rem 2.5rem;
    flex-direction: column;
    gap: 1.25rem;
    z-index: 999;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color 0.2s;
}
.nav-mobile a:hover { color: var(--text); }

@media (max-width: 860px) {
    .nav-links    { display: none; }
    .nav-toggle-btn { display: flex; }
}
@media (max-width: 480px) {
    .shl-nav { padding: 0 1rem; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Layout Helpers
───────────────────────────────────────────────────────────────────────────── */
.shl-section {
    padding: var(--section-pad) 0;
}
.shl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.5rem;
}
.section-rule {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

/* Section eyebrow */
.eyebrow {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 3rem;
}
.eyebrow::before {
    content: '';
    display: block;
    width: 28px; height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Buttons
───────────────────────────────────────────────────────────────────────────── */
.btn-shl {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    font-family: var(--font-mono);
    font-size: 0.67rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: var(--r);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.btn-shl-primary {
    background: var(--text);
    color: var(--bg);
}
.btn-shl-primary:hover {
    background: var(--accent-pastel);
    color: #0e0e0e;
}
.btn-shl-ghost {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--border-mid);
}
.btn-shl-ghost:hover {
    background: var(--accent-pastel);
    border-color: var(--accent-pastel);
    color: #0e0e0e;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Hero
───────────────────────────────────────────────────────────────────────────── */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    padding-top: var(--nav-h);
    padding-bottom: 5rem;
    /* Precision grid — barely there */
    background-image:
        linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: -1px -1px;
}

/* bottom gradient handled by .hero-portrait::after */

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.75rem;
}
.hero-eyebrow-pulse {
    width: 6px; height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: terminal-blink 3s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes terminal-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.8rem, 10vw, 9rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.045em;
    color: var(--text);
    margin-bottom: 0;
    text-shadow: 0 2px 40px rgba(0,0,0,0.7), 0 1px 6px rgba(0,0,0,0.5);
}
.hero-title .dim { color: var(--text-muted); }

.hero-sub-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.hero-desc {
    max-width: 440px;
    font-size: 0.975rem;
    color: var(--text-dim);
    line-height: 1.8;
}

.hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.5rem;
    flex-shrink: 0;
}

.hero-tags {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
}
.hero-tag {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.hero-tag::after {
    content: '';
    display: block;
    width: 16px; height: 1px;
    background: var(--text-muted);
    transition: width 0.35s ease, background 0.35s ease, opacity 0.35s ease;
}
.hero-tag.is-active {
    color: var(--text);
    text-shadow: 0 0 18px rgba(196,152,58,0.35);
}
.hero-tag.is-active::after {
    background: var(--accent);
    width: 24px;
}
/* All-lit state — triggered by JS on button hover */
.hero-tags.all-lit .hero-tag {
    color: var(--text);
    text-shadow: 0 0 18px rgba(196,152,58,0.35);
}
.hero-tags.all-lit .hero-tag::after {
    background: var(--accent);
    width: 24px;
    opacity: 1;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Hero portrait — full-bleed background, bottom gradient only */
.hero-portrait {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
/* Subtle overall dark overlay — keeps text readable */
.hero-portrait::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(14,14,14,0.42);
    z-index: 1;
}
/* Bottom gradient — fades image into the next section */
.hero-portrait::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 55%;
    background: linear-gradient(transparent, var(--bg));
    z-index: 2;
}
.hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0.8;
    display: block;
}

@media (max-width: 768px) {
    .hero-portrait img {
        object-position: 65% 0%;
    }
}

.hero-coords {
    position: absolute;
    bottom: 2.5rem;
    right: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    z-index: 1;
}

/* hero eyebrow — show full on desktop, mobile label on mobile */
.hero-eyebrow-mobile { display: none; }

@media (max-width: 768px) {
    .hero-sub-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    .hero-right { align-items: flex-start; }
    .hero-tags { align-items: flex-start; }
    .hero-tag::after { display: none; }
    .hero-coords { display: none; }
    .hero-eyebrow-full { display: none; }
    .hero-eyebrow-mobile { display: inline; }
    .hero-eyebrow-pulse { display: none; }
    .hero-tags { display: none; }
    .hero-cta-desktop { display: none; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Services
───────────────────────────────────────────────────────────────────────────── */
#services {
    background: var(--surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}

@media (max-width: 700px) {
    .services-grid { grid-template-columns: 1fr; }
}

/* Service card — gold wash + scanline glitch, no image needed */
.service-card { overflow: hidden; }

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 18px,
            rgba(196,152,58,0.03) 18px,
            rgba(196,152,58,0.03) 19px
        ),
        linear-gradient(135deg,
            rgba(10,10,10,0.82) 0%,
            rgba(10,10,10,0.55) 60%,
            rgba(196,152,58,0.04) 100%
        );
    opacity: 0;
    transition: opacity 0.4s ease;
}
.service-card:hover::after { opacity: 1; }
.service-card.glitch-run::after {
    animation: tv-glitch 0.45s steps(1) both;
    opacity: 1;
}

.service-card-body {
    position: relative;
    z-index: 1;
}

.service-card {
    background: var(--bg);
    padding: 2.75rem 2.25rem;
    position: relative;
    transition: background 0.25s;
}
.service-card:hover { background: var(--surface-2); }

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.service-card:hover::before { transform: scaleX(1); }

.service-num {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

.service-icon-wrap {
    width: 44px; height: 44px;
    margin-bottom: 1.75rem;
    color: var(--accent);
    opacity: 0.8;
}
.service-icon-wrap svg {
    width: 100%; height: 100%;
    stroke: currentColor;
    stroke-width: 1.25;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 0.9rem;
}

.service-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.75;
    margin-bottom: 1.75rem;
}

.service-skills {
    list-style: none;
    margin: 0; padding: 0;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}
.service-skills li {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
/* Hover state — dark text + type-in animation */
@keyframes type-in {
    from { opacity: 0; transform: translateX(-5px); }
    to   { opacity: 1; transform: translateX(0); }
}
.service-card:hover .service-skills li {
    animation: type-in 0.07s steps(2) forwards;
    opacity: 0;
}
.service-card:hover .service-skills li:nth-child(1) { animation-delay: 0.04s; }
.service-card:hover .service-skills li:nth-child(2) { animation-delay: 0.11s; }
.service-card:hover .service-skills li:nth-child(3) { animation-delay: 0.18s; }
.service-card:hover .service-skills li:nth-child(4) { animation-delay: 0.25s; }
.service-card:hover .service-skills li:nth-child(5) { animation-delay: 0.32s; }
.service-card:hover .service-skills li:nth-child(6) { animation-delay: 0.39s; }

.service-skills li:last-child { border-bottom: none; }
.service-skills li::before {
    content: '—';
    color: var(--accent);
    font-size: 0.55rem;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Work / Projects
───────────────────────────────────────────────────────────────────────────── */
#work {
    background: var(--bg);
}

/* Work featured meta/title/desc/tags — replaces inline styles */
.work-featured-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.work-featured-title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 1.25rem;
}
.work-featured-desc {
    font-size: 0.975rem;
    color: var(--text-dim);
    line-height: 1.8;
    margin-bottom: 1.75rem;
}
.work-featured-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Featured: House of Ascania */
.work-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 1px;
}
@media (max-width: 768px) {
    .work-featured { grid-template-columns: 1fr; }
}
.work-featured-img {
    background: var(--surface-2);
    overflow: hidden;
    min-height: 320px;
    position: relative;
}

/* Glitch — fires once on hover-in via JS */
.work-featured-img.glitch-run {
    animation: tv-glitch 0.45s steps(1) both;
}

/* Scanlines overlay */
.work-featured-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.18) 2px,
        rgba(0,0,0,0.18) 4px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 1;
}
.work-featured:hover .work-featured-img::after { opacity: 1; }
.work-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    filter: brightness(0.7) contrast(1.05);
    transition: filter 0.5s ease, transform 0.6s ease;
}
.work-featured:hover .work-featured-img img {
    filter: brightness(0.55) contrast(1.1);
    transform: scale(1.03);
}
.work-featured-body {
    background: var(--bg);
    padding: 2.75rem 2.5rem;
}

/* Apps row */
.work-apps-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 1px;
}
@media (max-width: 600px) {
    .work-apps-row { grid-template-columns: 1fr; }
}
.work-item-app {
    background: var(--surface);
}

/* Project grid */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}
@media (max-width: 700px) {
    .work-grid { grid-template-columns: 1fr; }
}

.work-item {
    background: var(--bg);
    padding: 2.25rem 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 280px;
}

/* Code/terminal pattern glitch — no image needed */
.work-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 22px,
            rgba(196,152,58,0.035) 22px,
            rgba(196,152,58,0.035) 23px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 55px,
            rgba(196,152,58,0.02) 55px,
            rgba(196,152,58,0.02) 56px
        ),
        linear-gradient(160deg,
            rgba(196,152,58,0.07) 0%,
            transparent 50%
        );
    opacity: 0;
    transition: opacity 0.4s ease;
}
.work-item:hover::after { opacity: 1; }
.work-item.glitch-run::after {
    animation: tv-glitch 0.45s steps(1) both;
    opacity: 1;
}

/* Hover image — glitch reveal */
.work-img-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.15s;
}
.work-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.35) contrast(1.1) saturate(0.55);
}
.work-item:hover .work-img-wrap { opacity: 1; }

/* TV glitch animation — runs once on hover-in */
@keyframes tv-glitch {
    0%   { clip-path: inset(0 0 100% 0);  transform: translateX(0); }
    8%   { clip-path: inset(42% 0 40% 0); transform: translateX(-7px); }
    16%  { clip-path: inset(18% 0 65% 0); transform: translateX(6px); }
    24%  { clip-path: inset(72% 0 12% 0); transform: translateX(-4px); }
    32%  { clip-path: inset(5% 0 85% 0);  transform: translateX(4px); }
    40%  { clip-path: inset(55% 0 30% 0); transform: translateX(-2px); }
    50%  { clip-path: inset(0 0 0 0);     transform: translateX(2px); }
    60%  { clip-path: inset(25% 0 55% 0); transform: translateX(-1px); }
    75%  { clip-path: inset(0 0 0 0);     transform: translateX(1px); }
    100% { clip-path: inset(0 0 0 0);     transform: translateX(0); }
}
.work-img-wrap.glitch-run {
    animation: tv-glitch 0.45s steps(1) both;
}

/* Scanline overlay on glitch */
.work-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.18) 2px,
        rgba(0,0,0,0.18) 4px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}
.work-item:hover .work-img-wrap::after { opacity: 1; }

/* ── Work hover overlay — TV glitch reveal ──────────────────────────────── */
.work-hover-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    background: rgba(6,6,6,0.96);
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.22) 4px
    );
    clip-path: inset(0 0 100% 0);
    pointer-events: none;
    border-left: 2px solid var(--accent);
}
.work-item:hover .work-hover-overlay {
    pointer-events: auto;
    animation: tv-glitch 0.45s steps(1) forwards;
}
.who-name {
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.8vw, 1.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    text-align: center;
    padding: 0 1.5rem;
}
.who-link {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    transition: color 0.2s;
}
.who-link:hover { color: var(--text); }
.who-link-unavail {
    color: var(--text-muted);
    pointer-events: none;
}
@media (max-width: 768px) {
    .work-hover-overlay { display: none; }
}

/* ── Signal promo card ───────────────────────────────────────────────────── */
.work-signal-promo {
    background-color: #000;
    background-image:
        linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
    background-size: 80px 80px;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    border-left: 2px solid var(--accent);
    position: relative;
    overflow: hidden;
}
/* Ghost watermark */
.work-signal-promo::before {
    content: 'THE SIGNAL';
    position: absolute;
    right: -0.05em;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: clamp(5rem, 12vw, 14rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.06);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}
/* Scanlines */
.work-signal-promo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 22px,
        rgba(196,152,58,0.03) 22px,
        rgba(196,152,58,0.03) 23px
    );
    pointer-events: none;
}
.wsp-eyebrow { display: block; }
.wsp-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.1;
}
.wsp-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 480px;
}
.wsp-link {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    transition: color 0.2s;
    width: fit-content;
}
.wsp-link:hover { color: var(--text); }

/* ── Ghost Frame — terminal data overlay — V2 ────────────────────────────── */
.work-ghost { display: none; } /* re-enable in V2 */
.work-ghost-disabled {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 152px;
    z-index: 3;
    background: rgba(8,8,8,0.97);
    border: 1px solid rgba(196,152,58,0.35);
    border-left: 2px solid var(--accent);
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.2s;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.28) 4px
    );
}
/* Corner brackets */
.work-ghost::before {
    content: '';
    position: absolute;
    top: -1px; right: -1px;
    width: 9px; height: 9px;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    opacity: 0.65;
}
.work-ghost::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0px;
    width: 9px; height: 9px;
    border-bottom: 2px solid var(--accent);
    border-left: none;
    opacity: 0.65;
}
.work-item:hover .work-ghost {
    opacity: 1;
    transform: translateY(0);
    animation: ghost-scan-in 0.42s steps(2) both;
}
@keyframes ghost-scan-in {
    0%   { clip-path: inset(0 0 100% 0); }
    25%  { clip-path: inset(0 0 68% 0);  transform: translateX(-2px); }
    50%  { clip-path: inset(0 0 38% 0);  transform: translateX(1px); }
    75%  { clip-path: inset(0 0 12% 0);  transform: translateX(0); }
    100% { clip-path: inset(0 0 0 0); }
}
.wg-id {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.13em;
    color: var(--accent);
    text-shadow: -1px 0 rgba(255,55,55,0.55), 1px 0 rgba(55,110,255,0.55);
    margin-bottom: 0.1rem;
}
.wg-loc,
.wg-tag {
    font-family: var(--font-mono);
    font-size: 0.51rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wg-loc::before { content: '> '; color: var(--accent); opacity: 0.55; }
.wg-tag::before { content: '# '; color: var(--accent); opacity: 0.55; }
.wg-status {
    font-family: var(--font-mono);
    font-size: 0.51rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 0.1rem;
}
.wg-status.is-active { color: #4d9960; }
.wg-decode {
    font-family: var(--font-mono);
    font-size: 0.46rem;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    opacity: 0.45;
    margin-top: 0.2rem;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(196,152,58,0.12);
}
@media (max-width: 768px) {
    .work-ghost { display: none; }
}

.work-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.work-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    gap: 0.75rem;
}
.work-num {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    flex-shrink: 0;
    padding-top: 0.05rem;
}
.work-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}
.work-year {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}
.work-location {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.07em;
    text-align: right;
}

.work-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
}

.work-desc {
    font-size: 0.855rem;
    color: var(--text-dim);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.work-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: nowrap;
    overflow: hidden;
    margin-bottom: 0.85rem;
}

@media (max-width: 768px) {
    .work-tags {
        flex-direction: column;
        flex-wrap: nowrap;
        overflow: visible;
        align-items: flex-start;
    }
}
.work-tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 1px;
}

.work-link {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    transition: gap 0.2s, opacity 0.2s;
    opacity: 0.7;
}
.work-item:hover .work-link { opacity: 1; gap: 0.55rem; }

.work-hover-hint {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 1rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.work-item:hover .work-hover-hint { opacity: 0; }

.work-link-bottom {
    margin-top: auto;
    padding-top: 1.25rem;
    display: flex;
}

/* ─────────────────────────────────────────────────────────────────────────────
   The Signal — Posts Strip
───────────────────────────────────────────────────────────────────────────── */
#signal {
    background: var(--surface);
}

/* Section header row */
.signal-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}
.signal-all-link {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color 0.2s;
}
.signal-all-link:hover { color: var(--text); }

/* ── Featured post hero ──────────────────────────────────────────────────── */
.signal-featured-post {
    position: relative;
    overflow: hidden;
    min-height: 400px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 1px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Background image — always visible */
.signal-fp-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.signal-fp-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.5) saturate(0.6);
    transition: filter 0.5s ease;
}
.signal-featured-post:hover .signal-fp-bg img {
    filter: brightness(0.4) saturate(0.7);
}
/* Bottom gradient — keeps text readable */
.signal-fp-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 20%, rgba(14,14,14,0.65) 55%, rgba(14,14,14,0.96) 100%);
    z-index: 1;
}
/* Scanlines on hover */
.signal-fp-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.18) 2px,
        rgba(0,0,0,0.18) 4px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}
.signal-featured-post:hover .signal-fp-bg::before { opacity: 1; }

/* Glitch — same tv-glitch keyframe, fires on hover via JS */
.signal-fp-bg.glitch-run {
    animation: tv-glitch 0.45s steps(1) both;
}

/* No thumbnail fallback */
.signal-fp-bg:not(:has(img)) {
    background: var(--surface-2);
}

/* Content body */
.signal-fp-body {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}
.signal-fp-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.signal-fp-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
    margin: 0;
    max-width: 720px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}
.signal-fp-excerpt {
    font-size: 0.925rem;
    color: rgba(224,224,224,0.75);
    line-height: 1.75;
    margin: 0;
    max-width: 560px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.signal-fp-link {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s;
    margin-top: 0.25rem;
}
.signal-featured-post:hover .signal-fp-link { gap: 0.7rem; }

@media (max-width: 600px) {
    .signal-featured-post { min-height: 320px; }
    .signal-fp-body { padding: 1.75rem 1.5rem; }
}

/* ── Card grid ───────────────────────────────────────────────────────────── */
.signal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}
@media (max-width: 860px) {
    .signal-grid { grid-template-columns: 1fr; }
}

.signal-card {
    background: var(--bg);
    display: flex;
    flex-direction: column;
    transition: background 0.2s;
}
.signal-card:hover { background: var(--surface-2); }

/* Thumbnail — glitch on hover */
.signal-card-img {
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--surface-3);
    position: relative;
}
.signal-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.75) saturate(0.65);
    transition: filter 0.4s ease;
}
.signal-card:hover .signal-card-img img {
    filter: brightness(0.6) saturate(0.75);
}
/* Scanlines on card thumbnail */
.signal-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.16) 2px,
        rgba(0,0,0,0.16) 4px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}
.signal-card:hover .signal-card-img::after { opacity: 1; }

/* Glitch on card thumbnail */
.signal-card-img.glitch-run {
    animation: tv-glitch 0.45s steps(1) both;
}

/* Fallback when no thumbnail */
.signal-card-img-empty {
    display: flex;
    align-items: center;
    justify-content: center;
}
.signal-card-img-fallback {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--border-mid);
    letter-spacing: 0.1em;
}

.signal-card-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
}

.signal-card-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.signal-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 0.65rem;
}
.signal-card-title a {
    color: inherit;
    transition: color 0.2s;
}
.signal-card-title a:hover { color: var(--accent); }

.signal-card-excerpt {
    font-size: 0.855rem;
    color: var(--text-dim);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 1.25rem;
}

.signal-card-link {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s;
    margin-top: auto;
}
.signal-card:hover .signal-card-link { gap: 0.55rem; }

/* ─────────────────────────────────────────────────────────────────────────────
   About Strip
───────────────────────────────────────────────────────────────────────────── */
#about {
    background: var(--surface);
}

.about-grid {
    display: grid;
    grid-template-columns: 5fr 4fr;
    gap: 5rem;
    align-items: stretch;
}
.about-grid > div:last-child {
    display: flex;
    flex-direction: column;
}
.about-grid > div:last-child .about-stats {
    flex: 1;
}
.about-grid > div:last-child .about-stats .stat-box {
    height: 100%;
}
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .about-grid > div:last-child { display: block; }
}

.about-title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 2rem;
}
.about-title-dim { color: var(--text-muted); }

.about-text { color: var(--text-dim); font-size: 0.975rem; line-height: 1.85; }
.about-text p + p { margin-top: 1.25rem; }
.about-link { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.about-link:hover { border-color: var(--accent); }

.about-team {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.about-team-label {
    display: block;
    margin-bottom: 0.75rem;
}
.about-team-text {
    font-size: 0.875rem;
    color: var(--text-dim);
    line-height: 1.75;
    margin: 0;
}

.about-portrait {
    position: relative;
    margin-bottom: 2rem;
    border-left: 2px solid var(--accent);
}
.about-portrait img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: top center;
    display: block;
    filter: brightness(0.88) contrast(1.05) saturate(0.8);
}
.about-portrait-label {
    display: block;
    padding: 0.65rem 0.75rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}
.stat-box {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
}
.stat-box:nth-child(even)   { border-right: none; }
.stat-box:nth-child(3),
.stat-box:nth-child(4)      { border-bottom: none; }
.stat-num {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 0.3rem;
}
.stat-lbl {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Testimonials — Two-column vertical marquee
───────────────────────────────────────────────────────────────────────────── */
.testimonials-section {
    background: var(--bg);
}

/* Marquee container */
.testimonials-marquee {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    height: 460px;
}
@media (max-width: 600px) {
    .testimonials-marquee {
        grid-template-columns: 1fr;
        height: 420px;
    }
    /* On mobile hide the second column */
    .testimonials-col:last-child { display: none; }
}

.testimonials-col {
    overflow: hidden;
    position: relative;
    background: var(--bg);
}

/* Fade masks — top and bottom edges */
.testimonials-col::before,
.testimonials-col::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 80px;
    z-index: 2;
    pointer-events: none;
}
.testimonials-col::before {
    top: 0;
    background: linear-gradient(var(--bg), transparent);
}
.testimonials-col::after {
    bottom: 0;
    background: linear-gradient(transparent, var(--bg));
}

/* Scrolling track */
.testimonials-track {
    display: flex;
    flex-direction: column;
}
.testimonials-track-a {
    animation: marquee-up 22s linear infinite;
}
.testimonials-track-b {
    animation: marquee-up 30s linear infinite;
}
.testimonials-marquee:hover .testimonials-track {
    animation-play-state: paused;
}

@keyframes marquee-up {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* Individual card */
.testimonial-card {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.testimonial-mark {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    opacity: 0.4;
    letter-spacing: -0.02em;
}

.testimonial-quote {
    font-size: 0.875rem;
    color: var(--text-dim);
    line-height: 1.75;
    margin: 0;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.testimonial-author {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.testimonial-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.testimonial-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}
.testimonial-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.testimonial-name {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.testimonial-role {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Contact
───────────────────────────────────────────────────────────────────────────── */
#contact {
    background: var(--bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}
@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
}

.contact-cta {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 2rem;
}
.contact-cta .line-accent { color: var(--accent); }

.contact-cta-btn {
    margin-bottom: 2.5rem;
}
.contact-direct {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.contact-email-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border-mid);
    padding-bottom: 0.2rem;
    transition: color 0.2s, border-color 0.2s;
    width: fit-content;
}
.contact-email-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.contact-socials {
    display: flex;
    gap: 1.25rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.contact-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.2s;
}
.contact-social-link:hover { color: var(--accent); }

.contact-info-list {
    list-style: none;
    margin: 0; padding: 0;
}
.contact-info-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.contact-info-item:first-child { border-top: 1px solid var(--border); }
.info-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.info-value {
    font-size: 0.92rem;
    color: var(--text-dim);
}
.info-value a:hover { color: var(--text); }

/* Pricing signal */
.contact-pricing {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.contact-pricing-range {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-dim);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Footer
───────────────────────────────────────────────────────────────────────────── */
.shl-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 2;
    background: var(--bg);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}
.footer-coa {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.6;
    display: block;
}
.footer-copy {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-align: center;
    line-height: 1.7;
}
.footer-colophon {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    text-align: right;
    line-height: 1.7;
}

@media (max-width: 640px) {
    .footer-inner {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        text-align: center;
    }
    .footer-brand {
        flex-direction: column;
        align-items: center;
        gap: 0.65rem;
    }
    .footer-copy {
        text-align: center;
    }
    .footer-colophon {
        text-align: center;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Hero Tags — desktop hover effect / mobile always visible
───────────────────────────────────────────────────────────────────────────── */

/* Mobile: all tags fully visible, all lines blue */
@media (max-width: 860px) {
    .hero-tag {
        color: var(--text-dim);
        transition: none;
    }
    .hero-tag::after {
        background: var(--accent);
        opacity: 0.5;
    }
    .hero-tags { align-items: flex-start; }
}

/* Desktop: dim by default, stagger-brighten on "Start a Project" hover */
@media (min-width: 861px) {
    .hero-tag {
        transition: color 0.25s ease;
    }
    /* All three lines are accent blue — dim at rest, full on hover */
    .hero-tag::after {
        background: var(--accent);
        opacity: 0.25;
        transition: opacity 0.25s ease;
    }
    /* Hover state — triggered when .btn-shl-ghost inside .hero-right is hovered */
    .hero-right:has(.btn-shl-ghost:hover) .hero-tag:nth-child(1) {
        color: var(--text);
        transition-delay: 0s;
    }
    .hero-right:has(.btn-shl-ghost:hover) .hero-tag:nth-child(2) {
        color: var(--text);
        transition-delay: 0.06s;
    }
    .hero-right:has(.btn-shl-ghost:hover) .hero-tag:nth-child(3) {
        color: var(--text);
        transition-delay: 0.12s;
    }
    .hero-right:has(.btn-shl-ghost:hover) .hero-tag::after {
        opacity: 1;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Contact Lightbox — Terminal Edition
───────────────────────────────────────────────────────────────────────────── */

/* Terminal cursor blink after NEW INQUIRY label */
.contact-lightbox-eyebrow::after {
    content: '▋';
    display: inline-block;
    margin-left: 0.35em;
    color: var(--accent);
    animation: terminal-blink 3s ease-in-out infinite;
    font-size: 0.75em;
    vertical-align: middle;
}

/* Corner bracket markers */
.contact-lightbox-box::before,
.contact-lightbox-box::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--accent);
    border-style: solid;
    opacity: 0.5;
    pointer-events: none;
    z-index: 2;
}
.contact-lightbox-box::before {
    top: -1px; left: -1px;
    border-width: 2px 0 0 2px;
}
.contact-lightbox-box::after {
    bottom: -1px; right: -1px;
    border-width: 0 2px 2px 0;
}

/* Bottom-left + top-right corners via extra pseudo on the header */
.contact-lightbox-header::before,
.contact-lightbox-header::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--accent);
    border-style: solid;
    opacity: 0.5;
    pointer-events: none;
}
.contact-lightbox-header::before {
    top: -1px; right: -1px;
    border-width: 2px 2px 0 0;
}
.contact-lightbox-header::after {
    bottom: -1px; left: -1px;
    border-width: 0 0 2px 2px;
}

.contact-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.contact-lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}
.contact-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(14,14,14,0.93);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    /* Tech grid on overlay */
    background-image:
        repeating-linear-gradient(0deg,   transparent, transparent 79px, rgba(180,140,60,0.04) 80px),
        repeating-linear-gradient(90deg,  transparent, transparent 79px, rgba(180,140,60,0.04) 80px);
}
.contact-lightbox-box {
    position: relative;
    z-index: 1;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    /* Scanline overlay on the box */
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(0,0,0,0.18) 4px
        );
    border-left: 2px solid var(--accent);
    width: 100%;
    max-width: 580px;
    padding: 3rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
}
.contact-lightbox-box::-webkit-scrollbar {
    display: none;
}
.contact-lightbox.is-open .contact-lightbox-box {
    transform: translateY(0);
}
.contact-lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem;
    line-height: 1;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-lightbox-close:hover { color: var(--text); }

.contact-lightbox-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.contact-lightbox-sub {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-bottom: 0;
    line-height: 1.6;
}
.contact-lightbox-header { margin-bottom: 0; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 0; margin-top: 2.5rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
}
@media (max-width: 640px) {
    /* Bottom sheet layout */
    .contact-lightbox {
        align-items: flex-end;
        padding: 0;
    }
    .contact-lightbox-box {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
        border-left: none;
        border-top: 2px solid var(--accent);
        padding: 2.5rem 1.5rem 3rem;
        transform: translateY(100%);
        transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
    }
    .contact-lightbox.is-open .contact-lightbox-box {
        transform: translateY(0);
    }
    /* Hide corner brackets — don't suit bottom sheet */
    .contact-lightbox-box::before,
    .contact-lightbox-box::after,
    .contact-lightbox-header::before,
    .contact-lightbox-header::after {
        display: none;
    }
    /* Drag handle indicator */
    .contact-lightbox-box .contact-lightbox-header::before {
        content: '';
        display: block;
        width: 36px;
        height: 3px;
        background: var(--border-strong);
        border-radius: 2px;
        margin: 0 auto 1.75rem;
        position: static;
        border: none;
        opacity: 1;
    }
    .form-row { grid-template-columns: 1fr; }
    .contact-lightbox-close {
        top: 1.5rem;
        right: 1.5rem;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.75rem;
}
.form-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}
.form-input {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-mid);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 0.65rem 0;
    outline: none;
    transition: border-color 0.2s;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}
.form-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: none;
}
.form-input::placeholder { color: var(--text-muted); font-size: 0.9rem; }

.form-select {
    cursor: pointer;
    color: var(--text-dim);
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c4983a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-left: 0.85rem;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    appearance: none;
}
.form-select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: none;
    background-color: var(--surface);
}
.form-select option {
    background: #141414;
    color: var(--text);
    padding: 0.5rem;
}
.form-select option:checked,
.form-select option:hover {
    background: #1e1a12;
    color: var(--accent);
}

.form-textarea {
    resize: vertical;
    min-height: 90px;
    font-family: var(--font-body);
    line-height: 1.6;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}
.form-submit-btn {
    flex-shrink: 0;
}
.form-note {
    color: var(--text-muted);
}

.form-status {
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    min-height: 1.2em;
}
.form-status.success { color: #4caf7d; }
.form-status.error   { color: #cf6679; }

/* ─────────────────────────────────────────────────────────────────────────────
   Accessibility
───────────────────────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%; left: 1rem;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
    border: 1px solid var(--border-mid);
}
.skip-link:focus { top: 1rem; }

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Single Post
───────────────────────────────────────────────────────────────────────────── */
.post-content-wrapper { max-width: 800px; margin: 0 auto; padding: 2rem 2rem 5rem; }
.post-title { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.03em; }
.post-meta  { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.1em; }
.post-body  { font-size: 1rem; line-height: 1.85; color: var(--text-dim); }
.post-body h2, .post-body h3 { font-family: var(--font-display); color: var(--text); margin-top: 2rem; }
.post-body a { color: var(--accent); border-bottom: 1px solid transparent; }
.post-body a:hover { border-color: var(--accent); }

/* ─────────────────────────────────────────────────────────────────────────────
   Twitch Live Badge
───────────────────────────────────────────────────────────────────────────── */
.twitch-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.4rem 0.9rem 0.4rem 0.7rem;
    background: rgba(145, 70, 255, 0.12);
    border: 1px solid rgba(145, 70, 255, 0.35);
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a970ff;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.twitch-live-badge:hover {
    background: rgba(145, 70, 255, 0.22);
    border-color: rgba(145, 70, 255, 0.6);
    color: #bf8fff;
}
.twitch-live-dot {
    width: 7px;
    height: 7px;
    background: #9146ff;
    border-radius: 50%;
    flex-shrink: 0;
    animation: twitch-pulse 1.4s ease infinite;
}
@keyframes twitch-pulse {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Scroll-Spy Nav Active State
───────────────────────────────────────────────────────────────────────────── */
.nav-links a.nav-active {
    color: var(--text);
    position: relative;
}
.nav-links a.nav-active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    background: var(--accent);
    border-radius: 50%;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Signal Archive — Magazine Layout
───────────────────────────────────────────────────────────────────────────── */
.signal-archive-main {
    padding-top: calc(var(--nav-h) + 4rem);
    min-height: 80vh;
    position: relative;
    isolation: isolate;
}

/* Tech grid background — fades out below the masthead */
.signal-archive-main::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    /* Fine grid: large cells subdivided by a smaller inner grid */
    background-image:
        linear-gradient(rgba(196,152,58,0.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(196,152,58,0.10) 1px, transparent 1px),
        linear-gradient(rgba(196,152,58,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(196,152,58,0.04) 1px, transparent 1px);
    background-size:
        80px 80px,
        80px 80px,
        20px 20px,
        20px 20px;

    /* Fade: strong at top, gone by ~55% down */
    -webkit-mask-image: linear-gradient(to bottom,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.55) 25%,
        rgba(0,0,0,0.15) 45%,
        rgba(0,0,0,0)    55%
    );
    mask-image: linear-gradient(to bottom,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.55) 25%,
        rgba(0,0,0,0.15) 45%,
        rgba(0,0,0,0)    55%
    );
}

/* Radial hotspot — subtle glow at top-center to anchor the grid */
.signal-archive-main::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(
        ellipse 70% 40% at 50% 0%,
        rgba(196,152,58,0.05) 0%,
        transparent 70%
    );
}

.signal-masthead {
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}
.signal-masthead-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.signal-issue {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}
.signal-title-lg {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.92;
    color: var(--text);
    margin: 0;
}
.signal-tagline {
    font-size: 0.9rem;
    color: var(--text-dim);
    max-width: 460px;
    line-height: 1.75;
    margin: 0;
    padding-top: 0.25rem;
}
.signal-masthead-rule {
    margin-top: 2.5rem;
    border: none;
    border-top: 1px solid var(--border-mid);
}

.signal-socials {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.signal-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.2s;
}
.signal-social-link:hover { color: var(--accent); }

/* Featured post */
.signal-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
    margin-bottom: 1px;
}
@media (max-width: 768px) {
    .signal-featured { grid-template-columns: 1fr; }
}

.signal-featured-img {
    background: var(--surface-3);
    overflow: hidden;
    min-height: 300px;
}
.signal-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.75) saturate(0.7);
    transition: transform 0.6s ease, filter 0.4s ease;
}
.signal-featured:hover .signal-featured-img img {
    transform: scale(1.03);
    filter: brightness(0.65) saturate(0.8);
}
.signal-featured-no-img {
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}
.signal-featured-no-img-inner {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 700;
    color: var(--border-mid);
    letter-spacing: -0.04em;
}

.signal-featured-body {
    background: var(--surface);
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
}
.signal-featured-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.signal-featured-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}
.signal-featured-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 1rem;
}
.signal-featured-title a { color: inherit; transition: color 0.2s; }
.signal-featured-title a:hover { color: var(--accent); }

.signal-featured-excerpt {
    font-size: 0.925rem;
    color: var(--text-dim);
    line-height: 1.8;
    flex: 1;
    margin-bottom: 2rem;
}
.signal-featured-link {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s;
    width: fit-content;
}
.signal-featured-link:hover { gap: 0.7rem; color: var(--accent); }

/* Post list (remaining posts) */
.signal-list {
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}

.signal-list-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.signal-list-item:last-child { border-bottom: none; }
.signal-list-item:hover { background: var(--surface-2); }

@media (max-width: 560px) {
    .signal-list-item { grid-template-columns: 1fr; gap: 0.75rem; padding: 1.25rem 1.25rem; }
}

.signal-list-meta {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.signal-list-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 0.4rem;
}
.signal-list-title a { color: inherit; transition: color 0.2s; }
.signal-list-title a:hover { color: var(--accent); }
.signal-list-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.signal-list-read {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    white-space: nowrap;
    transition: color 0.2s;
    align-self: center;
}
.signal-list-item:hover .signal-list-read { color: var(--accent); }

/* Empty state */
.signal-empty {
    padding: 5rem 2rem;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--r);
    color: var(--text-muted);
}

/* Pagination */
.signal-pagination {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.signal-pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}
.signal-pagination .page-numbers {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s;
}
.signal-pagination .page-numbers.current,
.signal-pagination .page-numbers:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Archive hero — taller than homepage featured */
.signal-archive-hero {
    min-height: 520px;
}
@media (max-width: 768px) {
    .signal-archive-hero { min-height: 380px; }
}

/* Section label between blocks */
.signal-archive-label {
    margin: 2.5rem 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}
.signal-archive-label::before {
    content: '';
    display: block;
    width: 28px; height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

/* Compact archive list (post 5+) */
.signal-compact-list {
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}
.signal-compact-item {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    color: inherit;
    text-decoration: none;
}
.signal-compact-item:last-child { border-bottom: none; }
.signal-compact-item:hover { background: var(--surface-2); }

@media (max-width: 640px) {
    .signal-compact-item {
        grid-template-columns: 1fr auto;
        gap: 1rem;
        padding: 1rem 1.25rem;
    }
    .signal-compact-left { display: none; }
}

.signal-compact-left {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.signal-compact-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.3;
    transition: color 0.2s;
}
.signal-compact-item:hover .signal-compact-title { color: var(--text); }

.signal-compact-arrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.signal-compact-item:hover .signal-compact-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* Signal back link */
.signal-back {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.2s;
    display: inline-block;
    margin-top: 3rem;
    padding-bottom: 4rem;
}
.signal-back:hover { color: var(--text); }

/* ─────────────────────────────────────────────────────────────────────────────
   Single Post — Full editorial layout
───────────────────────────────────────────────────────────────────────────── */
.single-post-main { background: var(--bg); }

/* ── Cover / hero ── */
.post-cover {
    position: relative;
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background: var(--surface-2);
}
.post-cover-img {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.post-cover-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.45) saturate(0.65);
}
.post-cover-overlay {
    position: relative;
    z-index: 1;
    padding: calc(var(--nav-h) + 2rem) 0 4rem;
    background: linear-gradient(transparent, rgba(14,14,14,0.85) 60%, var(--bg) 100%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* When no image: solid surface, title is dark-on-dark — still reads via contrast */
.post-cover:not(:has(.post-cover-img)) {
    background: var(--surface);
}
.post-cover:not(:has(.post-cover-img)) .post-cover-overlay {
    background: none;
    padding-top: calc(var(--nav-h) + 4rem);
}

.post-back-link {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 2rem;
}
.post-back-link:hover { color: var(--accent); }

.post-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.post-cat-label { color: var(--accent) !important; }

.post-cover-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: var(--text);
    margin: 0;
    max-width: 820px;
    text-shadow: 0 2px 30px rgba(0,0,0,0.5);
    text-align: center;
}

/* ── Simple header — no featured image ── */
.post-simple-header {
    padding: calc(var(--nav-h) + 3.5rem) 0 3rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
    text-align: center;
}
.post-simple-header .post-back-link {
    margin-left: auto;
    margin-right: auto;
}
.post-simple-header .post-cover-title {
    margin: 0 auto;
}

/* ── Layout grid ── */
.post-layout {
    max-width: 760px;
    margin: 0 auto;
    padding: 4rem 0 2rem;
}

/* ── Post body ── */
.post-content-col { all: unset; display: block; }

.post-body {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-dim);
}
.post-body > p:first-of-type { color: var(--text); }
.post-body > p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 0.82;
    float: left;
    margin-right: 0.08em;
    margin-top: 0.06em;
    color: var(--text);
}

.post-body h2 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text);
    margin: 2.75rem 0 1rem;
    line-height: 1.2;
}
.post-body h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin: 2rem 0 0.75rem;
    letter-spacing: -0.02em;
}
.post-body p { margin-bottom: 1.5rem; }
.post-body a { color: var(--accent); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.post-body a:hover { border-color: var(--accent); }

.post-body blockquote {
    border-left: 2px solid var(--accent);
    margin: 2.5rem 0;
    padding: 0.25rem 0 0.25rem 1.75rem;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text);
    line-height: 1.7;
}
.post-body blockquote cite {
    display: block;
    font-size: 0.8rem;
    font-style: normal;
    color: var(--text-muted);
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
}

.post-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border: 1px solid var(--border);
    border-radius: var(--r);
}
.post-body figure { margin: 2rem 0; }
.post-body figcaption {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-align: center;
    margin-top: 0.75rem;
}

.post-body code {
    font-family: var(--font-mono);
    font-size: 0.84em;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 0.15em 0.45em;
    border-radius: 2px;
    color: var(--accent);
}
.post-body pre {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 1.75rem;
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: var(--r);
    border-left: 2px solid var(--border-mid);
}
.post-body pre code { background: none; border: none; padding: 0; color: var(--text-dim); font-size: 0.88rem; }

.post-body ul, .post-body ol {
    padding-left: 1.25rem;
    margin-bottom: 1.5rem;
}
.post-body li { margin-bottom: 0.4rem; }

.post-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

/* ── Tags ── */
.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.post-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 1px;
    transition: color 0.2s, border-color 0.2s;
}
.post-tag:hover { color: var(--accent); border-color: var(--accent); }

/* ── Read aloud ── */
.post-listen {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
}
.post-listen-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.55rem 1rem;
    cursor: pointer;
    border-radius: 2px;
    transition: color 0.2s, border-color 0.2s;
}
.post-listen-btn:hover,
.post-listen-btn.is-playing {
    color: var(--accent);
    border-color: var(--accent);
}
.post-listen-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 160px;
}
.post-listen-progress {
    flex: 1;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.post-listen-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    transition: width 0.5s linear;
}
.post-listen-stop {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}
.post-listen-stop:hover { color: var(--text); }

/* ── Share strip ── */
.post-share {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.post-share-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.post-share-btn {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border-mid);
    border-radius: var(--r);
    background: none;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    text-decoration: none;
    display: inline-block;
}
.post-share-btn:hover { color: var(--accent); border-color: var(--accent); }

/* ── Post navigation ── */
.post-nav-grid {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}
@media (max-width: 500px) { .post-nav-grid { grid-template-columns: 1fr; } }

.post-nav-item {
    background: var(--bg);
    padding: 1.5rem 1.75rem;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    color: inherit;
    text-decoration: none;
}
.post-nav-item:hover { background: var(--surface-2); }
.post-nav-item.is-next { text-align: right; align-items: flex-end; }

.post-nav-dir {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.post-nav-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dim);
    line-height: 1.3;
    letter-spacing: -0.01em;
    transition: color 0.2s;
}
.post-nav-item:hover .post-nav-title { color: var(--text); }

/* ── More from The Signal ── */
.post-more-section {
    padding: 5rem 0 6rem;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    background: var(--surface);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Large Breakpoints — MacBook (1280–1440px) and up
───────────────────────────────────────────────────────────────────────────── */

/* Single post — larger breakpoints */
@media (min-width: 1280px) {
    .post-cover    { min-height: 62vh; }
    .post-layout   { max-width: 820px; padding: 5rem 0 3rem; }
    .post-body     { font-size: 1.08rem; }
}
@media (min-width: 1440px) {
    .post-cover       { min-height: 68vh; }
    .post-cover-title { font-size: clamp(2.5rem, 4vw, 5rem); }
    .post-layout      { max-width: 880px; }
    .post-body        { font-size: 1.1rem; line-height: 1.95; }
}
@media (min-width: 1920px) {
    .post-cover    { min-height: 72vh; }
    .post-layout   { max-width: 960px; padding: 6rem 0 4rem; }
    .post-body     { font-size: 1.15rem; }
}

/* 1280px — MacBook 13" / Air */
@media (min-width: 1280px) {
    :root { --section-pad: 7rem; }
    .shl-container { max-width: 1280px; }

    .hero-sub-row { margin-top: 3.5rem; }

    /* Services: tighten padding proportionally */
    .service-card { padding: 3rem 2.75rem; }

    /* Work featured body: more breathing room */
    .work-featured-body { padding: 3.25rem 3rem; }

    /* About: widen gap */
    .about-grid { gap: 7rem; }

    /* Contact: widen gap */
    .contact-grid { gap: 7rem; }
}

/* Short laptop viewports — 1280x800 / 1440x900
   Layout: title left, buttons right, available for projects far right */
@media (min-width: 1280px) and (max-height: 920px) {
    #hero { padding-bottom: 3.5rem; }

    .hero-title {
        font-size: clamp(3.4rem, 7.5vw, 7rem);
    }
    .hero-sub-row {
        margin-top: 1.75rem;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        gap: 2rem;
    }
    /* Hide description — gives clean open space between title and buttons */
    .hero-desc { display: none; }

    .hero-right {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
        flex-shrink: 0;
    }
    /* Hide tags — buttons + available for projects carry the right side */
    .hero-tags { display: none; }
    .hero-actions {
        flex-direction: row;
        gap: 0.75rem;
        /* Unhide Start a Project at this breakpoint */
    }
    .hero-cta-desktop { display: inline-flex; }
}

@media (min-width: 1440px) and (max-height: 920px) {
    .hero-title {
        font-size: clamp(4rem, 8vw, 8rem);
    }
}

/* 1440px — MacBook 14"/16" Pro, common desktop */
@media (min-width: 1440px) {
    :root { --section-pad: 8rem; }
    .shl-container { max-width: 1380px; }

    /* Hero: let the display title breathe more */
    .hero-title {
        font-size: clamp(5rem, 9vw, 10rem);
    }

    /* Wider featured post */
    .work-featured { gap: 1px; }
    .work-featured-body { padding: 3.5rem; }

    /* Signal featured hero: taller at large screens */
    .signal-archive-hero { min-height: 600px; }
    .signal-featured-post { min-height: 480px; }

    /* Contact grid wider split */
    .contact-grid { grid-template-columns: 5fr 4fr; gap: 8rem; }

    /* Testimonials marquee: taller viewport */
    .testimonials-marquee { height: 500px; }
}

/* 1920px — large desktop / external monitors */
@media (min-width: 1920px) {
    :root { --section-pad: 9rem; }
    .shl-container { max-width: 1600px; }

    .hero-title { font-size: clamp(6rem, 8vw, 11rem); }

    .signal-archive-hero { min-height: 680px; }

    /* Stat boxes: more generous padding */
    .stat-box { padding: 2.25rem 2rem; }

    /* Work grid: 3-col at very large screens */
    .work-grid { grid-template-columns: repeat(3, 1fr); }
    .work-item { min-height: 320px; }

    /* Signal promo — full-width 4-col strip */
    .work-signal-promo {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 2fr 3fr 1fr;
        align-items: center;
        gap: 0;
        padding: 3.5rem 4rem;
    }
    .work-signal-promo .wsp-eyebrow {
        font-family: var(--font-mono);
        font-size: 0.7rem;
        letter-spacing: 0.18em;
        text-transform: uppercase;
        color: var(--gold);
        border-right: 1px solid rgba(255,255,255,0.08);
        padding-right: 3rem;
        line-height: 1.4;
    }
    .work-signal-promo .wsp-title {
        font-family: var(--font-display);
        font-size: 1.55rem;
        font-weight: 700;
        letter-spacing: -0.03em;
        line-height: 1.15;
        color: var(--text);
        padding: 0 3rem;
        border-right: 1px solid rgba(255,255,255,0.08);
    }
    .work-signal-promo .wsp-desc {
        font-family: var(--font-body);
        font-size: 0.875rem;
        font-weight: 300;
        line-height: 1.75;
        color: var(--text-dim);
        max-width: 100%;
        padding: 0 3rem;
        border-right: 1px solid rgba(255,255,255,0.08);
    }
    .work-signal-promo .wsp-link {
        font-family: var(--font-mono);
        font-size: 0.7rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--accent);
        padding-left: 3rem;
        white-space: nowrap;
    }

    /* Testimonials: 3 visible rows */
    .testimonials-marquee { height: 560px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Small Screen Tweaks
───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 576px) {
    :root { --section-pad: 4rem; }
    .shl-container { padding: 0 1.25rem; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
}
