:root {
    --bg: #ffffff;
    --text-main: #18181b;
    --text-muted: #6d6d75; /* darkened from #71717a to clear WCAG AA 4.5:1 on the #f4f4f5 panels */
    --accent: #ff4500; /* Pure stark orange/red */
    --border: #e4e4e7;
    --panel-bg: #f4f4f5;
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: clip;
}

/* Grid paper on its own composited layer: background-attachment:fixed
   on body forces a full repaint every scroll frame */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(var(--border) 1px, transparent 1px),
                      linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
}

a, button {
    text-decoration: none;
    color: inherit;
}

/* The custom crosshair replaces the OS pointer — but only once JS has
   confirmed it is live (main.js / interests.js add .custom-cursor-active).
   If the script ever fails to load, the system cursor stays visible instead
   of leaving the user with no pointer at all. */
body.custom-cursor-active,
body.custom-cursor-active a,
body.custom-cursor-active button {
    cursor: none;
}

/* Clinical Aim Crosshair */
.custom-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 34px; height: 34px;
    border: 2px solid transparent; /* Kept transparent so hover can fade in */
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s, width 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                height 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                border-color 0.2s, background 0.2s, backdrop-filter 0.2s;
    background:
        radial-gradient(circle, var(--accent) 3px, transparent 3.5px) center no-repeat,
        linear-gradient(var(--text-main), var(--text-main)) center top / 4px 10px no-repeat,
        linear-gradient(var(--text-main), var(--text-main)) center bottom / 4px 10px no-repeat,
        linear-gradient(var(--text-main), var(--text-main)) left center / 10px 4px no-repeat,
        linear-gradient(var(--text-main), var(--text-main)) right center / 10px 4px no-repeat;
}

.custom-cursor.active {
    opacity: 1;
}

/* Zoom Scope Effect */
.custom-cursor.hover {
    width: 60px; height: 60px;
    border-color: var(--text-main);
    background: 
        radial-gradient(circle, transparent 15px, rgba(255, 69, 0, 0.1) 100%) no-repeat,
        radial-gradient(circle, var(--accent) 3px, transparent 3.5px) center no-repeat,
        linear-gradient(var(--text-main), var(--text-main)) center top / 2px 10px no-repeat,
        linear-gradient(var(--text-main), var(--text-main)) center bottom / 2px 10px no-repeat,
        linear-gradient(var(--text-main), var(--text-main)) left center / 10px 2px no-repeat,
        linear-gradient(var(--text-main), var(--text-main)) right center / 10px 2px no-repeat;
    box-shadow: inset 0 0 10px rgba(255, 69, 0, 0.2), 0 0 8px rgba(0, 0, 0, 0.1);
}

.crosshair-h, .crosshair-v {
    position: fixed;
    background: rgba(255, 69, 0, 0.15);
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s;
}
.crosshair-h.active, .crosshair-v.active {
    opacity: 1;
}
.crosshair-h { top: 0; left: 0; width: 100vw; height: 1px; }
.crosshair-v { top: 0; left: 0; width: 1px; height: 100vh; }

/* Nav */
.top-nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 58px;
    padding: 0 40px;
    border-bottom: 2px solid var(--text-main);
    z-index: 100;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    transition: filter 0.5s ease, transform 0.5s ease;
    transform-origin: top center;
}

.nav-links {
    display: flex;
    gap: 30px;
}
.nav-links a {
    transition: color 0.3s ease;
}
.nav-links a.active {
    color: var(--accent);
}

/* Only apply hover effects on devices with a mouse/cursor */
@media (hover: hover) {
    .nav-links a:hover {
        color: var(--accent);
    }
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 120px 20px 60px;
    transition: filter 0.5s ease, transform 0.5s ease;
    transform-origin: top center;
}

/* Hero */
.hero {
    margin-bottom: 80px;
    border: 4px solid var(--text-main);
    padding: 60px;
    background: var(--bg);
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -12px; right: -12px;
    width: 100%; height: 100%;
    border: 2px solid var(--accent);
    z-index: -1;
}

.hero::before {
    content: '';
    position: absolute;
    left: -20px;
    bottom: -20px;
    width: 21px; 
    height: 21px;
    pointer-events: none;
    z-index: 10;
    background:
        /* Orange square exactly covering the 4x4 border intersection + 1px overhang */
        linear-gradient(var(--accent), var(--accent)) top 0 right 0 / 6px 6px no-repeat,
        /* Left line (extending left from the corner) */
        linear-gradient(var(--text-main), var(--text-main)) top 1px left 0 / 10px 4px no-repeat,
        /* Bottom line (extending down from the corner) */
        linear-gradient(var(--text-main), var(--text-main)) bottom 0 right 1px / 4px 10px no-repeat;
}

.hero-label {
    font-family: 'Share Tech Mono', monospace;
    background: var(--text-main);
    color: var(--bg);
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.blink-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 1.5s infinite;
}

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 15px 30px;
    /* 1.2rem (19.2px) bold clears the WCAG "large text" threshold (18.66px
       bold), so white-on-accent at 3.44:1 meets the 3:1 large-text bar —
       keeps the signature orange + white text instead of dulling either. */
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
    transition: all 0.2s;
    border: 2px solid var(--text-main);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--text-main);
    border-color: var(--text-main);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
}
.btn-secondary:hover {
    background: var(--text-main);
    color: #fff;
}

/* Sections */
.section {
    margin-bottom: 80px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2rem;
    white-space: nowrap;
}

.section-header .line {
    height: 2px;
    background: var(--text-main);
    width: 100%;
}

.subsection-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.toggle-btn {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 5px 15px;
    font-family: 'Share Tech Mono', monospace;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.toggle-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--text-main);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

.toggle-btn:not(.active):hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

.toggle-btn.active {
    color: var(--bg);
    border-color: var(--text-main);
}

.toggle-btn.active::before {
    transform: scaleX(1);
    transform-origin: left;
}

