/* ==========================================================================
   Claus J. Pedersen Homepage — OLED & Philips Hue Ambilight Theme
   Built for .NET 10 Blazor WebAssembly
   ========================================================================== */

:root {
    --bg-oled: #030712;
    --bg-surface: rgba(15, 23, 42, 0.72);
    --bg-surface-elevated: rgba(22, 33, 58, 0.82);
    --bg-card-inner: rgba(9, 14, 28, 0.75);
    --border-subtle: rgba(148, 163, 184, 0.14);
    --border-bright: rgba(56, 189, 248, 0.38);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --hue-primary: #38bdf8;
    --hue-secondary: #a855f7;
    --hue-accent: #f59e0b;
    --hue-glow: rgba(56, 189, 248, 0.22);
    --hue-opacity: 0.85;

    --cyan: #38bdf8;
    --amber: #f59e0b;
    --emerald: #10b981;
    --purple: #a855f7;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-oled);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-oled);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

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

code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 0.12rem 0.4rem;
    border-radius: 5px;
    color: var(--cyan);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   OLED Boot / Loading Screen
   ========================================================================== */
.oled-boot-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 42%, #0c162d 0%, #030712 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    z-index: 9999;
}

.oled-boot-glow {
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.22), rgba(168, 85, 247, 0.08), transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.loading-progress {
    position: relative;
    display: block;
    width: 5.5rem;
    height: 5.5rem;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(148, 163, 184, 0.15);
    stroke-width: 0.45rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #38bdf8;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.08s ease-in-out;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.65));
}

.loading-progress-title {
    font-weight: 800;
    letter-spacing: 0.18em;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.loading-progress-text {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
}

#blazor-error-ui {
    background: #7f1d1d;
    color: #fecaca;
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    display: none;
    left: 0;
    padding: 0.75rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 10000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.75rem;
}

/* ==========================================================================
   Site Shell & Philips Hue Ambilight Orbs
   ========================================================================== */
.site-shell {
    position: relative;
    min-height: 100vh;
    background-color: var(--bg-oled);
    transition: background-color 0.7s ease, color 0.5s ease;
    isolation: isolate;
}

.site-shell.cinema-mode-active {
    background-color: #010308;
}

.ambilight-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    opacity: var(--hue-opacity, 0.85);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hue-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(115px);
    transition: background 0.9s ease, transform 0.9s ease, opacity 0.9s ease;
}

.orb-top-left {
    top: -120px;
    left: -100px;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, var(--hue-primary) 0%, transparent 70%);
    opacity: 0.32;
}

.orb-top-right {
    top: 12%;
    right: -140px;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, var(--hue-secondary) 0%, transparent 70%);
    opacity: 0.26;
}

.orb-bottom-center {
    bottom: -180px;
    left: 28%;
    width: 700px;
    height: 500px;
    background: radial-gradient(circle, var(--hue-accent) 0%, transparent 72%);
    opacity: 0.20;
}

/* ==========================================================================
   Sticky Top Header & Navigation
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.5s ease, border-color 0.5s ease;
}

.site-shell.cinema-mode-active .site-header {
    background: rgba(1, 3, 8, 0.94);
    border-bottom-color: rgba(56, 189, 248, 0.12);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-disc {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 32%, var(--hue-primary), var(--hue-secondary));
    box-shadow: 0 0 18px var(--hue-glow);
    border: 2px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    transition: box-shadow 0.5s ease, background 0.5s ease;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.brand-role {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.main-nav a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    padding: 0.25rem 0;
}

.main-nav a:hover {
    color: var(--hue-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-cinema-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: var(--text-primary);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.25s ease;
}

.nav-cinema-btn:hover {
    border-color: var(--hue-primary);
    box-shadow: 0 0 15px var(--hue-glow);
}

.nav-cinema-btn.active {
    background: rgba(245, 158, 11, 0.16);
    border-color: var(--amber);
    color: #fde68a;
}

.hue-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hue-primary);
    box-shadow: 0 0 8px var(--hue-primary);
}

.nav-cinema-btn.active .hue-dot {
    background: var(--amber);
    box-shadow: 0 0 10px var(--amber);
}

.icon-btn {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.42rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.icon-btn:hover {
    color: var(--text-primary);
    border-color: var(--hue-primary);
    background: rgba(56, 189, 248, 0.12);
}

/* ==========================================================================
   Shared Glass Card & Section Primitives
   ========================================================================== */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px -15px rgba(0, 0, 0, 0.65);
    transition: transform 0.28s ease, border-color 0.3s ease, box-shadow 0.35s ease, background 0.5s ease;
}

