/*
 * Virii8 Theme — Main Stylesheet
 * Professional dark/cyber design system with neon green accents.
 */

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
    --v8-bg:           #050805;
    --v8-surface:      #0b120d;
    --v8-surface-2:    #101a13;
    --v8-border:       rgba(0, 255, 65, 0.22);
    --v8-border-soft:  rgba(0, 255, 65, 0.1);
    --v8-green:        #00ff41;
    --v8-green-soft:   rgba(0, 255, 65, 0.16);
    --v8-green-dim:    #00cc34;
    --v8-text:         #f2f7f3;
    --v8-muted:        #a9b8ad;
    --v8-muted-2:      #6b7c6f;
    --v8-danger:       #ff4d4d;
    --v8-warning:      #ffd166;
    --v8-info:         #4daaff;
    --v8-radius:       14px;
    --v8-radius-sm:    8px;
    --v8-radius-lg:    20px;
    --v8-max-width:    1200px;
    --v8-font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --v8-font-mono:    "SFMono-Regular", "Fira Code", Consolas, "Courier New", monospace;
    --v8-header-h:     68px;
    --v8-shadow:       0 2px 12px rgba(0, 0, 0, 0.45);
    --v8-shadow-lg:    0 8px 40px rgba(0, 0, 0, 0.6);
    --v8-glow:         0 0 18px rgba(0, 255, 65, 0.18);
    --v8-trans:        all 0.18s ease;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body  {
    font-family:  var(--v8-font);
    font-size:    1rem;
    line-height:  1.65;
    color:        var(--v8-text);
    background:   var(--v8-bg);
    min-height:   100vh;
    -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; height: auto; display: block; }
a   { color: var(--v8-green); text-decoration: none; transition: color .15s; }
a:hover { color: var(--v8-green-dim); text-decoration: underline; }
ul, ol { padding-left: 1.5rem; }
button { cursor: pointer; font-family: var(--v8-font); }
input, textarea, select, button { font-size: 1rem; }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight:   700;
    line-height:   1.25;
    color:         var(--v8-text);
    margin-bottom: .5em;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
h5, h6 { font-size: 1rem; }
p  { margin-bottom: 1rem; color: var(--v8-muted); }
.v8-entry-content p, .v8-article p { color: var(--v8-text); }
strong { font-weight: 700; color: var(--v8-text); }
em  { font-style: italic; }
code, kbd {
    font-family:  var(--v8-font-mono);
    font-size:    .88em;
    background:   var(--v8-surface-2);
    border:       1px solid var(--v8-border-soft);
    padding:      .1em .4em;
    border-radius: var(--v8-radius-sm);
    color:        var(--v8-green);
}
pre {
    font-family:  var(--v8-font-mono);
    font-size:    .85rem;
    background:   var(--v8-surface);
    border:       1px solid var(--v8-border);
    border-radius: var(--v8-radius-sm);
    padding:      1rem;
    overflow-x:   auto;
    color:        var(--v8-green);
    margin-bottom: 1.25rem;
}
blockquote {
    border-left:  3px solid var(--v8-green);
    padding-left: 1rem;
    color:        var(--v8-muted);
    margin:       1.25rem 0;
    font-style:   italic;
}
hr {
    border: none;
    border-top: 1px solid var(--v8-border);
    margin: 2rem 0;
}
table {
    width:           100%;
    border-collapse: collapse;
    margin-bottom:   1.25rem;
    font-size:       .9rem;
}
th, td {
    padding:     .55rem .85rem;
    text-align:  left;
    border-bottom: 1px solid var(--v8-border-soft);
}
th {
    background:      var(--v8-surface);
    color:           var(--v8-green);
    font-size:       .75rem;
    text-transform:  uppercase;
    letter-spacing:  .05em;
}
tr:hover td { background: rgba(0,255,65,.03); }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.v8-container {
    max-width:   var(--v8-max-width);
    margin:      0 auto;
    padding:     0 1.5rem;
    width:       100%;
}
.v8-page-wrap { min-height: calc(100vh - var(--v8-header-h)); }
.v8-main  { padding: 3rem 0; }