.toggle-btn.active:hover {
    opacity: 0.8;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* Panels */
.panel {
    background: var(--panel-bg);
    padding: 26px 28px;
    border-left: 4px solid var(--text-main);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.panel:hover {
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 6px 6px 0px var(--text-main);
}

.panel h3 {
    font-family: 'Space Mono', 'Share Tech Mono', monospace;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.panel p {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.55;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    background: var(--panel-bg);
    padding: 30px;
    border-top: 2px solid var(--border);
    transition: background 0.2s, border-color 0.2s;
}

.timeline-item:hover {
    background: var(--bg);
    border-top-color: var(--accent);
    transform: scale(1.02);
    z-index: 10;
    box-shadow: 6px 6px 0px var(--border);
}

.tl-date {
    font-family: 'Share Tech Mono', monospace;
    color: var(--accent);
    font-weight: bold;
}

.tl-content h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}
.tl-content h4 {
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: normal;
}

/* Project / Skill Panels */
.project-panel, .skill-panel {
    background: var(--panel-bg);
    padding: 30px;
    border: 1px solid var(--border);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.project-panel:hover, .skill-panel:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 8px 8px 0px var(--text-main);
    border-color: var(--text-main);
    z-index: 10;
}

/* Live dossier status badge (DB-driven) */
.proj-status {
    position: absolute;
    top: 14px;
    right: 14px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 7px;
    border: 1px solid currentColor;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
}
.proj-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.proj-status--deployed { color: #2b8a3e; }
.proj-status--in_progress { color: var(--accent); }
.proj-status--archived { color: var(--text-muted); }
.proj-status--classified {
    color: #ffffff;
    background: var(--text-main);
    border-color: var(--text-main);
}

/* Mission feed loading / error states */
.proj-loading, .proj-load-error {
    grid-column: 1 / -1;
    font-family: 'Share Tech Mono', monospace;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding: 30px 0;
}
.proj-load-error { color: var(--accent); }

.proj-id {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.project-panel h3, .skill-panel h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.project-panel .tech {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Locked / In Progress Skills */
.skill-panel.locked {
    border: 2px dashed var(--border);
    background: transparent;
    color: var(--text-muted);
    opacity: 0.6;
}

.skill-panel.locked:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--text-muted);
    z-index: 1;
}

.skill-panel.locked h3 {
    color: var(--text-muted);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-main);
}

/* Hover Swap Utility */
.hover-swap {
    display: inline-grid;
}
h2.hover-swap {
    justify-items: start;
}
.btn.hover-swap {
    justify-items: center;
    align-items: center;
}
.hover-swap > span {
    grid-column: 1;
    grid-row: 1;
}
.hover-swap .hover-text {
    visibility: hidden;
}
@media (hover: hover) and (pointer: fine) {
    .hover-swap:hover .default-text {
        visibility: hidden;
    }
    .hover-swap:hover .hover-text {
        visibility: visible;
    }
}

/* "TAP" on touch, "CLICK" on a mouse — default to TAP, swap on fine pointer */
.verb-click { display: none; }
@media (hover: hover) and (pointer: fine) {
    .verb-touch { display: none; }
    .verb-click { display: inline; }
}

@media (hover: none), (pointer: coarse) {
    .custom-cursor, .crosshair-h, .crosshair-v {
        display: none !important;
    }
    a, button, .interactive-element, body {
        cursor: auto !important;
    }
    a[href], button {
        cursor: pointer !important;
    }
    /* Completely hide all heavy game components & UI on touch devices */
    #game-canvas, #player-car, #checkpoint, .wasd-keyboard-hint, #game-ui {
        display: none !important;
    }
}

/* Interactive Button Hover */
.interactive-btn:hover {
    background: var(--text-main) !important;
    color: var(--bg) !important;
    border-color: var(--accent) !important;
    box-shadow: 4px 4px 0px var(--accent);
}

.interests-simple-box {
    margin-top: 40px;
    padding: 60px;
    background: var(--panel-bg);
    border: 2px solid var(--border);
    text-align: center;
}

/* ------------------------------------- */
/* STANDALONE 3D SCROLL INTERESTS PAGE   */
/* ------------------------------------- */
.interests-section {
    height: 200vh;
    position: relative;
    background: var(--text-main);
}

.interests-sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.interests-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.fade-out {
    opacity: 0 !important;
}

.vignette-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 5;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.85) 100%);
}

.interest-base-img {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%; min-height: 100%;
    object-fit: cover;
    opacity: 0.25; /* Darker tint */
    filter: grayscale(100%);
}

.interest-xray-mask {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    clip-path: circle(0px at 0px 0px);
}

.interest-xray-img {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%; min-height: 100%;
    object-fit: cover;
    opacity: 1;
    filter: grayscale(100%) contrast(1.2);
}

.interests-details {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 40%;
    max-width: 550px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 20;
    pointer-events: none;
}

.detail-title {
    font-size: clamp(2rem, 3.5vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -2px;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--bg); /* White text on dark bg */
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.detail-desc-box {
    background: rgba(0, 0, 0, 0.6); /* Dark glass */
    backdrop-filter: blur(12px);
    border-left: 4px solid var(--accent);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-right: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
}

.detail-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}

.wheel-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 800px;
    height: 500px;
    z-index: 10;
}

.wheel-track {
    position: absolute;
    width: 100%;
    height: 100%;
}

.wheel-node {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 140px;
    height: 60px;
    margin-left: -70px;
    margin-top: -30px;
    background: rgba(0, 0, 0, 0.7); /* Dark glass */
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--bg); /* White text */
    transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
    font-family: 'Share Tech Mono', monospace;
    cursor: none;
    /* No will-change: transform here. It cached each node as a fixed-resolution
       GPU texture, and the per-frame scale() (depth zoom) then upsampled that
       small bitmap — making the text/icons blurry at rest and only snapping
       sharp when :hover forced a repaint. Re-rasterizing per frame keeps the 8
       nodes crisp; the intentional depth softness is the JS blur() filter. */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.wheel-node svg {
    pointer-events: none;
}

.wheel-node:hover {
    background: var(--text-main);
    color: var(--bg);
    border-color: var(--accent);
    box-shadow: 4px 4px 0px var(--accent);
}

/* ------------------------------------- */
/* GLITCH HOVER EFFECT                   */
/* ------------------------------------- */
.glitch-btn .logo-text::before,
.glitch-btn .logo-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    background: var(--text-main);
    color: var(--bg);
}