.site-shell.cinema-mode-active .glass-card {
    background: rgba(8, 13, 26, 0.88);
    border-color: rgba(56, 189, 248, 0.18);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.9), 0 0 28px var(--hue-glow);
}

.page-section {
    padding: 4.5rem 1.5rem;
    scroll-margin-top: 76px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.25rem;
    flex-wrap: wrap;
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hue-primary);
    margin-bottom: 0.45rem;
}

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.18;
    color: var(--text-primary);
}

.section-subtitle {
    margin-top: 0.65rem;
    max-width: 780px;
    color: var(--text-secondary);
    font-size: 1.02rem;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.35rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--hue-primary), var(--hue-secondary));
    color: #020617;
    font-weight: 700;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px var(--hue-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 12px 30px var(--hue-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    background: rgba(30, 41, 59, 0.85);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-sans);
    border: 1px solid rgba(56, 189, 248, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--hue-primary);
    background: rgba(56, 189, 248, 0.15);
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.15rem;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    color: var(--text-primary);
    border-color: var(--hue-primary);
    background: rgba(56, 189, 248, 0.1);
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    font-family: var(--font-mono);
    border: 1px solid transparent;
}

.badge-cyan {
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, 0.3);
}

.badge-amber {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}

.badge-purple {
    background: rgba(168, 85, 247, 0.12);
    color: #d8b4fe;
    border-color: rgba(168, 85, 247, 0.3);
}

.btn-chip {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-chip:hover {
    border-color: var(--hue-primary);
    color: var(--text-primary);
}

.btn-chip.active {
    background: rgba(56, 189, 248, 0.18);
    border-color: var(--hue-primary);
    color: #7dd3fc;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.22);
}

.arch-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.73rem;
    padding: 0.24rem 0.6rem;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--text-secondary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    padding-top: 3.5rem;
    padding-bottom: 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 2.5rem;
    align-items: center;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: clamp(2.3rem, 4.5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.15rem;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, var(--hue-primary) 55%, var(--hue-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    max-width: 680px;
}

.hero-lead strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.1rem;
}

.hero-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
}

.stat-box {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--hue-primary);
}