/* ── Skip link ─────────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -44px;
    left: 1rem;
    background: var(--v8-green);
    color: #000;
    font-weight: 700;
    padding: .5rem 1rem;
    border-radius: 0 0 var(--v8-radius-sm) var(--v8-radius-sm);
    z-index: 9999;
    transition: top .2s;
}
.skip-link:focus { top: 0; outline: none; }

/* ── Header ────────────────────────────────────────────────────────────────── */
.v8-header {
    position:     sticky;
    top:          0;
    z-index:      100;
    background:   rgba(5, 8, 5, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--v8-border);
    height:       var(--v8-header-h);
    box-shadow:   var(--v8-shadow);
}
.v8-header-inner {
    display:         flex;
    align-items:     center;
    gap:             1.5rem;
    height:          100%;
}
.v8-site-brand { flex-shrink: 0; display: flex; align-items: center; gap: .5rem; }
.v8-site-name  {
    font-size:   1.15rem;
    font-weight: 800;
    color:       var(--v8-green);
    letter-spacing: .02em;
    text-decoration: none;
}
.v8-site-name:hover { color: var(--v8-green-dim); text-decoration: none; }
.v8-site-tagline { font-size: .72rem; color: var(--v8-muted); display: none; }
.custom-logo { height: 38px; width: auto; }

/* ── Primary nav ───────────────────────────────────────────────────────────── */
.v8-primary-nav { flex: 1; }
.v8-nav-list, .v8-nav-fallback {
    display:    flex;
    align-items: center;
    gap:        .1rem;
    list-style: none;
    padding:    0;
    margin:     0;
    flex-wrap:  wrap;
}
.v8-nav-list li a, .v8-nav-fallback li a {
    display:     block;
    padding:     .4rem .75rem;
    border-radius: var(--v8-radius-sm);
    font-size:   .85rem;
    font-weight: 600;
    color:       var(--v8-muted);
    transition:  var(--v8-trans);
    white-space: nowrap;
    text-decoration: none;
}
.v8-nav-list li a:hover,
.v8-nav-list li.current-menu-item > a,
.v8-nav-list li.current_page_item > a {
    color:       var(--v8-green);
    background:  var(--v8-green-soft);
    text-decoration: none;
}
.v8-header-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; flex-shrink: 0; }