.glitch-btn:hover .logo-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent);
    clip-path: inset(10% 0 60% 0);
    animation: glitch-anim-1 0.15s infinite linear alternate-reverse;
    opacity: 1;
}

.glitch-btn:hover .logo-text::after {
    left: -2px;
    text-shadow: 2px 0 rgba(255,255,255,0.8);
    clip-path: inset(60% 0 10% 0);
    animation: glitch-anim-2 0.2s infinite linear alternate-reverse;
    opacity: 1;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 1px); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    40% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
    80% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 1px); }
    100% { clip-path: inset(30% 0 50% 0); transform: translate(1px, -1px); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 60% 0); transform: translate(2px, -1px); }
    20% { clip-path: inset(30% 0 20% 0); transform: translate(-2px, 1px); }
    40% { clip-path: inset(70% 0 10% 0); transform: translate(2px, 2px); }
    60% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, -2px); }
    80% { clip-path: inset(50% 0 30% 0); transform: translate(1px, 1px); }
    100% { clip-path: inset(5% 0 80% 0); transform: translate(-1px, -1px); }
}

/* ------------------------------------- */
/* TIC-TAC-TOE EASTER EGG                */
/* ------------------------------------- */
.wasd-keyboard-hint {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: transform 0.3s, border-color 0.3s;
}

.wasd-keyboard-hint.first-trigger {
    opacity: 1;
}

.wasd-keyboard-hint.triggered {
    opacity: 0.5;
}

.key-row {
    display: flex;
    gap: 5px;
}

.keycap {
    width: 40px;
    height: 40px;
    background: var(--bg);
    border: 2px solid var(--text-muted);
    border-bottom-width: 5px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    color: var(--text-muted);
    font-size: 1.2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    opacity: 0.1;
    transition: opacity 0.3s, border-color 0.3s, color 0.3s, background 0.3s, transform 0.1s;
}

.wasd-keyboard-hint:hover .keycap {
    opacity: 1;
    border-color: var(--text-main);
    color: var(--text-main);
}

.wasd-keyboard-hint.is-glitching .keycap {
    opacity: 0.4;
    border-color: var(--text-main);
    color: var(--text-main);
}

.wasd-keyboard-hint.is-glitching .logo-text::before {
    opacity: 1;
    left: 2px;
    text-shadow: -2px 0 var(--accent);
    animation: glitch-anim-1 0.3s infinite linear alternate-reverse;
}

.wasd-keyboard-hint.is-glitching .logo-text::after {
    opacity: 1;
    left: -2px;
    text-shadow: 2px 0 rgba(255,255,255,0.8);
    animation: glitch-anim-2 0.2s infinite linear alternate-reverse;
}

.keycap.pressed {
    opacity: 1 !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: #27272a;
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.6);
    transform: translateY(2px);
    border-bottom-width: 3px;
}

/* Transitions for existing content when game triggers */
body.ttt-active .container, body.ttt-active .top-nav {
    filter: blur(8px) grayscale(50%);
    transform: scale(0.96);
    pointer-events: none;
}

.tictactoe-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.tictactoe-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.ttt-container {
    background: var(--bg);
    border: 4px solid var(--text-main);
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    width: 350px;
    height: 600px;
    max-width: 95vw;
    box-shadow: 10px 10px 0 var(--accent);
    color: var(--text-main);
    font-family: 'Share Tech Mono', monospace;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
}

.tictactoe-overlay.active .ttt-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.ttt-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 35px;
    margin-bottom: 25px;
    flex-shrink: 0;
}

.ttt-badge {
    background: var(--text-main);
    color: #fff;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    letter-spacing: 1px;
    position: relative;
    cursor: help;
}

.ttt-badge-tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: var(--bg);
    color: var(--text-main);
    border: 2px solid var(--text-main);
    border-bottom: 4px solid var(--accent);
    padding: 10px 15px;
    font-size: 0.8rem;
    line-height: 1.6;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateY(-5px);
    z-index: 100;
}

.ttt-badge:hover .ttt-badge-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.ttt-esc {
    color: var(--text-muted);
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 2px;
}



.ttt-status {
    width: 100%;
    text-align: left;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 25px;
    text-transform: uppercase;
    height: 65px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.ttt-board {
    display: grid;
    grid-template-columns: repeat(3, 85px);
    grid-template-rows: repeat(3, 85px);
    justify-content: center;
    gap: 15px;
    width: 100%;
    background: transparent;
    border: none;
    margin-bottom: 25px;
}

.ttt-cell {
    background: var(--panel-bg);
    border: 2px solid var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4.5rem;
    font-weight: bold;
    cursor: none;
    transition: background 0.2s, border-color 0.2s;
}

.ttt-cell:active {
    background: rgba(255, 69, 0, 0.1);
    border-color: var(--accent);
    box-shadow: inset 0 0 15px rgba(255, 69, 0, 0.2);
}

.ttt-cell.x {
    color: var(--text-main);
}

.ttt-cell.o {
    color: var(--accent);
}

.ttt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.ttt-actions .btn {
    width: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#ttt-new-match {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

#ttt-new-match:hover {
    background: transparent;
    color: var(--accent);
}

#ttt-close {
    background: transparent;
    color: var(--text-main);
    border-color: var(--text-main);
}

#ttt-close:hover {
    background: var(--text-main);
    color: var(--bg);
}

