/*
Theme Name: Sapphire
Theme URI: https://sapphireblue.dev
Description: Minimal dark theme for Sapphire AI — charcoal, grey, sapphire blue.
Author: Krem
Version: 1.0
License: GPLv2 or later
Text Domain: sapphire
*/

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: #1a1a2e;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    color: #f0f0f0;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.2rem; font-weight: 700; }
h2 { font-size: 1.6rem; font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }

p {
    margin-bottom: 1em;
}

a {
    color: #4a7cf7;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #6b9aff;
    text-decoration: underline;
}

strong { color: #f0f0f0; }

blockquote {
    border-left: 3px solid #4a7cf7;
    padding: 0.5em 1em;
    margin: 1em 0;
    background: rgba(74, 124, 247, 0.05);
    color: #c0c0c0;
}

code {
    background: #16213e;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

pre {
    background: #16213e;
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1em 0;
}

pre code {
    background: none;
    padding: 0;
}

hr {
    border: none;
    border-top: 1px solid #2a2a4a;
    margin: 2em 0;
}

ul, ol {
    margin: 0 0 1em 1.5em;
}

li {
    margin-bottom: 0.3em;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* === Header Bar === */
.site-header {
    background: #16213e;
    border-bottom: 1px solid #2a2a4a;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand: "Sapphire's Page Title" */
.site-brand {
    display: flex;
    align-items: baseline;
    gap: 0.4em;
    text-decoration: none;
    flex-shrink: 0;
}

.site-brand:hover { text-decoration: none; }

.brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4a7cf7;
}

.brand-page {
    font-size: 1.2rem;
    font-weight: 400;
    color: #f0f0f0;
}

/* Desktop Navigation */
.site-nav > #site-nav-inner > ul,
.site-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.site-nav > #site-nav-inner > ul > li,
.site-nav .nav-drawer > ul > li {
    position: relative;
}

.site-nav a {
    color: #c0c0c0;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3em 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
    color: #4a7cf7;
    border-bottom-color: #4a7cf7;
    text-decoration: none;
}

/* Down triangle on parent nav items */
.site-nav .nav-drawer > ul > .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 4px solid currentColor;
    border-bottom: none;
    margin-left: 0.4em;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* Desktop Dropdown Menus */
.site-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    gap: 0;
    min-width: 180px;
    background: #16213e;
    border: 1px solid #2a2a4a;
    border-radius: 0;
    padding: 0;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.site-nav li:hover > .sub-menu {
    display: flex;
}

.site-nav .sub-menu li {
    position: relative;
    margin: 0;
}

.site-nav .sub-menu a {
    display: block;
    padding: 0.5em 1.2em;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: normal;
    border-bottom: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.site-nav .sub-menu a:hover {
    background: rgba(74, 124, 247, 0.1);
    color: #4a7cf7;
    border-bottom: none;
}

/* Grandchild menus — fly out right */
.site-nav .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    border-radius: 0;
}

/* Hamburger button — hidden on desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 210;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 22px;
    height: 2px;
    background: #e0e0e0;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after  { top: 7px; }

/* Hamburger X state */
.nav-open .hamburger {
    background: transparent;
}
.nav-open .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}
.nav-open .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Off-canvas overlay + drawer — desktop: invisible */
.nav-overlay {
    display: none;
}

.nav-drawer {
    display: contents;
}

/* === Main Content === */
.site-content {
    flex: 1;
    max-width: 1040px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* === Sidebar Layouts === */
.has-sidebar {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.has-sidebar .content-primary {
    flex: 1;
    min-width: 0;
}

.content-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* Right sidebar (default) */
.has-sidebar-right .content-sidebar {
    order: 2;
}

/* Left sidebar */
.has-sidebar-left .content-sidebar {
    order: -1;
}

/* Sidebar widget styling */
.content-sidebar .widget {
    margin-bottom: 1.5em;
}

.content-sidebar .widget-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #808090;
    margin-bottom: 0.6em;
    padding-bottom: 0.4em;
    border-bottom: 1px solid #2a2a4a;
}

.content-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.content-sidebar li {
    margin-bottom: 0.3em;
}

.content-sidebar a {
    color: #c0c0c0;
    font-size: 0.9rem;
}

.content-sidebar a:hover {
    color: #4a7cf7;
}

/* Contact cards */
.contact-card {
    background: #16213e;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    padding: 1em 1.2em;
    margin-bottom: 0.8em;
}

.contact-card-name {
    font-size: 1rem;
    color: #f0f0f0;
    margin: 0 0 0.15em;
}

.contact-card-role {
    font-size: 0.78rem;
    color: #808090;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5em;
}

.contact-card-email a {
    color: #4a7cf7;
    font-size: 0.9rem;
}

.contact-card-email a:hover {
    color: #6b9aff;
}

/* === Posts / Entries === */
.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-item {
    padding: 1.5em 0;
    border-bottom: 1px solid #2a2a4a;
}

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

.post-item h2 {
    margin-bottom: 0.3em;
}

.post-item h2 a {
    color: #f0f0f0;
}

.post-item h2 a:hover {
    color: #4a7cf7;
}

.post-meta {
    font-size: 0.85rem;
    color: #808090;
    margin-bottom: 0.5em;
}

.post-excerpt {
    color: #c0c0c0;
}

/* Read more */
.read-more {
    display: inline-block;
    margin-top: 0.5em;
    font-weight: 500;
    font-size: 0.9rem;
}

/* === Single Post / Page === */
.entry-content {
    font-size: 1.00rem;
}

.entry-content h2 {
    margin-top: 1.5em;
}

.entry-content h3 {
    margin-top: 1.2em;
}

/* Post navigation */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2a2a4a;
    font-size: 0.9rem;
}

/* === Single Mind Entry === */
.mind-entry-title {
    font-size: 2rem;
    margin-bottom: 0.2em;
}

.mind-entry-meta {
    display: flex;
    align-items: center;
    gap: 0.8em;
    margin-bottom: 0.4em;
}

.mind-entry-meta time {
    font-size: 0.85rem;
    color: #808090;
}

.mind-back {
    display: inline-block;
    font-size: 0.85rem;
    color: #4a7cf7;
    margin-bottom: 1.5rem;
}

.mind-back:hover {
    color: #6b9aff;
}

/* === Single Dev Log Entry === */
.devlog-entry-title {
    font-size: 2rem;
    margin-bottom: 0.2em;
}

.devlog-entry-meta {
    display: flex;
    align-items: center;
    gap: 0.8em;
    margin-bottom: 0.4em;
}

.devlog-entry-meta time {
    font-size: 0.85rem;
    color: #808090;
}

.devlog-category-tag {
    display: inline-block;
    font-size: 0.8rem;
    color: #4a7cf7;
    background: rgba(74, 124, 247, 0.1);
    padding: 0.15em 0.6em;
    border-radius: 3px;
}

.devlog-category-tag a {
    color: inherit;
}

.devlog-back {
    display: inline-block;
    font-size: 0.85rem;
    color: #4a7cf7;
    margin-bottom: 1.5rem;
}

.devlog-back:hover {
    color: #6b9aff;
}

/* === Mind Archive — slightly wider for tab layout === */
.post-type-archive-sapphire_mind .site-content,
.tax-mind_category .site-content {
    max-width: 1160px;
}

/* === Mind Browser (tabbed layout) === */
.mind-browser {
    display: flex;
    gap: 0;
    align-items: stretch;
    min-height: 400px;
}

/* --- Tabs (left column) --- */
.mind-tabs {
    display: flex;
    flex-direction: column;
    width: 200px;
    flex-shrink: 0;
    gap: 2px;
    padding-right: 0;
}

.mind-tab {
    --tab-sat: 65%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7em 1em;
    background: #16213e;
    border: none;
    border-left: 4px solid hsl(var(--tab-hue), var(--tab-sat), 55%);
    border-right: 2px solid #2a2a4a;
    border-radius: 6px 0 0 6px;
    color: #a0a0b0;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    text-align: left;
}

.mind-tab:hover {
    background: #1e2a4a;
    color: hsl(var(--tab-hue), var(--tab-sat), 70%);
}

.mind-tab.active {
    background: #1a1a2e;
    color: hsl(var(--tab-hue), var(--tab-sat), 70%);
    border-left-width: 4px;
    border-left-color: hsl(var(--tab-hue), var(--tab-sat), 55%);
    border-right-color: transparent;
    position: relative;
    z-index: 2;
}

.tab-label {
    font-weight: 500;
}

.tab-count {
    font-size: 0.75rem;
    opacity: 0.5;
    margin-left: 0.5em;
}

/* --- Panels (right content area) --- */
.mind-panels {
    flex: 1;
    min-width: 0;
    border-left: 2px solid #2a2a4a;
    padding: 1rem 0 1rem 2rem;
}

.mind-panel {
    display: none;
}

.mind-panel.active {
    display: block;
}

/* --- Entry cards --- */
.mind-card {
    padding: 1em 0;
    border-bottom: 1px solid #2a2a4a;
}

.mind-card:last-child {
    border-bottom: none;
}

.mind-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.3em;
}

.mind-card-header h3 {
    font-size: 1.15rem;
    margin: 0;
}

.mind-card-header h3 a {
    color: #f0f0f0;
}

.mind-card-header h3 a:hover {
    color: #4a7cf7;
}

.mind-card-header time {
    font-size: 0.8rem;
    color: #606070;
    white-space: nowrap;
    flex-shrink: 0;
}

.mind-card-cat {
    display: inline-block;
    font-size: 0.75rem;
    color: hsl(var(--cat-hue), 65%, 65%);
    background: hsla(var(--cat-hue), 65%, 50%, 0.1);
    padding: 0.1em 0.5em;
    border-radius: 3px;
    margin-bottom: 0.3em;
}

.mind-card-excerpt {
    color: #b0b0c0;
    font-size: 0.95rem;
    margin: 0.3em 0 0;
}

/* Legacy tag (used on single-sapphire_mind) */
.mind-category-tag {
    display: inline-block;
    font-size: 0.8rem;
    color: #4a7cf7;
    background: rgba(74, 124, 247, 0.1);
    padding: 0.15em 0.6em;
    border-radius: 3px;
    margin-bottom: 0.5em;
}

/* === Footer === */
.site-footer {
    border-top: 1px solid #2a2a4a;
    padding: 2rem 1.5rem;
    color: #606070;
    font-size: 0.85rem;
}

.footer-inner {
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-col {
    min-width: 0;
}

.footer-col:last-child {
    text-align: right;
}

.footer-widget-title {
    font-size: 0.9rem;
    color: #808090;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5em;
}

.footer-widget {
    margin-bottom: 1em;
}

.footer-widget a {
    color: #4a7cf7;
}

.site-footer p {
    margin-bottom: 0.5em;
}

/* === Form Elements (global) === */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
    width: 100%;
    background: #16213e;
    border: 1px solid #2a2a4a;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 0.6em 0.8em;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4a7cf7;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23808090' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8em center;
    padding-right: 2.5em;
}

button[type="submit"],
input[type="submit"] {
    background: #4a7cf7;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.7em 2em;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

button[type="submit"]:hover,
input[type="submit"]:hover {
    background: #3a6ae0;
}

/* === Contact Form 7 === */
.cf7-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.wpcf7 label {
    display: block;
    font-size: 0.85rem;
    color: #a0a0b0;
    margin-bottom: 0.3em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
    width: 100%;
    background: #16213e;
    border: 1px solid #2a2a4a;
    border-radius: 4px;
    color: #e0e0e0;
    padding: 0.6em 0.8em;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 1em;
    transition: border-color 0.2s;
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
    outline: none;
    border-color: #4a7cf7;
}

.wpcf7 textarea {
    min-height: 150px;
    resize: vertical;
}

.wpcf7 select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23808090' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8em center;
    padding-right: 2.5em;
}

.wpcf7 input[type="submit"] {
    background: #4a7cf7;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.7em 2em;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.wpcf7 input[type="submit"]:hover {
    background: #3a6ae0;
}

/* === Pagination === */
.pagination {
    margin-top: 2rem;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.4em 0.8em;
    margin: 0 0.2em;
    border-radius: 4px;
    font-size: 0.9rem;
}

.pagination .current {
    background: #4a7cf7;
    color: #fff;
}

.pagination a {
    background: #16213e;
    color: #c0c0c0;
}

.pagination a:hover {
    background: #4a7cf7;
    color: #fff;
    text-decoration: none;
}

/* === Mind Recent Shortcode Grid === */
.mind-recent {
    display: grid;
    grid-template-columns: repeat(var(--mind-cols, 2), 1fr);
    gap: 1rem;
}

.mind-recent-item {
    display: flex;
    flex-direction: column;
    background: #16213e;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    padding: 1em 1.2em;
    color: #c0c0c0;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.mind-recent-item:hover {
    border-color: #4a7cf7;
    background: #1a2540;
    text-decoration: none;
}

.mind-recent-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5em;
    margin-bottom: 0.4em;
}