/* ── Mobile toggle ─────────────────────────────────────────────────────────── */
.v8-mobile-toggle {
    display:      none;
    background:   none;
    border:       1px solid var(--v8-border);
    border-radius: var(--v8-radius-sm);
    padding:      .4rem .55rem;
    color:        var(--v8-green);
}
.v8-toggle-icon { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.v8-toggle-icon span {
    display:    block;
    height:     2px;
    background: currentColor;
    border-radius: 2px;
    transition: var(--v8-trans);
}
.v8-mobile-toggle[aria-expanded="true"] .v8-toggle-icon span:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.v8-mobile-toggle[aria-expanded="true"] .v8-toggle-icon span:nth-child(2) { opacity: 0; }
.v8-mobile-toggle[aria-expanded="true"] .v8-toggle-icon span:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.v8-btn {
    display:      inline-flex;
    align-items:  center;
    gap:          .4rem;
    padding:      .5rem 1.1rem;
    border-radius: var(--v8-radius-sm);
    font-size:    .85rem;
    font-weight:  700;
    border:       1px solid transparent;
    transition:   var(--v8-trans);
    white-space:  nowrap;
    text-decoration: none;
    cursor:       pointer;
    line-height:  1.4;
}
.v8-btn:hover { text-decoration: none; }
.v8-btn-primary  { background: var(--v8-green); color: #020602; border-color: var(--v8-green); }
.v8-btn-primary:hover { background: var(--v8-green-dim); border-color: var(--v8-green-dim); color: #020602; }
.v8-btn-outline  { background: transparent; color: var(--v8-green); border-color: var(--v8-green); }
.v8-btn-outline:hover { background: var(--v8-green-soft); }
.v8-btn-ghost    { background: transparent; color: var(--v8-muted); border-color: var(--v8-border); }
.v8-btn-ghost:hover { color: var(--v8-text); background: var(--v8-surface-2); }
.v8-btn-sm  { padding: .3rem .75rem; font-size: .78rem; }
.v8-btn-lg  { padding: .7rem 1.6rem; font-size: .95rem; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.v8-card, .v8-post-card {
    background:   var(--v8-surface);
    border:       1px solid var(--v8-border-soft);
    border-radius: var(--v8-radius);
    overflow:     hidden;
    transition:   border-color .2s, box-shadow .2s;
}
.v8-post-card:hover {
    border-color: var(--v8-border);
    box-shadow:   var(--v8-glow);
}
.v8-card-image, .v8-post-thumbnail {
    width:        100%;
    height:       200px;
    object-fit:   cover;
    display:      block;
}
.v8-card-body { padding: 1.25rem; }
.v8-card-cats { margin-bottom: .5rem; }
.v8-card-title {
    font-size:   1.05rem;
    font-weight: 700;
    margin-bottom: .35rem;
}
.v8-card-link { color: var(--v8-text); text-decoration: none; }
.v8-card-link:hover { color: var(--v8-green); text-decoration: none; }
.v8-card-meta { font-size: .75rem; color: var(--v8-muted-2); margin-bottom: .6rem; }
.v8-card-excerpt { font-size: .85rem; color: var(--v8-muted); line-height: 1.55; }
.v8-card-thumb { display: block; overflow: hidden; }

/* ── Post grid ─────────────────────────────────────────────────────────────── */
.v8-post-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap:                   1.5rem;
    margin-bottom:         2.5rem;
}

/* ── Tags ──────────────────────────────────────────────────────────────────── */
.v8-tag {
    display:      inline-block;
    padding:      .15rem .55rem;
    border-radius: 9999px;
    font-size:    .72rem;
    font-weight:  700;
    letter-spacing: .04em;
    background:   var(--v8-green-soft);
    color:        var(--v8-green);
    text-transform: uppercase;
    text-decoration: none;
}
.v8-tag:hover { background: var(--v8-border); color: var(--v8-green); text-decoration: none; }
.v8-tag-outline { background: transparent; border: 1px solid var(--v8-border); color: var(--v8-muted); }
.v8-post-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.v8-tags-label { font-size: .78rem; color: var(--v8-muted); margin-right: .25rem; }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.v8-hero {
    padding:   5rem 0 4rem;
    position:  relative;
    overflow:  hidden;
    border-bottom: 1px solid var(--v8-border-soft);
}
.v8-hero-inner {
    display:   grid;
    grid-template-columns: 1fr 1fr;
    gap:       3rem;
    align-items: center;
}
.v8-hero-title {
    font-size:    clamp(2rem, 5vw, 3.5rem);
    font-weight:  900;
    color:        var(--v8-text);
    margin-bottom: .75rem;
    line-height:  1.1;
}
.v8-hero-title .green { color: var(--v8-green); }
.v8-hero-desc {
    font-size:    1.1rem;
    color:        var(--v8-muted);
    margin-bottom: 1.75rem;
    line-height:  1.6;
}
.v8-hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.v8-hero-visual  { display: flex; justify-content: center; align-items: center; }

/* Grid placeholder when no plugin visual is provided */
.v8-hero-grid-placeholder {
    width:     340px;
    height:    280px;
    position:  relative;
    border:    1px solid var(--v8-border);
    border-radius: var(--v8-radius-lg);
    overflow:  hidden;
    background: var(--v8-surface);
}
.v8-grid-lines {
    position:  absolute;
    inset:     0;
    background-image:
        linear-gradient(rgba(0,255,65,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,65,.08) 1px, transparent 1px);
    background-size: 28px 28px;
}
.v8-grid-glow {
    position:  absolute;
    inset:     0;
    background: radial-gradient(circle at 50% 50%, rgba(0,255,65,.12), transparent 65%);
}

/* ── Single article ────────────────────────────────────────────────────────── */
.v8-single-wrap {
    display:               grid;
    grid-template-columns: 1fr;
    gap:                   2.5rem;
}
.v8-single-wrap:has(.v8-sidebar) { grid-template-columns: 1fr 280px; }
.v8-article { max-width: 100%; }
.v8-entry-header { margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--v8-border-soft); }
.v8-entry-title  { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: .5rem; }
.v8-entry-meta   { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .82rem; color: var(--v8-muted-2); }
.v8-meta-sep     { color: var(--v8-muted-2); }
.v8-featured-image { margin-bottom: 1.75rem; border-radius: var(--v8-radius); overflow: hidden; }
.v8-entry-content {
    font-size:    1rem;
    line-height:  1.75;
    color:        var(--v8-text);
}
.v8-entry-content h2 { margin-top: 2rem; }
.v8-entry-content h3 { margin-top: 1.5rem; }
.v8-entry-content a  { color: var(--v8-green); text-decoration: underline; }
.v8-entry-footer { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--v8-border-soft); }
.v8-post-nav .nav-links { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.v8-post-nav a { color: var(--v8-muted); font-size: .85rem; }
.v8-post-nav a:hover { color: var(--v8-green); }

/* ── Page header ───────────────────────────────────────────────────────────── */
.v8-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--v8-border-soft);
}
.v8-page-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .25rem; }
.v8-archive-desc { color: var(--v8-muted); font-size: .9rem; }

