/* ════════════════════════════════════════════════════
   FONTS + SEASONAL THEME
   Modify css/themes.css to switch season.
   ════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');
@import url('./themes.css');

/* ════════════════════════════════════════════════════
   BASE
   ════════════════════════════════════════════════════ */
body {
    font-family:      var(--font-main);
    font-size:        16px;
    line-height:      1.6;
    background-color: var(--background);
    color:            var(--text-color);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height:       100vh;
    display:          flex;
    flex-direction:   column;
}

/* ════════════════════════════════════════════════════
   SEMANTIC LAYOUT
   ════════════════════════════════════════════════════ */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
    width: 100%;
}

section {
    margin-bottom: 3rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

/* ════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════ */
/* ════════════════════════════════════════════════════
   NAVBAR
   ════════════════════════════════════════════════════ */
.navbar {
    background-color: var(--header-color) !important;
    border-bottom: none;
    height: 54px !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
}

.navbar .container {
    max-width: 900px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ensure content spreads correctly */
    height: 100%;
}

.navbar .navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
    height: 44px;
    display: flex;
    align-items: center;
}

.navbar-prompt {
    font-family:    var(--font-mono);
    font-size:      13px;
    color:          rgba(255,255,255,0.45);
    letter-spacing: 0.02em;
    white-space:    nowrap;
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: #fff !important;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .02em;
    opacity: .95;
    padding: 0 0.5rem !important;
    height: 54px;
    display: flex;
    align-items: center;
}
.navbar .nav-link:hover { opacity: 1; text-decoration: underline; }

/* Mobile: expanded collapse panel */
@media (max-width: 991px) {
    .navbar {
        height: auto !important;
        padding: 0 !important;
        flex-wrap: wrap;
    }
    .navbar .container {
        flex-wrap: wrap;
        height: auto;
        padding-top: 4px;
        padding-bottom: 4px;
    }
    .navbar-collapse {
        background-color: var(--header-color);
        width: 100%;
        padding-bottom: 0.5rem;
    }
    .navbar .nav-link {
        height: auto;
        padding: 0.45rem 0.5rem !important;
        justify-content: center;
    }
    .navbar-prompt { display: none; }
    .navbar .navbar-nav {
        width: 100%;
    }
}