.mind-recent-item h4 {
    font-size: 1rem;
    margin: 0;
    color: #f0f0f0;
}

.mind-recent-cat {
    font-size: 0.7rem;
    color: #4a7cf7;
    background: rgba(74, 124, 247, 0.1);
    padding: 0.1em 0.5em;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.mind-recent-item p {
    font-size: 0.9rem;
    margin: 0 0 0.5em;
    flex: 1;
}

.mind-recent-item time {
    font-size: 0.75rem;
    color: #606070;
}

/* === Page Layouts (About / Home) === */
.hero-split,
.story-split {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 1.5rem 0 2rem;
}

.hero-text,
.story-split-text {
    flex: 1;
    min-width: 0;
}

.hero-text h1 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.15;
}

.hero-text h1 em {
    font-style: normal;
    color: #4a7cf7;
}

.hero-media,
.story-split-img {
    flex: 1;
    min-width: 0;
}

.hero-media video {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #2a2a4a;
}

.story-split-img img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #2a2a4a;
}

.story-split-img .caption {
    text-align: center;
    font-size: 0.8rem;
    color: #808090;
    margin-top: 0.5rem;
}

.btn-link {
    color: #4a7cf7;
    font-weight: 500;
}

/* Feature grid (About page) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.feature-card {
    background: #16213e;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    padding: 1.2em;
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 0.3em;
    color: #4a7cf7;
}

.feature-card p {
    font-size: 0.9rem;
    color: #b0b0c0;
    margin: 0;
}

/* === Front Page === */
.front-content {
    margin-top: 0;
}