/* ── Section heading ───────────────────────────────────────────────────────── */
.v8-section-title {
    font-size:    1.35rem;
    font-weight:  800;
    color:        var(--v8-text);
    margin-bottom: 1.75rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--v8-border-soft);
}
.v8-section-more { text-align: center; margin-top: 2rem; }

/* ── Pagination ────────────────────────────────────────────────────────────── */
.v8-pagination .nav-links,
.navigation.pagination .nav-links {
    display:    flex;
    flex-wrap:  wrap;
    gap:        .4rem;
    justify-content: center;
    padding:    2rem 0;
}
.v8-pagination .page-numbers,
.navigation.pagination .page-numbers {
    display:     inline-flex;
    align-items: center;
    justify-content: center;
    min-width:   38px;
    height:      38px;
    padding:     0 .6rem;
    border:      1px solid var(--v8-border-soft);
    border-radius: var(--v8-radius-sm);
    color:       var(--v8-muted);
    font-size:   .85rem;
    font-weight: 600;
    text-decoration: none;
    transition:  var(--v8-trans);
    background:  var(--v8-surface);
}
.v8-pagination .page-numbers:hover,
.navigation.pagination .page-numbers:hover { border-color: var(--v8-green); color: var(--v8-green); }
.v8-pagination .page-numbers.current,
.navigation.pagination .page-numbers.current { background: var(--v8-green); color: #020602; border-color: var(--v8-green); }

/* ── Search form ───────────────────────────────────────────────────────────── */
.search-form { display: flex; gap: .5rem; }
.search-form label { flex: 1; margin: 0; }
.search-field, input[type="search"] {
    width:        100%;
    padding:      .55rem 1rem;
    background:   var(--v8-surface);
    border:       1px solid var(--v8-border);
    border-radius: var(--v8-radius-sm);
    color:        var(--v8-text);
    font-size:    .9rem;
    outline:      none;
    transition:   border-color .15s;
}
.search-field:focus { border-color: var(--v8-green); box-shadow: 0 0 0 3px rgba(0,255,65,.1); }
.search-submit { @extend .v8-btn; background: var(--v8-green); color: #020602; font-weight: 700; padding: .55rem 1.1rem; border: none; border-radius: var(--v8-radius-sm); }

/* ── No results / 404 ──────────────────────────────────────────────────────── */
.v8-no-results, .v8-404 { text-align: center; padding: 5rem 2rem; }
.v8-no-results-icon, .v8-404-code {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}
.v8-404-code { font-size: 6rem; font-weight: 900; color: var(--v8-border); line-height: 1; }
.v8-no-results-title, .v8-404-title { color: var(--v8-text); margin-bottom: .5rem; }
.v8-no-results-text, .v8-404-text  { color: var(--v8-muted); margin-bottom: 1.5rem; }
.v8-404-actions { display: flex; justify-content: center; gap: .75rem; margin-bottom: 2rem; }
.v8-404-search, .v8-no-results-search { max-width: 440px; margin: 0 auto; }
.v8-search-form-wrap { max-width: 520px; margin: 0 auto 2rem; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.v8-footer {
    background:   var(--v8-surface);
    border-top:   1px solid var(--v8-border-soft);
    margin-top:   auto;
}
.v8-footer-widgets { padding: 3rem 0 2rem; border-bottom: 1px solid var(--v8-border-soft); }
.v8-footer-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap:                   2rem;
}
.v8-footer-bar { padding: 1.2rem 0; }
.v8-footer-bar-inner {
    display:     flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap:   wrap;
    gap:         .75rem;
}
.v8-footer-copy { font-size: .82rem; color: var(--v8-muted-2); }
.v8-footer-copy a { color: var(--v8-muted); text-decoration: none; }
.v8-footer-copy a:hover { color: var(--v8-green); }
.v8-footer-nav-list {
    display:    flex;
    gap:        .1rem;
    flex-wrap:  wrap;
    list-style: none;
    padding:    0;
    margin:     0;
}
.v8-footer-nav-list a { font-size: .8rem; color: var(--v8-muted-2); padding: .25rem .5rem; border-radius: var(--v8-radius-sm); }
.v8-footer-nav-list a:hover { color: var(--v8-green); text-decoration: none; }

/* ── Sidebar widgets ───────────────────────────────────────────────────────── */
.v8-sidebar { padding-top: .5rem; }
.v8-sidebar .widget { margin-bottom: 2rem; }
.v8-sidebar .widget-title { font-size: .9rem; font-weight: 700; color: var(--v8-green); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }
.v8-sidebar ul { list-style: none; padding: 0; margin: 0; }
.v8-sidebar li { padding: .3rem 0; border-bottom: 1px solid var(--v8-border-soft); font-size: .88rem; color: var(--v8-muted); }
.v8-sidebar li a { color: var(--v8-muted); }
.v8-sidebar li a:hover { color: var(--v8-green); }

/* ── Comments ──────────────────────────────────────────────────────────────── */
.v8-comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--v8-border-soft); }
.v8-comments-title { font-size: 1.1rem; margin-bottom: 1.5rem; }
.v8-comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.v8-comment-list .comment { padding: 1rem 0; border-bottom: 1px solid var(--v8-border-soft); }
.v8-comment-list .children { padding-left: 1.5rem; border-left: 2px solid var(--v8-border-soft); margin-left: 1rem; }
.comment-author .avatar { border-radius: 50%; margin-right: .5rem; }
.v8-no-comments { color: var(--v8-muted); font-style: italic; margin-top: 1rem; }
.v8-comment-form { margin-top: 2rem; }
.v8-comment-form label { display: block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--v8-muted); margin-bottom: .3rem; }
.v8-comment-form input,
.v8-comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width:        100%;
    padding:      .55rem .9rem;
    background:   var(--v8-surface);
    border:       1px solid var(--v8-border);
    border-radius: var(--v8-radius-sm);
    color:        var(--v8-text);
    font-size:    .88rem;
    margin-bottom: .85rem;
    outline:      none;
    transition:   border-color .15s;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--v8-green); box-shadow: 0 0 0 3px rgba(0,255,65,.1); }