.ttt-footer {
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* mobile-only custom carousel scrollbar, built by main.js */
.proj-scrollbar {
    display: none;
}

/* =========================================
   MOBILE RESPONSIVE RULES
   ========================================= */
@media (max-width: 768px) {
    .container {
        padding: 110px 15px 30px;
    }
    .top-nav {
        height: auto;
        padding: 15px 0 10px 0;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    .nav-logo {
        padding: 0 15px;
    }
    .nav-links {
        gap: clamp(2px, 1.2vw, 12px);
        font-size: clamp(0.7rem, 3vw, 0.85rem);
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        white-space: nowrap;
        width: 100%;
        padding: 0;
    }
    /* Bare text links only gave an 18px-tall hit area; pad them out to a
       ~40px tap target (within the 24-44px guideline) so thumbs land. */
    .nav-links a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        padding: 0 8px;
    }
    .nav-num {
        display: none;
    }
    /* No hover on touch, so section headers would be stuck on their themed
       alias ("Origin File"). Show the plain numbered label instead so the
       section is identifiable without the hover reveal. */
    h2.hover-swap .default-text { visibility: hidden; }
    h2.hover-swap .hover-text { visibility: visible; }
    /* CERTIFICATIONS heading + [ SHOW LOCKED ] no longer fit side-by-side
       on the narrowest phones; let the button drop to its own line rather
       than overflow the row (the button itself stays on one line). */
    .flex-between.baseline {
        flex-wrap: wrap;
        row-gap: 10px;
    }
    .hero {
        padding: 25px 15px;
        margin-bottom: 40px;
    }
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
        margin-bottom: 10px;
    }
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }
    .section {
        margin-bottom: 45px;
    }
    .section-header {
        margin-bottom: 25px;
    }
    .section-header h2 {
        font-size: 1.5rem;
    }
    .grid-2, .grid-3, .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    /* Horizontal Swipe Carousel for Projects */
    #projects .grid-3 {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        /* native indicator off: main.js draws its own transient bar
           that can also be dragged, and that survives bfcache restores */
        scrollbar-width: none;
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px; /* Ensure first card is inset */
        padding-right: 15px; /* Ensure last card has space */
    }

    #projects .project-panel {
        flex: 0 0 85vw; /* Allow the next card to peek in from the right */
        scroll-snap-align: center;
        padding: 25px 20px;
    }

    #projects .grid-3::-webkit-scrollbar {
        display: none;
    }

    /* custom carousel scrollbar (built by main.js): invisible at rest,
       flashes while swiping, and the thumb is drag-to-scroll. The bar
       is a 14px touch target drawn as a 4px hairline */
    .proj-scrollbar {
        display: block;
        position: relative;
        height: 14px;
        margin-top: -8px; /* tucks into the carousel's bottom padding */
        touch-action: none;
        opacity: 0;
        transition: opacity 0.25s ease;
        pointer-events: auto;
    }
    .proj-scrollbar.visible {
        opacity: 1;
    }
    .proj-scrollbar::before {
        content: '';
        position: absolute;
        left: 0; right: 0; top: 50%;
        height: 4px;
        transform: translateY(-50%);
        background: var(--panel-bg);
        border-radius: 2px;
    }
    .proj-scrollbar-thumb {
        position: absolute;
        top: 50%;
        left: 0;
        height: 4px;
        background: var(--accent);
        border-radius: 2px;
    }

    /* Interests Page Mobile Overrides */
    .interests-section {
        height: 100vh !important;
        overflow: hidden;
    }
    .wheel-container {
        display: block !important;
    }
    .interests-joystick-container {
        display: block;
        position: absolute;
        bottom: 220px;
        right: 20px;
        width: 90px;
        height: 90px;
        z-index: 40;
    }
    .joystick-base {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: rgba(0,0,0,0.5);
        border: 2px solid rgba(255,255,255,0.2);
        backdrop-filter: blur(5px);
        position: relative;
    }
    .joystick-puck {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--accent);
        position: absolute;
        top: 50%;
        left: 50%;
        margin-top: -18px;
        margin-left: -18px;
        box-shadow: 0 0 15px var(--accent);
    }
    
    .wheel-node {
        backdrop-filter: none !important;
        background: rgba(0, 0, 0, 0.95);
    }
    
    .interests-section .section-header {
        display: none !important;
    }
    .interest-xray-mask {
        clip-path: none !important;
    }
    .interest-xray-img {
        opacity: 0.15 !important;
        filter: grayscale(100%) contrast(1.2) brightness(0.4);
        transition: opacity 0.5s ease;
    }
    .interests-bg {
        opacity: 1 !important;
        transition: opacity 0.4s ease;
    }
    .interests-details {
        right: 0; left: 0;
        top: auto; bottom: 0;
        transform: none;
        width: 100%;
        max-width: none;
        text-align: left;
        padding: 60px 20px 20px 20px;
        background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0) 100%);
        margin: 0;
        opacity: 1 !important;
    }
    .detail-title {
        font-size: 2.2rem;
    }
    .detail-desc-box {
        padding: 10px 0 10px 15px;
        background: transparent;
        border: none;
        border-left: 4px solid var(--accent);
        backdrop-filter: none;
    }
    .detail-desc {
        font-size: 0.95rem;
    }
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    #core-skills-grid .skill-panel {
        padding: 15px;
    }
    #core-skills-grid .skill-panel h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }
    #core-skills-grid .skill-panel p {
        font-size: 0.85rem;
    }
    
    #certs-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    #certs-grid .skill-panel {
        padding: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    #certs-grid .skill-panel p {
        display: none;
    }
    #certs-grid .skill-panel h3 {
        font-size: 0.8rem;
        margin-bottom: 0;
        line-height: 1.2;
    }
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 20px;
    }
    .timeline-item h3 {
        font-size: 1.2rem;
    }
    .project-panel {
        padding: 20px;
    }
    .project-panel h3 {
        font-size: 1.2rem;
    }
    .panel {
        padding: 20px;
    }
    
    .skill-panel.locked::after {
        display: none;
    }
    
    /* Completely hide all heavy game components & UI */
    #game-canvas, #player-car, #checkpoint, .wasd-keyboard-hint, #game-ui {
        display: none !important;
    }
    
    /* Disable Custom Cursor & restore normal pointer */
    .custom-cursor, .crosshair-h, .crosshair-v {
        display: none !important;
    }
    a, button, .interactive-element, body {
        cursor: auto !important;
    }
    a[href], button {
        cursor: pointer !important;
    }
    

}

.nav-logo {
    transition: all 0.3s ease;
}
.nav-logo:hover {
    color: var(--accent);
    text-shadow: 0 0 6px rgba(255, 69, 0, 0.45);
}

/* UTILITY CLASSES */
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.min-h-screen { min-height: 100vh; }
.bg-main { background: var(--bg) !important; }
.inline-block { display: inline-block !important; }
.text-lg { font-size: 1.2rem !important; }
.w-200 { width: 200px !important; }