.stat-label {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.hero-visual {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portrait-card {
    position: relative;
    padding: 0.85rem;
    cursor: pointer;
    overflow: hidden;
}

.portrait-card:hover {
    transform: translateY(-4px);
    border-color: var(--hue-primary);
}

.portrait-glow {
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 50% 30%, var(--hue-glow), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.portrait-img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.portrait-Meta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.35rem 0.2rem;
}

.portrait-Meta strong {
    display: block;
    font-size: 0.98rem;
}

.portrait-Meta span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.zoom-hint {
    font-family: var(--font-mono);
    font-size: 0.75rem !important;
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc !important;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.mini-rig-card {
    padding: 0.95rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.mini-rig-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.rig-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.15);
    color: var(--hue-primary);
    min-width: 82px;
    text-align: center;
}

/* ==========================================================================
   Section 1: AI Board Games Grid
   ========================================================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.game-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.6rem;
    border-top: 3px solid var(--card-accent, var(--cyan));
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--card-accent, var(--cyan));
    box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.8), 0 0 24px rgba(56, 189, 248, 0.16);
}

.game-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.game-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--card-accent, var(--cyan));
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
}

.game-board-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.game-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.game-subtitle {
    font-size: 0.86rem;
    font-family: var(--font-mono);
    color: var(--card-accent, var(--cyan));
    margin-top: 0.2rem;
    margin-bottom: 0.65rem;
}

.game-tagline {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 1.1rem;
}

.game-telemetry-strip {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

.telemetry-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    gap: 0.5rem;
}

.tel-label {
    color: var(--text-muted);
}

.tel-val {
    font-family: var(--font-mono);
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.game-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.game-highlights li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.game-highlights li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--card-accent, var(--cyan));
    font-weight: bold;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.35rem;
}

.game-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.btn-game-play {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--card-accent, var(--cyan));
    color: #020617;
    font-weight: 700;
    font-size: 0.86rem;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.btn-game-play:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.btn-game-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-game-secondary:hover {
    color: var(--text-primary);
    border-color: var(--card-accent, var(--cyan));
}

/* ==========================================================================
   Section 2: Interactive 64-Bit Bitboard & AI Search Lab
   ========================================================================== */
.bitboard-lab {
    padding: 2rem;
}

.lab-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.lab-title {
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.lab-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 720px;
}

.lab-presets {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.preset-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.lab-grid-layout {
    display: grid;
    grid-template-columns: minmax(310px, 430px) 1fr;
    gap: 2rem;
    align-items: start;
}

.board-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.ray-selector {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-mini {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-mini.active {
    border-color: var(--emerald);
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.14);
}

.interactive-board {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-template-rows: repeat(8, minmax(0, 1fr));
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 2px solid rgba(56, 189, 248, 0.32);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75);
}

.board-cell {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    min-width: 0;
    min-height: 0;
    border: 1px solid rgba(148, 163, 184, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    overflow: hidden;
    transition: background 0.15s ease;
}

.board-cell.cell-dark {
    background: #13203b;
}

.board-cell.cell-light,
.board-cell.cell-light-disabled {
    background: #283a5e;
}

.board-cell.cell-light-disabled {
    cursor: default;
}

.board-cell.cell-dark:hover {
    background: rgba(56, 189, 248, 0.25);
}

/* Checkers Discs & Crowns */
.disc-checkers-white {
    background: radial-gradient(circle at 32% 30%, #f8fafc, #cbd5e1 65%, #94a3b8);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.65), inset 0 0 0 3px rgba(255, 255, 255, 0.6);
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.disc-checkers-black {
    background: radial-gradient(circle at 32% 30%, #38bdf8, #0284c7 68%, #0369a1);
    box-shadow: 0 3px 12px rgba(56, 189, 248, 0.55), inset 0 0 0 3px rgba(186, 230, 253, 0.35);
    border: 2px solid #7dd3fc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.disc-checkers-white.is-king,
.disc-checkers-black.is-king {
    border-color: #fbbf24;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.75);
}

.crown-icon {
    font-size: 0.85rem;
    line-height: 1;
    color: #f59e0b;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
    pointer-events: none;
}

.jump-ring {
    width: 48%;
    height: 48%;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2.5px dashed #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.65);
}

/* Stello 8x8 Green Felt Othello Board */
.stello-board {
    border-color: rgba(16, 185, 129, 0.5);
    background: #064e3b;
}

.board-cell.cell-othello {
    background: linear-gradient(145deg, #065f46, #047857);
    border: 1px solid rgba(2, 44, 34, 0.85);
}

.board-cell.cell-othello:hover {
    background: #059669;
}

.board-cell.cell-othello.othello-legal {
    background: rgba(16, 185, 129, 0.28);
}

.board-cell.cell-othello.othello-flipped .board-disc {
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.85);
}

.disc-othello-black {
    background: radial-gradient(circle at 30% 30%, #334155, #090d16 70%, #020617);
    border: 1.5px solid #475569;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8);
}

.disc-othello-white {
    background: radial-gradient(circle at 30% 30%, #ffffff, #e2e8f0 72%, #94a3b8);
    border: 1.5px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.othello-legal-marker {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    color: #a7f3d0;
    background: rgba(2, 44, 34, 0.72);
    border: 1.5px solid #34d399;
    border-radius: 999px;
    padding: 0.15rem 0.35rem;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.othello-star-dot {
    position: absolute;
    top: -3px;
    left: -3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(2, 44, 34, 0.95);
    pointer-events: none;
}

/* Connect 4 7x6 Vertical Gravity Rack */
.c4-rack-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.c4-drop-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.c4-drop-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.2rem;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.18s ease;
}

.c4-drop-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.c4-drop-btn.drop-red:hover:not(:disabled) {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.18);
}

.c4-drop-btn.drop-yellow:hover:not(:disabled) {
    border-color: #facc15;
    background: rgba(250, 204, 21, 0.18);
}

.c4-drop-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.drop-col-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
}

.sentinel-bit-label {
    font-family: var(--font-mono);
    font-size: 0.56rem;
    color: var(--text-muted);
}

.c4-board-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(6, minmax(0, 1fr));
    width: 100%;
    aspect-ratio: 7 / 6;
    background: linear-gradient(180deg, #1d4ed8 0%, #1e3a8a 100%);
    border: 3px solid #3b82f6;
    border-radius: var(--radius-md);
    padding: 0.45rem;
    gap: 0.38rem;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.8), inset 0 2px 12px rgba(255, 255, 255, 0.18);
}

.c4-cell {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    min-width: 0;
    min-height: 0;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.c4-bit-idx {
    position: absolute;
    top: 1px;
    left: 3px;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: rgba(191, 219, 254, 0.72);
    z-index: 2;
    pointer-events: none;
}

.c4-hole {
    width: 84%;
    height: auto;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 50%;
    background: #050b18;
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.92), 0 1px 2px rgba(147, 197, 253, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.c4-cell:hover .c4-hole {
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.92), 0 0 0 2px rgba(250, 204, 21, 0.65);
}

.c4-disc {
    width: 90%;
    height: auto;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 50%;
}

.disc-c4-red {
    background: radial-gradient(circle at 32% 30%, #fca5a5, #ef4444 55%, #991b1b);
    border: 2px solid #f87171;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.45);
}

.disc-c4-yellow {
    background: radial-gradient(circle at 32% 30%, #fef08a, #facc15 55%, #ca8a04);
    border: 2px solid #fde047;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.45);
}

.disc-four-win {
    box-shadow: 0 0 16px #ffffff, inset 0 0 8px #ffffff;
    border-color: #ffffff;
}

.c4-landing-dot {
    width: 28%;
    height: auto;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}

.c4-threat-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.12rem 0.3rem;
    border-radius: 999px;
}

.threat-red {
    color: #fecaca;
    background: rgba(220, 38, 38, 0.35);
    border: 1px solid #ef4444;
}

.threat-yellow {
    color: #fef08a;
    background: rgba(202, 138, 4, 0.35);
    border: 1px solid #facc15;
}

.c4-sequence-bar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.25rem 0.15rem;
}

.text-red { color: #f87171; }
.text-yellow { color: #facc15; }
.text-cyan { color: #38bdf8; }
.text-amber { color: #fbbf24; }
.dot-red { background: #ef4444; box-shadow: 0 0 6px #ef4444; }

.cell-bit-idx {
    position: absolute;
    top: 2px;
    left: 4px;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    line-height: 1;
    color: rgba(148, 163, 184, 0.55);
    pointer-events: none;
}

.cell-coord {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    line-height: 1;
    color: rgba(148, 163, 184, 0.45);
    pointer-events: none;
}

.board-disc {
    width: 68%;
    height: auto;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 50%;
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.disc-p1 {
    background: radial-gradient(circle at 30% 30%, #7dd3fc, #0284c7);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.75);
    border: 1.5px solid #e0f2fe;
}

.disc-p2 {
    background: radial-gradient(circle at 30% 30%, #fde68a, #d97706);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.75);
    border: 1.5px solid #fef3c7;
}

.ray-dot {
    width: 28%;
    height: auto;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 10px var(--emerald);
    opacity: 0.85;
}

.lab-telemetry-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.register-group,
.search-sim-box {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.register-header,
.search-sim-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.register-title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--hue-primary);
}

.register-badge,
.depth-badge {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.register-row {
    display: grid;
    grid-template-columns: 1.1fr 1.3fr 0.8fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 0.84rem;
}

.register-row:last-child {
    border-bottom: none;
}

.reg-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-p1 { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }
.dot-p2 { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.dot-occ { background: #a855f7; }
.dot-ray { background: #10b981; }

.reg-hex {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: #e2e8f0;
    letter-spacing: 0.03em;
}

.accent-code {
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.35);
}

.reg-popcnt {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: right;
}

.sim-desc {
    font-size: 0.83rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.algo-pipeline-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.75rem 0 0.85rem;
}

.algo-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.22rem 0.58rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.algo-pill.algo-active {
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #bae6fd;
}

.algo-pill.algo-muted {
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed rgba(148, 163, 184, 0.25);
    color: var(--text-muted);
    opacity: 0.65;
}

.depth-slider-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.85rem 0 1.15rem;
    font-size: 0.86rem;
}

.depth-slider-row input[type="range"],
.hue-dimmer-box input[type="range"],
.pace-slider-row input[type="range"] {
    flex: 1;
    accent-color: var(--hue-primary);
    cursor: pointer;
    height: 6px;
}

.depth-val {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--hue-primary);
    min-width: 70px;
    text-align: right;
}

.sim-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.sim-metric {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    display: flex;
    flex-direction: column;
}

.sim-metric-label {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.sim-metric-value {
    font-family: var(--font-mono);
    font-size: 0.98rem;
    font-weight: 700;
    margin-top: 0.22rem;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.sim-metric-time {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.highlight-cyan { color: var(--cyan); }
.highlight-amber { color: var(--amber); }
.highlight-emerald { color: var(--emerald); }

/* ==========================================================================
   Section 3: Home Theater, Hue Controller, Photo Gallery & Movies
   ========================================================================== */
.hue-controller {
    padding: 1.75rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(56, 189, 248, 0.28);
}

.hue-controller.cinema-active {
    border-color: var(--amber);
    box-shadow: 0 0 36px var(--hue-glow);
}

.hue-controller-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.hue-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.hue-desc {
    color: var(--text-secondary);
    font-size: 0.94rem;
    max-width: 680px;
}

.cinema-trigger-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
}

.btn-cinema-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    font-family: var(--font-sans);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.35);
    transition: all 0.25s ease;
}

.btn-cinema-toggle.is-playing {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.4);
}

.status-led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px #ffffff;
}

.kodi-now-playing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-mono);
    font-size: 0.74rem;
}

.kodi-tag {
    color: var(--hue-primary);
    font-weight: 700;
}

.kodi-movie-title {
    color: var(--text-secondary);
}

.hue-controls-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    align-items: center;
}

.control-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
}

.scene-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.scene-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
}

.scene-pill:hover,
.scene-pill.active {
    border-color: var(--hue-primary);
    color: var(--text-primary);
    background: rgba(56, 189, 248, 0.14);
}

.scene-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

.hue-dimmer-box {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.dimmer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dimmer-value {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--hue-primary);
    font-weight: 700;
}

/* Home Theater Photo Gallery */
.theater-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
    margin-bottom: 2.5rem;
}

.theater-photo-card {
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.theater-photo-card:hover {
    transform: translateY(-4px);
    border-color: var(--hue-primary);
}

.photo-img-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #020617;
}

.photo-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.theater-photo-card:hover .photo-img-wrapper img {
    transform: scale(1.04);
}

.photo-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.82);
    backdrop-filter: blur(8px);
    color: var(--hue-primary);
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.photo-zoom-btn {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: rgba(3, 7, 18, 0.82);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.photo-caption {
    padding: 1.1rem 1.25rem;
}

.photo-caption h4 {
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.photo-caption p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 5.2 Hardware Specs Grid */
.theater-specs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.15rem;
    flex-wrap: wrap;
}

.theater-specs-header h3 {
    font-size: 1.35rem;
    font-weight: 800;
}

.signal-chain-pill {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: #7dd3fc;
}

.theater-gear-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
    margin-bottom: 2.75rem;
}

.theater-gear-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.theater-gear-card.highlight-border {
    border-color: rgba(56, 189, 248, 0.38);
}

.gear-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
}

.gear-category {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.gear-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.gear-model {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.gear-specs-line {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--hue-primary);
}

.gear-desc {
    font-size: 0.83rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.gear-link {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--hue-primary);
}

.gear-link:hover {
    text-decoration: underline;
}

/* Favorite Movies Grid */
.movies-header {
    margin-bottom: 1.15rem;
}

.movies-header h3 {
    font-size: 1.35rem;
    font-weight: 800;
}

.movies-header p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
}

.movie-card {
    padding: 1.25rem;
    cursor: pointer;
    border-left: 3px solid var(--movie-accent, var(--cyan));
}

.movie-card:hover,
.movie-card.movie-active {
    transform: translateY(-3px);
    border-color: var(--movie-accent, var(--cyan));
    background: rgba(22, 33, 58, 0.9);
}

.movie-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.movie-format-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.movie-play-indicator {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--movie-accent, var(--cyan));
    font-weight: 600;
}

.movie-title {
    font-size: 1.08rem;
    font-weight: 700;
}

.movie-era {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.movie-why {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Section 4: Technology, Gaming Rig & Tesla Bento Grid
   ========================================================================== */
.bento-tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.35rem;
}

.bento-card {
    padding: 1.6rem;
    border-top: 3px solid var(--bento-accent, var(--cyan));
}

.bento-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.bento-category {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--bento-accent, var(--cyan));
    letter-spacing: 0.08em;
}

.bento-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bento-accent, var(--cyan));
    box-shadow: 0 0 10px var(--bento-accent, var(--cyan));
}

.bento-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.bento-subtitle {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.bento-specs-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.bento-specs-list li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.bento-specs-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--bento-accent, var(--cyan));
    font-weight: bold;
}

/* ==========================================================================
   Section 5: Professional Career & Enterprise Architecture
   ========================================================================== */
.architecture-overview {
    padding: 1.75rem;
    margin-bottom: 1.75rem;
}

.arch-overview-cols {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 2rem;
    align-items: start;
}

.arch-bio h3 {
    font-size: 1.25rem;
    margin-bottom: 0.65rem;
}

.arch-bio p {
    color: var(--text-secondary);
    font-size: 0.94rem;
    margin-bottom: 0.75rem;
}

.integration-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.5rem;
}

.integration-pill {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #bae6fd;
}

.career-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.timeline-card {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
}

.timeline-card.current-role {
    border-left: 4px solid var(--cyan);
}

.timeline-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.timeline-period {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.timeline-duration {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-muted);
}

.current-badge {
    display: inline-block;
    width: fit-content;
    margin-top: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.timeline-title-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}

.timeline-title-row h3 {
    font-size: 1.18rem;
    font-weight: 700;
}

.timeline-company {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--hue-primary);
}

.timeline-summary {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.timeline-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.timeline-highlights li {
    position: relative;
    padding-left: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.timeline-highlights li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--hue-primary);
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* ==========================================================================
   Section 6: Fitness, Running & Sports + RunningPaceLab
   ========================================================================== */
.fitness-sports-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.fitness-stats-card,
.sports-fan-card {
    padding: 1.6rem;
}

.fitness-stats-card h3,
.sports-fan-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.runner-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.runner-stat {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
}

.runner-stat.highlight {
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.08);
}

.r-val {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--hue-primary);
}