.logo {
    width:  32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.navbar-toggler {
    padding: 2px !important;
    border: none !important;
    box-shadow: none !important;
}
.navbar-toggler-icon {
    width: 1.2rem !important;
    height: 1.2rem !important;
}
.theme-toggle {
    border: none !important;
    background: transparent;
    padding: 5px !important;
    box-shadow: none !important;
}
.theme-icon {
    color: rgba(255,255,255,0.7) !important;
    font-size: 1rem;
    margin: 0;
    transition: color 0.2s;
}
.theme-toggle:hover .theme-icon {
    color: #fff !important;
}

/* ════════════════════════════════════════════════════
   SEASON PICKER
   ════════════════════════════════════════════════════ */
.season-picker {
    gap: 0;
    height: 44px;
    padding: 0 0.25rem;
}
.season-btn {
    background:     none;
    border:         none;
    font-family:    var(--font-main);
    font-size:      12px;
    color:          rgba(255,255,255,0.45);
    cursor:         pointer;
    padding:        0 4px;
    letter-spacing: 0.04em;
    line-height:    1;
    transition:     color 0.15s;
}
.season-btn:hover  { color: rgba(255,255,255,0.85); }
.season-btn.active {
    color:                 rgba(255,255,255,0.95);
    text-decoration:       underline;
    text-underline-offset: 3px;
}
.season-sep {
    font-family: var(--font-main);
    font-size:   11px;
    color:       rgba(255,255,255,0.2);
    padding:     0 1px;
    user-select: none;
}
@media (max-width: 991px) {
    .season-picker {
        height: auto;
        padding: 0.45rem 0.5rem;
        justify-content: center;
        width: 100%;
    }
}

/* ════════════════════════════════════════════════════
   HEADINGS
   ════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text-color);
}
h1 { font-size: 28px; }

/* // style for project-detail subheadings */
.project-details h2 {
    font-family:    var(--font-mono);
    font-size:      0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight:    600;
    color:          var(--text-secondary);
    margin-bottom:  0.6rem;
}
.project-details h2::before {
    content:  '// ';
    opacity:  0.45;
    font-weight: 400;
}

/* blinking cursor in navbar prompt */
.nb-cursor {
    animation:   blink 1.2s step-end infinite;
    font-size:   0.75em;
    opacity:     0.55;
    margin-left: 2px;
}
@keyframes blink {
    0%, 100% { opacity: 0.55; }
    50%       { opacity: 0; }
}

/* vertical video (Shorts 9:16) */
.video-wrap-vertical { max-width: 260px; }
.video-embed-vertical { aspect-ratio: 9 / 16 !important; }

/* youtube thumbnail */
.video-thumb-link { display: block; text-decoration: none; }
.video-wrap {
    width:        100%;
    margin-bottom: 1rem;
    position:     relative;
}
.video-embed {
    width:        100%;
    aspect-ratio: 16 / 9;
    border:       1px solid var(--background-darker);
    display:      block;
}
.video-play-overlay {
    position:    absolute;
    inset:       0;
    display:     flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size:   0.85rem;
    color:       #fff;
    background:  rgba(0,0,0,0.35);
    letter-spacing: 0.06em;
    transition:  background 0.2s;
}
.video-thumb-link:hover .video-play-overlay {
    background: rgba(0,0,0,0.55);
}

/* line numbers in project list */
.project-num {
    font-family:  var(--font-mono);
    font-size:    11px;
    color:        var(--text-secondary);
    opacity:      0.4;
    margin-right: 0.55rem;
    user-select:  none;
    min-width:    2ch;
    display:      inline-block;
    text-align:   right;
}

/* ════════════════════════════════════════════════════
   PROJECT LIST & ITEMS
   ════════════════════════════════════════════════════ */
.project-list {
    display: flex;
    flex-direction: column;
}

.project-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--background-darker);
}

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

.project-item h5 a,
.project-item h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.project-item h5 a:hover,
.project-item h3 a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.tech-icons {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* ════════════════════════════════════════════════════
   BOTTONE — stile outline/link come HN
   ════════════════════════════════════════════════════ */
a.btn {
    font-family:   var(--font-main);
    font-size:     14px;
    font-weight:   500;
    padding:       3px 10px;
    border-radius: var(--radius);
    background-color: transparent !important;
    color:         var(--primary-color) !important;
    border:        1px solid var(--primary-color) !important;
    transition:    background-color .12s, color .12s;
    text-decoration: none;
    display: inline-block;
}

a.btn:hover {
    background-color: var(--primary-color) !important;
    color:            #fff !important;
}

/* ════════════════════════════════════════════════════
   ICONE TECNOLOGIA
   ════════════════════════════════════════════════════ */
.fab, .fas, .fa, .fa-brands, .fa-sharp, .bi, .fa-solid {
    color:       var(--primary-color) !important;
    font-size:   1.1rem;
    vertical-align: middle;
}

/* ════════════════════════════════════════════════════
   FOOTER — statusline
   ════════════════════════════════════════════════════ */
body > footer {
    background-color: var(--text-color);
    color:            var(--background);
    font-family:      var(--font-mono);
    font-size:        12px;
    letter-spacing:   0.03em;
    padding:          5px 1.5rem;
    margin-top:       4rem;
    display:          flex;
    justify-content:  space-between;
    align-items:      center;
    gap:              1rem;
    user-select:      none;
}
body > footer a {
    color:           var(--background);
    text-decoration: none;
    opacity:         0.65;
}
body > footer a:hover { opacity: 1; text-decoration: underline; }
.sl-sep { opacity: 0.3; margin: 0 0.35rem; }
.sl-right { display: flex; align-items: center; flex-wrap: wrap; gap: 0; }

@media (max-width: 576px) {
    body > footer { flex-direction: column; gap: 4px; text-align: center; }
}

/* ════════════════════════════════════════════════════
   HERO INTERNO (LEGACY)
   ════════════════════════════════════════════════════ */
#higer-main { display: none; }

/* ════════════════════════════════════════════════════
   PROJECT DETAILS GRID
   ════════════════════════════════════════════════════ */
.project-intro {
    text-align: center;
    margin: 2rem 0 3rem;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
    align-items: start;
}

.expandable-img {
    cursor: zoom-in;
    border-radius: var(--radius);
    transition: transform 0.2s;
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ════════════════════════════════════════════════════
   LIGHTBOX
   ════════════════════════════════════════════════════ */
#lightbox-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.85);
    display: none;
    justify-content: center; align-items: center;
    z-index: 1050;
}
#lightbox-overlay img {
    max-width: 90%; max-height: 90%;
    border-radius: var(--radius);
    cursor: zoom-out;
}

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media screen and (max-width: 576px) {
    body { font-size: 15px; }
    h1 { font-size: 24px; }
    .project-item h3 { font-size: 1.25rem; }
    .project-item p { font-size: 0.9rem; }
}