.hide-collapsed {
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease-out, max-height 0.3s ease-out, visibility 0.3s ease-out;
}
.hide-collapsed.expanded {
    opacity: 1;
    visibility: visible;
    max-height: 50px;
}

.fixed-header { position: fixed; top: 0; left: 0; padding: 20px 40px; background: transparent; border: none; z-index: 100; }
.fixed-header .logo { gap: 10px; color: var(--bg); font-family: 'Share Tech Mono', monospace; font-weight: bold; }
.hero-nav-line { position: absolute; top: 120px; left: 5%; z-index: 50; }

.mb-0 { margin-bottom: 0 !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-40 { margin-bottom: 40px !important; }
.mb-50 { margin-bottom: 50px !important; }
.ml-10 { margin-left: 10px !important; }
.relative { position: relative !important; }
.clickable { cursor: pointer !important; }
.no-underline { text-decoration: none !important; }
.text-accent { color: var(--accent) !important; }
.text-inherit { color: inherit !important; }

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.flex-center-all { display: flex; align-items: center; justify-content: center; height: 100%; }
.baseline { align-items: baseline !important; }

.status-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%; 
    background-color: var(--accent); margin-right: 8px; animation: blink 1.5s infinite;
}
.beyond-title {
    font-size: 2.5rem; font-weight: 900; margin-bottom: 10px; color: var(--text-main); letter-spacing: -1px;
}
.beyond-subtitle {
    font-size: 1.1rem; color: var(--text-muted); margin-bottom: 30px;
}
.main-footer {
    text-align: center; padding: 40px; margin-top: 40px; color: var(--text-muted); 
    font-size: 0.9rem; font-family: 'Share Tech Mono', monospace; 
    border-top: 1px solid var(--border); position: relative; z-index: 10;
}

#loadout-toggle-icon {
    display: inline-block;
    transition: color 0.3s;
    white-space: nowrap;
    text-align: center;
    min-width: 45px;
}
#loadout-toggle-btn:hover #loadout-toggle-icon {
    color: var(--text-main);
}

.loadout-collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0 !important;
    will-change: max-height, opacity, margin-bottom;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin-bottom 0.4s ease-out;
}
.loadout-collapsed.expanded {
    max-height: 1500px; /* Needs to be larger than content */
    opacity: 1;
    margin-bottom: 50px !important;
}

.collapsed-hint {
    display: block;
    background: var(--panel-bg);
    border: 1px dashed var(--border);
    padding: 15px;
    text-align: center;
    color: var(--text-muted);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    margin-bottom: 30px;
    
    max-height: 100px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease, border-width 0.3s ease;
}
.collapsed-hint.expanded {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-width: 0;
}


/* Mission History: hover-expand project briefs */
#projects .project-panel .pp-expand {
    position: absolute;
    top: -1px;
    left: -1px;
    width: min(620px, 92vw);
    background: var(--bg);
    border: 1px solid var(--text-main);
    padding: 30px;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* visual-only: cursor keeps targeting the card underneath */
    transform: translate3d(0, 8px, 0);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
    box-shadow: 0 18px 44px rgba(24, 24, 27, 0.14);
    /* own compositor layer: a 620px sheet with a 44px blur shadow
       repaints every entrance frame otherwise */
    will-change: transform, opacity;
    backface-visibility: hidden;
}

#projects .project-panel .pp-expand::after {
    /* offset accent frame, same treatment as the hero portrait */
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: -12px;
    bottom: -12px;
    border: 2px solid var(--accent);
    z-index: -1;
    pointer-events: none;
}

/* middle column: the preview opens centered over its card */
#projects .grid-3 .project-panel:nth-child(3n-1) .pp-expand {
    left: 50%;
    transform: translate3d(-50%, 8px, 0);
}

#projects .grid-3 .project-panel:nth-child(3n) .pp-expand {
    left: auto;
    right: -1px;
}

#projects .grid-3 .project-panel:nth-child(3n) .pp-expand::after {
    left: -12px;
    right: 12px;
}

.pp-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 15px;
}

.pp-head .proj-id {
    margin-bottom: 0;
}

.pp-stack {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    text-align: right;
}

.pp-expand h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.pp-hook {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 10px;
}

.pp-brief {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.pp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pp-chips span {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    border: 1px solid var(--text-main);
    padding: 5px 9px;
    white-space: nowrap;
    background: var(--bg);
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-chips span {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px 10px;
    white-space: nowrap;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
    #projects .project-panel {
        transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s,
            opacity 0.2s ease 0.1s, filter 0.2s ease 0.1s;
        /* compositor layers: the declutter fade animates opacity and
           grayscale on eight siblings at once - unpromoted, that is a
           full repaint of the grid on every transition frame */
        will-change: opacity, filter;
    }

    /* the popover replaces the card lift on desktop */
    #projects .project-panel:hover,
    #projects .project-panel:focus-visible {
        transform: none;
        box-shadow: none;
        border-color: var(--border);
        outline: none;
        z-index: 60;
    }

    #projects .project-panel:hover .pp-expand,
    #projects .project-panel:focus-visible .pp-expand {
        opacity: 1;
        visibility: visible;
        transform: translate3d(0, 0, 0);
        transition: opacity 0.18s ease 0.1s, transform 0.18s ease 0.1s, visibility 0s linear 0.1s;
    }

    #projects .grid-3 .project-panel:nth-child(3n-1):hover .pp-expand,
    #projects .grid-3 .project-panel:nth-child(3n-1):focus-visible .pp-expand {
        transform: translate3d(-50%, 0, 0);
    }

    /* declutter: while one card is previewed, fade the rest.
       The .previewing class is set by main.js - CSS :has(:hover)
       re-evaluates on every mouse move and lags the cursor */
    #projects .grid-3.previewing .project-panel:not(:hover):not(:focus-visible) {
        opacity: 0.18;
        filter: grayscale(1);
    }
}

/* touch / narrow screens keep the live layout untouched */
@media (hover: none), (pointer: coarse), (max-width: 1024px) {
    #projects .project-panel .pp-expand {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #projects .project-panel,
    #projects .project-panel .pp-expand {
        transition: none;
    }
}


/* Origin File vitals strip */
.vitals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    border: 2px solid var(--text-main);
    margin-bottom: 30px;
    background: var(--bg);
}