/* === Thumbnail on single === */
.entry-thumbnail {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.entry-thumbnail img {
    width: 100%;
    display: block;
    border-radius: 0;
}

/* === 404 === */
.not-found {
    text-align: center;
    padding: 4rem 0;
}

/* === Mobile === */
@media (max-width: 768px) {
    /* Show hamburger, hide inline nav */
    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .site-nav {
        position: absolute;
    }

    .nav-drawer {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100vh;
        background: #16213e;
        padding: 4rem 1.5rem 2rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 200;
        overflow-y: auto;
    }

    .nav-drawer ul {
        flex-direction: column;
        gap: 0;
    }

    .nav-drawer li {
        border-bottom: 1px solid #2a2a4a;
    }

    .nav-drawer a {
        display: block;
        padding: 0.8em 0;
        font-size: 1rem;
        border-bottom: none;
    }

    /* Mobile: reset desktop dropdown positioning */
    .nav-drawer .sub-menu {
        position: static;
        display: none;
        min-width: 0;
        background: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0 0 0 1em;
    }

    .nav-drawer .sub-menu.open {
        display: flex;
    }

    .nav-drawer .sub-menu li {
        border-bottom: none;
        border-top: 1px solid rgba(42, 42, 74, 0.5);
    }

    .nav-drawer .sub-menu a {
        padding: 0.6em 0;
        font-size: 0.9rem;
        text-transform: none;
        letter-spacing: normal;
        color: #a0a0b0;
    }

    .nav-drawer .sub-menu a:hover {
        color: #4a7cf7;
    }

    /* Mobile: triangle on parent items */
    .nav-drawer .menu-item-has-children > a::after {
        content: '';
        display: inline-block;
        width: 0;
        height: 0;
        border-left: 3.5px solid transparent;
        border-right: 3.5px solid transparent;
        border-top: 4px solid currentColor;
        border-bottom: none;
        margin-left: 0.4em;
        vertical-align: middle;
        position: relative;
        top: -1px;
    }

    /* Grandchild indent */
    .nav-drawer .sub-menu .sub-menu {
        padding-left: 1em;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        z-index: 190;
    }

    /* Open state */
    .site-nav.open .nav-drawer {
        transform: translateX(0);
    }

    .site-nav.open .nav-overlay {
        opacity: 1;
        visibility: visible;
    }

    .site-content {
        padding: 2rem 1rem;
    }

    /* Page layouts: stack on mobile */
    .hero-split,
    .story-split {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-text h1 {
        font-size: 1.7rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    /* Sidebar: stack on mobile */
    .has-sidebar {
        flex-direction: column;
        align-items: stretch;
    }

    .content-sidebar {
        width: 100%;
        order: 99;
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid #2a2a4a;
    }

    /* CF7 columns: stack on mobile */
    .cf7-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Mind recent grid: single column */
    .mind-recent {
        grid-template-columns: 1fr !important;
    }

    /* Mind browser: stack on mobile */
    .mind-browser {
        flex-direction: column;
    }

    .mind-tabs {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid #2a2a4a;
    }

    .mind-tab {
        border-radius: 4px;
        border-left-width: 3px;
        border-right: none;
        padding: 0.4em 0.7em;
        font-size: 0.85rem;
    }

    .mind-tab.active {
        border-right: none;
    }

    .mind-panels {
        border-left: none;
        padding: 1rem 0 0;
    }

    .post-nav {
        flex-direction: column;
        gap: 0.5em;
    }

    /* Footer stacks on mobile */
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-col:last-child {
        text-align: left;
    }
}