.comment-form .submit,
.comment-form input[type="submit"] {
    background:   var(--v8-green);
    color:        #020602;
    border:       none;
    border-radius: var(--v8-radius-sm);
    font-weight:  700;
    padding:      .55rem 1.25rem;
    cursor:       pointer;
    font-size:    .88rem;
    transition:   background .15s;
}
.comment-form .submit:hover { background: var(--v8-green-dim); }

/* ── Focus / accessibility ─────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--v8-green); outline-offset: 2px; }
.screen-reader-text {
    position:   absolute !important;
    width:      1px;
    height:     1px;
    padding:    0;
    margin:     -1px;
    overflow:   hidden;
    clip:       rect(0,0,0,0);
    white-space: nowrap;
    border:     0;
}

/* ── Block editor passthrough ──────────────────────────────────────────────── */
.wp-block-image img { border-radius: var(--v8-radius-sm); }
.wp-block-quote { border-left: 3px solid var(--v8-green); padding-left: 1rem; color: var(--v8-muted); }
.wp-block-code  { background: var(--v8-surface); border: 1px solid var(--v8-border); border-radius: var(--v8-radius-sm); padding: 1rem; }
.wp-block-button__link { border-radius: var(--v8-radius-sm) !important; }
.is-style-outline .wp-block-button__link { border-color: var(--v8-green) !important; color: var(--v8-green) !important; }