.vital {
    padding: 16px 18px;
    border-right: 2px solid var(--text-main);
}

.vital:last-child {
    border-right: none;
}

.vital .k {
    font-family: 'Space Mono', 'Share Tech Mono', monospace;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.vital .v {
    font-family: 'Archivo', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.25;
    text-transform: uppercase;
}

.vital .v.live {
    color: var(--accent);
}

@media (max-width: 900px) {
    .vitals {
        grid-template-columns: repeat(2, 1fr);
    }

    .vital {
        border-bottom: 2px solid var(--text-main);
    }

    .vital:nth-child(2n) {
        border-right: none;
    }

    .vital:last-child,
    .vital:nth-last-child(2):nth-child(odd) {
        border-bottom: none;
    }

    .vital:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* Mission detail overlay (opens on click/tap) */
.msn-overlay {
    position: fixed;
    inset: 0;
    background: rgba(24, 24, 27, 0.5);
    backdrop-filter: blur(3px);
    z-index: 8000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 4vh, 40px) 24px;
    opacity: 0;
    visibility: hidden;
    /* closing: backdrop holds until the sheet has left */
    transition: opacity 0.25s ease 0.05s, visibility 0s linear 0.3s;
}

.msn-overlay.active {
    opacity: 1;
    visibility: visible;
    /* opening */
    transition: opacity 0.3s ease;
}

body.msn-open {
    overflow: hidden;
}

.msn-sheet-wrap {
    position: relative;
    width: min(1000px, 94vw);
    opacity: 0;
    transform: translateY(28px) scale(0.97);
    /* closing: slip away quickly, easing in */
    transition: transform 0.25s cubic-bezier(0.5, 0, 0.75, 0.4), opacity 0.2s ease;
    will-change: transform, opacity;
}

.msn-overlay.active .msn-sheet-wrap {
    opacity: 1;
    transform: none;
    /* opening: long decelerating glide that settles gently */
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.msn-frame {
    position: absolute;
    top: 18px;
    left: 18px;
    right: -18px;
    bottom: -18px;
    border: 2px solid var(--accent);
    pointer-events: none;
}

.msn-sheet {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--text-main);
    padding: clamp(24px, 4vh, 38px) clamp(24px, 5vw, 46px) clamp(26px, 4.5vh, 42px);
    max-height: calc(100vh - clamp(40px, 8vh, 80px));
    overflow-y: auto;
}

/* desktop: render the whole sheet at 75% — the approved density.
   zoom scales layout too, so the sheet also fits short laptop
   viewports without an internal scrollbar */
@media (min-width: 769px) {
    .msn-sheet-wrap {
        zoom: 0.75;
    }

    /* vh units ignore zoom, so re-base the cap to zoomed units */
    .msn-sheet {
        max-height: calc((100vh - clamp(40px, 8vh, 80px)) / 0.75);
    }
}

.msn-back {
    display: block;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: clamp(14px, 2.5vh, 24px);
    transition: color 0.2s;
}

.msn-back:hover {
    color: var(--accent);
}

.msn-d-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: clamp(8px, 1.8vh, 16px);
}

.msn-d-head .proj-id {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.msn-d-stack {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    color: var(--accent);
    text-align: right;
}

.msn-d-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: clamp(8px, 1.5vh, 14px);
}

.msn-d-hook {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.msn-d-brief {
    color: var(--text-muted);
    max-width: 680px;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: clamp(10px, 2.6vh, 24px);
}

.msn-rmo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 2px solid var(--text-main);
    margin-bottom: clamp(18px, 3vh, 28px);
}

.rmo-cell {
    padding: 20px 22px;
    border-right: 2px solid var(--text-main);
}

.rmo-cell:last-child {
    border-right: none;
}

.rmo-cell .k {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.66rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 9px;
}

.rmo-cell .v {
    font-weight: 600;
    font-size: 0.93rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .msn-sheet {
        padding: 30px 22px 34px;
    }

    .msn-d-title {
        font-family: 'Space Mono', monospace;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        margin-bottom: 20px;
    }

    .msn-d-brief {
        font-size: 0.92rem;
        line-height: 1.6;
    }

    .msn-rmo {
        grid-template-columns: 1fr;
    }

    .rmo-cell {
        border-right: none;
        border-bottom: 2px solid var(--text-main);
    }

    .rmo-cell:last-child {
        border-bottom: none;
    }

    .msn-frame {
        top: 10px;
        left: 10px;
        right: -10px;
        bottom: -10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .msn-overlay,
    .msn-sheet-wrap {
        transition: none;
    }

    .msn-sheet-wrap {
        transform: none;
    }
}


/* --- Interactive Dossier Cards --- */
.interactive-dossiers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.dossier-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* hover cue: accent arrow pops in at 45 degrees, top-right */
.dossier-arrow {
    position: absolute;
    top: 16px;
    right: 18px;
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transform: translate(-8px, 8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .dossier-card:hover .dossier-arrow,
    .dossier-card:focus-visible .dossier-arrow {
        opacity: 1;
        transform: translate(0, 0);
    }
}

.dossier-subhead {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text-main);
    margin-bottom: 20px;
}

.dossier-p {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.6;
}

.dossier-footer {
    margin-top: auto;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    padding-top: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dossier-card:hover .dossier-footer {
    opacity: 1;
}

/* touch devices can't hover: the tap hint must be visible by default */
@media (hover: none), (pointer: coarse) {
    .dossier-footer {
        opacity: 1;
    }
}

/* Shared Dossier List Styles (cards + overlay) */
.dossier-head {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    background: var(--text-main);
    color: var(--bg);
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 25px;
    letter-spacing: 0.1em;
    position: relative;
    align-self: flex-start;
}

.dossier-crosshair {
    position: absolute;
    top: 5px;
    right: -40px;
    width: 20px;
    height: 20px;
}
.dossier-crosshair::before, .dossier-crosshair::after {
    content: '';
    position: absolute;
    background: var(--text-main);
}
.dossier-crosshair::before { top: 9px; left: 0; width: 20px; height: 2px; }
.dossier-crosshair::after { left: 9px; top: 0; width: 2px; height: 20px; }

.dossier-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.2vh, 10px);
}