/* ════════════════════════════════════════════════════
   PROJECT LIST EXTRAS
   ════════════════════════════════════════════════════ */
.project-desc     { font-size: 0.9rem; }
.project-ext-link { font-size: 0.8rem; }

/* ════════════════════════════════════════════════════
   CAROUSEL
   ════════════════════════════════════════════════════ */
.carousel-control-prev,
.carousel-control-next {
    background-color: transparent;
    border: none;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1);
}
[data-bs-theme="dark"] .carousel-control-prev-icon,
[data-bs-theme="dark"] .carousel-control-next-icon {
    filter: none;
}

/* ════════════════════════════════════════════════════
   CODE & PRE
   ════════════════════════════════════════════════════ */
code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--background-darker);
    padding: 1px 5px;
    border-radius: 3px;
}
pre {
    font-family: var(--font-mono);
    font-size: 0.82em;
    background: var(--background-darker);
    padding: 1rem;
    line-height: 1.5;
    overflow-x: auto;
    border-radius: var(--radius);
}
pre code { background: none; padding: 0; font-size: inherit; }

/* ════════════════════════════════════════════════════
   TABLES (tech stack / benchmark)
   ════════════════════════════════════════════════════ */
.tech-table { font-size: 0.9rem; }
.tech-table th,
.benchmark-table th { font-weight: 600; white-space: nowrap; }
.benchmark-table tr.deployed td { font-weight: 700; }
.status-badge { font-size: 0.85rem; }

/* ════════════════════════════════════════════════════
   UTILITY
   ════════════════════════════════════════════════════ */
.img-cover { object-fit: cover; }

/* ════════════════════════════════════════════════════
   BLOG LIST
   ════════════════════════════════════════════════════ */
.post-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--background-darker);
}
.post-item:last-child { border-bottom: none; }
.post-item h3 a { color: var(--text-color); text-decoration: none; }
.post-item h3 a:hover { color: var(--primary-color); text-decoration: underline; }
.post-meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
    margin-top: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}
.post-meta .views-count { display: inline-flex; align-items: center; gap: 0.3rem; }
.post-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tag-badge {
    background: var(--background-darker);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 3px;
}

/* ════════════════════════════════════════════════════
   BLOG POST
   ════════════════════════════════════════════════════ */