/* ── Portal context ────────────────────────────────────────────────────────── */
.virii8-portal-context .v8-main { padding: 0; }
.virii8-portal-context .v8-container { max-width: 100%; }

/* ── Reduced motion ────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .v8-hero-inner { grid-template-columns: 1fr; }
    .v8-hero-visual { display: none; }
    .v8-single-wrap:has(.v8-sidebar) { grid-template-columns: 1fr; }
    .v8-sidebar { border-top: 1px solid var(--v8-border-soft); padding-top: 2rem; }
}

@media (max-width: 768px) {
    :root { --v8-header-h: 58px; }

    .v8-mobile-toggle { display: flex; }

    .v8-primary-nav {
        display:    none;
        position:   absolute;
        top:        var(--v8-header-h);
        left:       0;
        right:      0;
        background: rgba(5,8,5,.98);
        border-bottom: 1px solid var(--v8-border);
        padding:    1rem 1.5rem;
        z-index:    99;
    }
    .v8-primary-nav.is-open { display: block; }
    .v8-nav-list, .v8-nav-fallback { flex-direction: column; align-items: flex-start; gap: .15rem; }
    .v8-nav-list li, .v8-nav-fallback li { width: 100%; }
    .v8-nav-list li a, .v8-nav-fallback li a { width: 100%; padding: .6rem .75rem; }

    .v8-container { padding: 0 1rem; }
    .v8-main { padding: 2rem 0; }
    .v8-hero { padding: 3rem 0 2.5rem; }
    .v8-post-grid { grid-template-columns: 1fr; }
    .v8-footer-grid { grid-template-columns: 1fr; }
    .v8-footer-bar-inner { flex-direction: column; text-align: center; }

    .v8-header-inner { position: relative; }
}

@media (max-width: 480px) {
    .v8-hero-title { font-size: 1.75rem; }
    .v8-post-grid  { gap: 1rem; }
}

/* ── Shell / full-screen page overrides ───────────────────────────────────── */
/* These rules ensure the OS shell is never boxed by theme or WP styles.      */

/* When WordPress injects admin bar it adds margin-top: 32px/46px to body.    */
/* Kill it on shell pages. */
.admin-bar .virii8-shell-page,
.admin-bar body.virii8-shell-page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Fullscreen body state used by front-page.php */
body.virii8-shell-page,
body.virii8-shell-page html {
    overflow: hidden !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide the admin bar itself on the shell page */
body.virii8-shell-page #wpadminbar {
    display: none !important;
}

/* The shell iframe must fill the viewport completely — no exceptions */
#v8-home-shell,
.v8-shell-frame-wrap,
.v8-shell-iframe {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    display: block !important;
    z-index: 9900 !important;
}