.dossier-list li {
    display: flex;
    align-items: baseline;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.d-key {
    color: var(--text-muted);
    white-space: nowrap;
}

.d-dots {
    flex-grow: 1;
    border-bottom: 1px dotted var(--border);
    margin: 0 10px;
    opacity: 0.5;
}

.d-val {
    color: var(--text-main);
    font-weight: bold;
    text-align: right;
}

.d-val.hot {
    color: var(--accent);
}

.d-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 6px;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Honor reduced-motion for the infinitely-blinking status dots (the one
   looping animation that wasn't gated). They rest fully opaque. */
@media (prefers-reduced-motion: reduce) {
    .blink-dot, .status-dot, .d-status-dot { animation: none; }
}

@media (max-width: 768px) {
    .interactive-dossiers {
        grid-template-columns: 1fr;
    }
    .d-dots { display: none; }
    .dossier-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 10px;
    }
    .d-val { text-align: left; }
}
/* Project Panel Hover Arrow */
.project-arrow {
    position: absolute;
    bottom: 16px;
    right: 18px;
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transform: translate(-8px, -8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .project-panel:hover .project-arrow,
    .project-panel:focus-visible .project-arrow {
        opacity: 1;
        transform: translate(0, 0);
    }
}


/* ============================================================
   DOSSIER SHEET FINISH - structured chrome for the Origin File
   popup: header rail, stamp row with file counter, bordered
   spec table, EOF footer, staggered content rise.
   ============================================================ */
.msn-sheet {
    scrollbar-width: thin;
    scrollbar-color: var(--text-main) transparent;
}

.msn-sheet::-webkit-scrollbar {
    width: 4px;
}

.msn-sheet::-webkit-scrollbar-track {
    background: transparent;
}

.msn-sheet::-webkit-scrollbar-thumb {
    background: var(--text-main);
}

.dsr-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: clamp(8px, 2vh, 14px);
    margin-bottom: clamp(10px, 2.6vh, 24px);
}

.dsr-top .msn-back {
    margin-bottom: 0;
}

.dsr-stamp-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: clamp(10px, 2.4vh, 22px);
}

.dsr-stamp-row .dossier-head {
    margin-bottom: 0;
    font-size: 11px;
    letter-spacing: 0.16em;
    padding: 5px 10px;
}

.dsr-file-no {
    font-family: 'Space Mono', 'Share Tech Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* stats as a bordered spec table, in the vitals strip language */
.dsr-list {
    gap: 0;
    border: 1px solid var(--text-main);
}

.dsr-list li {
    justify-content: space-between;
    gap: 18px;
    padding: clamp(6px, 1.6vh, 11px) 16px;
    border-bottom: 1px solid var(--border);
}

.dsr-list li:last-child {
    border-bottom: none;
}

.dsr-list .d-dots {
    display: none;
}

.dsr-list .d-key {
    font-size: 11px;
    letter-spacing: 1.5px;
}

/* the easter-egg row is clickable: arrow cue always on for touch,
   hover-revealed on desktop along with a faint accent wash */
.dsr-game-row {
    cursor: pointer;
}

.dsr-game-row .d-val::after {
    content: ' \2197';
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .dsr-game-row:hover,
    .dsr-game-row:focus-visible {
        background: rgba(255, 69, 0, 0.06);
    }
    .dsr-game-row:hover .d-val,
    .dsr-game-row:focus-visible .d-val {
        text-decoration: underline;
    }
    .dsr-game-row:hover .d-val::after,
    .dsr-game-row:focus-visible .d-val::after {
        opacity: 1;
    }
}

@media (hover: none), (pointer: coarse) {
    .dsr-game-row .d-val::after {
        opacity: 1;
    }
}

.dsr-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: clamp(12px, 2.6vh, 28px);
}

.dsr-eof {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.dsr-next {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.5px;
    background: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
    padding: 9px 14px;
    transition: background 0.2s, color 0.2s;
}

.dsr-next:hover {
    background: var(--text-main);
    color: var(--bg);
}

/* staggered content rise, restarted from main.js on each open */
.dsr-sheet.dsr-animate > * {
    animation: dsrRise 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.dsr-sheet.dsr-animate > *:nth-child(2) { animation-delay: 0.05s; }
.dsr-sheet.dsr-animate > *:nth-child(3) { animation-delay: 0.1s; }
.dsr-sheet.dsr-animate > *:nth-child(4) { animation-delay: 0.15s; }
.dsr-sheet.dsr-animate > *:nth-child(5) { animation-delay: 0.2s; }
.dsr-sheet.dsr-animate > *:nth-child(6) { animation-delay: 0.25s; }

@keyframes dsrRise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}


@media (max-width: 768px) {
    .dsr-list li {
        margin-bottom: 0;
        gap: 0;
    }

    /* keep each label tight against its value so the pair
       reads as one unit, not two separate lines */
}


@media (max-width: 768px) {
    .dsr-list li {
        margin-bottom: 0;
        gap: 0;
    }

    /* keep each label tight against its value so the pair
       reads as one unit, not two separate lines */
    .dsr-list .d-key {
        line-height: 1.1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dsr-sheet.dsr-animate > * {
        animation: none;
    }
}

.github-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: 2px solid var(--text-main);
    padding: 10px 16px;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--text-main);
    text-transform: uppercase;
    transition: all 0.2s;
    width: 140px;
    cursor: pointer;
    text-decoration: none;
}
.github-btn:hover { background: var(--text-main) !important; color: var(--bg) !important; }
.github-btn .gh-text-hover { display: none; }
.github-btn:hover .gh-text-default { display: none; }
.github-btn:hover .gh-text-hover { display: inline; }


/* ============================================================
   ACCESSIBILITY POLISH
   - sr-only: visually hidden, still read by screen readers
   - skip-link: keyboard bypass to main content
   - accent-text: a darker orange used ONLY for small text, so it
     clears WCAG AA 4.5:1 on white and the #f4f4f5 panels (the bright
     --accent stays for fills, borders, large button text and dots)
   - visible focus rings on overlay controls + interest wheel nodes
   ============================================================ */