.post-header { margin: 2rem 0 2.5rem; }
.post-header h1 { font-size: 2rem; line-height: 1.3; margin-bottom: 0.75rem; }
@media (max-width: 576px) {
    .post-header h1 { font-size: 1.4rem; }
}
.post-back { font-size: 13px; color: var(--text-secondary); text-decoration: none; }
.post-body { font-size: 16px; line-height: 1.8; }
.post-body h2 { font-size: 1.4rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
.post-body h3 { font-size: 1.1rem; margin-top: 1.75rem; margin-bottom: 0.5rem; }
.post-body p  { margin-bottom: 1.2rem; }
.post-body code { font-size: 0.875em; padding: 0.1em 0.35em; }
.post-body pre  { padding: 1.25rem; margin: 1.5rem 0; }
.post-body pre code { font-size: 0.85rem; }
.post-body blockquote {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}
.post-divider { border: none; border-top: 1px solid var(--background-darker); margin: 3rem 0; }
.post-nav { display: flex; justify-content: space-between; font-size: 14px; }
.post-nav a { color: var(--primary-color); text-decoration: none; }
.post-nav a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════
   404 PAGE
   ════════════════════════════════════════════════════ */
.page-404 { text-align: center; padding-top: 5rem; }
.page-404 .error-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.page-404 .error-code {
    font-family: var(--font-mono);
    font-size: 5.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
}
.page-404 .error-msg {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}
.page-404 .error-back { font-family: var(--font-mono); font-size: 0.85rem; }

/* ════════════════════════════════════════════════════
   HEARD LANDING PAGE
   ════════════════════════════════════════════════════ */
:root { --heard-1: #ff4d2e; --heard-2: #ff8a00; }

/* match the site's container width so it lines up with the navbar */
.heard-main { max-width: 900px; }

/* ── HERO ───────────────────────────────────────────── */
.heard-hero { text-align: center; margin: 1.5rem 0 3.5rem; }
/* ── FIXED COVER (image stays put, content scrolls up over it) ── */
body.heard-landing { background: transparent; }

.heard-cover-img {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: center 45%;
    z-index: 0;
}
.heard-scrim {
    position: fixed;
    inset: 0;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0.18) 38%, rgba(0,0,0,0.68));
}
.heard-cover {
    position: relative;
    z-index: 1;
    height: 100vh;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
}
.heard-back-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}
.heard-back-link:hover { color: #fff; }
.heard-back-link:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
.heard-cover .heard-logo {
    margin-bottom: 1.2rem;
    box-shadow: 0 12px 44px rgba(0,0,0,0.45);
}
.heard-cover .heard-eyebrow { color: rgba(255,255,255,0.82); margin-bottom: 0.6rem; }
.heard-cover-title {
    font-size: clamp(3rem, 13vw, 6.5rem);
    line-height: 1;
    margin: 0;
    background: linear-gradient(100deg, #ff7a4d, #ffc24d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 3px 16px rgba(0,0,0,0.45));
}
.heard-cover-tagline {
    font-family: var(--font-heading);
    font-style: italic;
    color: #fff;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin: 0.7rem 0 0;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.heard-scrolldown {
    position: absolute;
    bottom: 2.4rem;
    left: 50%;
    transform: translateX(-50%);
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    animation: heard-bounce 1.8s ease-in-out infinite;
}
.heard-scrolldown i { color: #fff !important; font-size: 0.95rem; }
.heard-scrolldown:hover { border-color: #fff; background: rgba(255,255,255,0.12); }
@keyframes heard-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(7px); }
}

/* the scrolling content sheet rises over the fixed cover */
main.heard-main {
    position: relative;
    z-index: 1;
    background: var(--background);
    border-radius: 18px;
    margin-top: -26px;
    margin-bottom: 3.5rem;
    padding-top: 3rem;
    box-shadow: 0 14px 50px rgba(0,0,0,0.30);
}
body.heard-landing > footer { position: relative; z-index: 1; }

/* small layout helpers used in the markup */
.heard-h3 { font-size: 1.1rem; }
.heard-grid-gap { margin-top: 2.5rem; }
.heard-step-img {
    max-width: 480px;
    width: 100%;
    border-radius: var(--radius-md);
    margin-top: 0.8rem;
    box-shadow: 0 12px 36px var(--shadow-color);
}
.heard-disclaimer { font-size: 0.82rem; color: var(--text-secondary); font-family: var(--font-mono); }
.heard-logo {
    width: 96px; height: 96px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255,77,46,0.28);
    margin-bottom: 1.4rem;
}
.heard-hero h1 {
    font-size: clamp(2.4rem, 7vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
    background: linear-gradient(100deg, var(--heard-1), var(--heard-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.heard-hero .heard-tagline {
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 2.6vw, 1.4rem);
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 0.4rem;
}
.heard-hero .heard-sub {
    max-width: 640px;
    margin: 0 auto 1.6rem;
    color: var(--text-secondary);
    font-size: 0.98rem;
}
.heard-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

/* ── BADGES ─────────────────────────────────────────── */
.heard-badges {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    justify-content: center; margin-bottom: 1.8rem;
}
.heard-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border: 1px solid var(--background-darker);
    border-radius: 999px;
    color: var(--text-secondary);
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.heard-badge i { font-size: 0.8rem; }

/* ── CTA BUTTONS ────────────────────────────────────── */
.heard-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; }
a.btn-heard {
    font-family: var(--font-main);
    font-size: 14px; font-weight: 600;
    padding: 9px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.5rem;
    border: 1px solid transparent;
    transition: transform .12s, box-shadow .12s, background-color .12s, color .12s;
}
a.btn-heard-primary {
    background: linear-gradient(100deg, var(--heard-1), var(--heard-2));
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(255,77,46,0.30);
}
a.btn-heard-primary:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(255,77,46,0.40); }
a.btn-heard-ghost {
    background: transparent;
    color: var(--text-color) !important;
    border-color: var(--background-darker);
}
a.btn-heard-ghost:hover { border-color: var(--heard-1); color: var(--heard-1) !important; }
/* icons follow the button's text color (override the global gold icon rule) */
a.btn-heard i { color: currentColor !important; }

/* ── LIVE REPO STATS ────────────────────────────────── */
.heard-repo-stats {
    margin-top: 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex; gap: 0.55rem; justify-content: center; align-items: center;
}
.heard-repo-stats a {
    color: var(--text-secondary); text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.35rem;
}
.heard-repo-stats a:hover { color: var(--heard-1); }
.heard-repo-stats a:hover i { color: var(--heard-1) !important; }
.heard-repo-stats i { color: var(--heard-1) !important; font-size: 0.8rem; }
.heard-repo-stats .sep { opacity: 0.4; }

/* ── HERO IMAGE ─────────────────────────────────────── */
.heard-hero-shot {
    margin: 2.5rem auto 0;
    max-width: 460px;
    border-radius: var(--radius-md);
    box-shadow: 0 18px 50px var(--shadow-color);
    display: block;
    width: 100%;
}

/* ── SECTIONS ───────────────────────────────────────── */
.heard-section { margin-bottom: 4rem; }
.heard-section > .heard-kicker {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--heard-1);
    margin-bottom: 0.5rem;
}
.heard-section > h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.8rem;
    letter-spacing: -0.01em;
}
.heard-section > .lead {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin-bottom: 1.5rem;
}