.runner-stat.highlight .r-val {
    color: #34d399;
}

.r-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.fitness-note {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.sports-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sport-item {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.sport-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.sport-item strong {
    display: block;
    font-size: 0.96rem;
    margin-bottom: 0.2rem;
}

.sport-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Running Pace Lab */
.pace-lab {
    padding: 1.6rem;
}

.pace-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.pace-title {
    font-size: 1.3rem;
    font-weight: 800;
}

.pace-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin-top: 0.25rem;
}

.pace-presets {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.pace-slider-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.pace-badge {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.14);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.pace-badge.sub-two {
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
}

.splits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
}

.split-card {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
}

.split-card.highlight {
    border-color: var(--hue-primary);
}

.split-dist {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.split-time {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0.15rem;
}

/* ==========================================================================
   Section 7: Life with Maria
   ========================================================================== */
.maria-card {
    padding: 1.75rem;
}

.maria-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.25fr;
    gap: 2.25rem;
    align-items: center;
}

.maria-photo-wrap {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.maria-photo-wrap img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.maria-photo-wrap:hover img {
    transform: scale(1.03);
}

.maria-lead {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 0.85rem 0 1.35rem;
}

.maria-meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.location-pill {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

/* ==========================================================================
   Footer & Photo Lightbox Modal
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    background: rgba(2, 6, 16, 0.92);
    padding: 3rem 0 2rem;
    margin-top: 3rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-brand {
    max-width: 400px;
}

.footer-brand h4 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links-group {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-col-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--hue-primary);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.footer-col a {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-col a:hover {
    color: var(--hue-primary);
}

.footer-bottom {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.not-found-box {
    margin: 5rem auto;
    padding: 3rem;
    text-align: center;
    max-width: 600px;
}

.not-found-box p {
    color: var(--text-secondary);
    margin: 0.75rem 0 1.5rem;
}

/* Lightbox Modal */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(2, 6, 15, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.lightbox-modal {
    position: relative;
    max-width: 1024px;
    width: 100%;
    background: #070d1c;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
}

.lightbox-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(3, 7, 18, 0.85);
    border: 1px solid var(--border-subtle);
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
}

.lightbox-img-wrap {
    max-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #020617;
}

.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
}

.lightbox-caption {
    padding: 1.15rem 1.5rem;
}

.badge-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--hue-primary);
    text-transform: uppercase;
}

.lightbox-caption h4 {
    font-size: 1.15rem;
    margin: 0.2rem 0;
}

.lightbox-caption p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1080px) {
    .hero-grid,
    .lab-grid-layout,
    .hue-controls-grid,
    .arch-overview-cols,
    .fitness-sports-grid,
    .maria-grid {
        grid-template-columns: 1fr;
    }

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

    .theater-gear-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .theater-gallery-grid,
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .hero-quick-stats,
    .theater-gear-grid,
    .theater-gallery-grid,
    .movies-grid,
    .bento-tech-grid,
    .splits-grid {
        grid-template-columns: 1fr;
    }

    .timeline-card {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .register-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .reg-popcnt {
        text-align: left;
    }

    .cinema-trigger-box,
    .kodi-now-playing {
        align-items: flex-start;
    }
}