:root { --accent-text: #c43c00; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: -120px;
    left: 12px;
    z-index: 10001;
    background: var(--text-main);
    color: var(--bg);
    padding: 10px 16px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 12px;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* small accent-orange text → darker token for AA contrast */
.tl-date,
.proj-id,
.vital .v.live,
.nav-links a.active,
.pp-stack,
.msn-d-stack,
.proj-status--in_progress {
    color: var(--accent-text);
}

/* visible keyboard focus on overlay controls (was outline:none) */
.msn-back:focus-visible,
.dsr-next:focus-visible,
.dsr-game-row:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.wheel-node:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Countdown Overlay */
#game-countdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001; /* Above game HUD */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}
#game-countdown-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
#game-countdown-overlay .countdown-text {
    font-size: 8rem;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.5);
    line-height: 1;
    margin: 0;
    flex-shrink: 0;
    animation: countdown-pulse 1s infinite;
}
#game-countdown-overlay .countdown-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    background: var(--bg);
    border: 1px solid var(--text-main);
    padding: 24px 36px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    flex-shrink: 0;
}
#game-countdown-overlay .instruction-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
#game-countdown-overlay .inst-label {
    font-family: 'Share Tech Mono', monospace;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 2px;
}
#game-countdown-overlay .keycap {
    opacity: 1;
    width: auto;
    min-width: 40px;
    padding: 4px 12px;
    border-color: var(--text-main);
    color: var(--text-main);
    background: var(--surface);
    box-shadow: 0 2px 0 var(--text-muted);
}
#game-countdown-overlay .key-shift {
    min-width: 80px;
}
#game-countdown-overlay .key-space {
    min-width: 140px;
}
@keyframes countdown-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
@media (max-width: 768px) {
    #game-countdown-overlay .countdown-box { flex-direction: column; gap: 20px; }
}

/* small accent-orange text → darker token for AA contrast */
.tl-date,
.proj-id,
.vital .v.live,
.nav-links a.active,
.pp-stack,
.msn-d-stack,
.proj-status--in_progress {
    color: var(--accent-text);
}

/* visible keyboard focus on overlay controls (was outline:none) */
.msn-back:focus-visible,
.dsr-next:focus-visible,
.dsr-game-row:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.wheel-node:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* 2-Minute Trophy Achievement */
.trophy-container {
    position: relative;
    display: inline-block;
    margin-left: 10px;
    z-index: 1000;
}

body.game-active .trophy-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.trophy-icon {
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: trophy-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: transform 0.2s;
}

.trophy-icon:hover {
    transform: scale(1.1);
}

.trophy-popup {
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 15px 20px;
    width: max-content;
    max-width: 350px;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.trophy-popup::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

/* hover (mouse) OR .open (tap/click/keyboard, toggled by main.js) reveals it */
.trophy-container:hover .trophy-popup,
.trophy-container.open .trophy-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.trophy-icon:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 3px;
}

.trophy-popup p {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
}

.trophy-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}
.trophy-close:hover {
    color: var(--accent);
}

@keyframes trophy-bounce {
    0% { transform: scale(0); }
    80% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.trophy-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--text-main);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.trophy-btn:hover {
    transform: scale(1.08);
    background: var(--text-main);
    color: var(--bg);
    border-color: var(--text-main);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
}

/* ---- Dedicated Mobile Modal (injected to body) ---- */
.trophy-mobile-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.trophy-mobile-modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.trophy-mobile-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 30px 20px;
    width: 100%;
    max-width: 350px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.trophy-mobile-modal:not(.hidden) .trophy-mobile-content {
    transform: translateY(0) scale(1);
}
.trophy-mobile-content .trophy-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}
.trophy-mobile-content p {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
    margin: 0 0 20px 0;
}

@media (min-width: 769px) {
    .trophy-mobile-modal { display: none !important; }
}
@media (max-width: 768px) {
    .desktop-popup { display: none !important; }
}


/* ============================================================
   OPS LOG — experience timeline items are clickable like the
   project/dossier cards: hover shows an arrow + an expand cue,
   click/tap opens the detail overlay (#ops-overlay).
   ============================================================ */
.timeline-item {
    position: relative;
    cursor: pointer;
}

.timeline-item .tl-arrow {
    position: absolute;
    top: 16px;
    right: 18px;
    color: var(--accent-text);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transform: translate(-8px, 8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.timeline-item .tl-cue {
    position: absolute;
    bottom: 14px;
    right: 18px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    .timeline-item:hover .tl-arrow,
    .timeline-item:focus-visible .tl-arrow {
        opacity: 1;
        transform: translate(0, 0);
    }
    .timeline-item:hover .tl-cue,
    .timeline-item:focus-visible .tl-cue {
        opacity: 1;
    }
}

/* touch can't hover: keep the expand cue visible */
@media (hover: none), (pointer: coarse) {
    .timeline-item .tl-cue {
        opacity: 1;
    }
}

.timeline-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* bulleted highlights inside the ops detail overlay */
.ops-points {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.ops-points li {
    position: relative;
    padding-left: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-main);
}

.ops-points li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-text);
    font-weight: 700;
}


/* ============================================================
   BLOG — reading layout (index list + article body)
   ============================================================ */
.post-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.post-body { max-width: 720px; }
.post-body p {
    font-size: 1.06rem;
    line-height: 1.75;
    margin-bottom: 18px;
    color: var(--text-main);
}
.post-body h2 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    margin: 40px 0 16px;
}
.post-body ul.ops-points { margin: 6px 0 20px; }
.post-body code {
    font-family: 'Share Tech Mono', monospace;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}
.post-body blockquote {
    margin: 22px 0;
    padding: 16px 22px;
    background: var(--panel-bg);
    border-left: 4px solid var(--accent);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* blog index post list */
.post-list { display: flex; flex-direction: column; gap: 18px; }
.post-card {
    display: block;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--text-main);
    padding: 26px 28px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.post-card:hover {
    transform: translateX(4px);
    box-shadow: 6px 6px 0 var(--text-main);
    border-left-color: var(--accent);
}
.post-card h3 { font-size: 1.4rem; margin: 8px 0 8px; }
.post-card p { color: var(--text-muted); font-size: 0.97rem; line-height: 1.6; }