/* ── STAT GRID ──────────────────────────────────────── */
.heard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--background-darker);
    border: 1px solid var(--background-darker);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 2.5rem 0;
}
.heard-stat { background: var(--background); padding: 1.4rem 1rem; text-align: center; }
.heard-stat .num {
    font-family: var(--font-mono);
    font-size: 1.7rem; font-weight: 600;
    color: var(--heard-1);
    line-height: 1;
}
.heard-stat .lbl {
    font-size: 0.8rem; color: var(--text-secondary);
    margin-top: 0.4rem; display: block;
}

/* ── FEATURE / CONTENT GRID ─────────────────────────── */
.heard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}
.heard-grid img { width: 100%; border-radius: var(--radius-md); box-shadow: 0 12px 36px var(--shadow-color); }
.heard-grid .caption { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.6rem; font-family: var(--font-mono); }

/* ── CARDS (device variants / features) ─────────────── */
.heard-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.heard-card {
    border: 1px solid var(--background-darker);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    background: var(--background-card);
}
.heard-card .badge-role {
    font-family: var(--font-mono);
    font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--heard-1);
}
.heard-card h3 { font-size: 1.2rem; margin: 0.2rem 0 0.5rem; }
.heard-card p { font-size: 0.9rem; color: var(--text-secondary); margin: 0; }
.heard-card .status {
    display: inline-block; margin-top: 0.9rem;
    font-family: var(--font-mono); font-size: 0.68rem;
    padding: 2px 8px; border-radius: 999px;
    border: 1px solid var(--background-darker); color: var(--text-secondary);
}

/* ── DIAGRAM ────────────────────────────────────────── */
.heard-diagram {
    width: 100%; height: auto;
    background: var(--background-card);
    border: 1px solid var(--background-darker);
    border-radius: var(--radius-md);
    padding: 1rem;
}
.heard-legend { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1rem; font-size: 0.82rem; color: var(--text-secondary); }
.heard-legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.heard-legend .dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }

/* ── PROTOCOL CHIPS ─────────────────────────────────── */
.heard-proto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; }
.heard-proto .msg {
    border: 1px solid var(--background-darker);
    border-left: 3px solid var(--heard-1);
    border-radius: var(--radius);
    padding: 1rem;
}
.heard-proto .msg code { background: none; padding: 0; color: var(--heard-1); font-weight: 600; font-size: 1rem; }
.heard-proto .msg p { font-size: 0.85rem; color: var(--text-secondary); margin: 0.4rem 0 0; }

/* ── BUILD STEPS ────────────────────────────────────── */
.heard-steps { counter-reset: step; display: flex; flex-direction: column; gap: 1.6rem; }
.heard-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1rem; align-items: start; }
.heard-step .n {
    counter-increment: step;
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(100deg, var(--heard-1), var(--heard-2));
    color: #fff; font-family: var(--font-mono); font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.heard-step .n::before { content: counter(step); }
.heard-step h4 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.heard-step p { font-size: 0.92rem; color: var(--text-secondary); margin: 0; }
.heard-step pre { margin-top: 0.7rem; margin-bottom: 0; }

/* ── BOM TABLE ──────────────────────────────────────── */
.bom-table { width: 100%; font-size: 0.9rem; border-collapse: collapse; }
.bom-table th, .bom-table td { text-align: left; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--background-darker); }
.bom-table th { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.bom-table td:last-child { color: var(--text-secondary); }

/* ── CLOSING CTA ────────────────────────────────────── */
.heard-closing {
    text-align: center;
    border: 1px solid var(--background-darker);
    border-radius: var(--radius-md);
    padding: 3rem 1.5rem;
    background: var(--background-card);
}
.heard-closing h2 { font-size: 1.8rem; margin-bottom: 0.6rem; }
.heard-closing p { color: var(--text-secondary); max-width: 560px; margin: 0 auto 1.6rem; }

/* ── RESPONSIVE ─────────────────────────────────────── */
main a { color: #82552f; text-underline-offset: 0.18em; }
main a:hover { color: #4f321c; }
[data-bs-theme="dark"] main a { color: #ddb58f; }
[data-bs-theme="dark"] main a:hover { color: #f2d5b8; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

@media (max-width: 768px) {
    .heard-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .heard-cards { grid-template-columns: 1fr; }
    .heard-stats { grid-template-columns: repeat(2, 1fr); }
    .heard-proto { grid-template-columns: 1fr; }
}
