:root {
    --bg-color: #050a14;
    --text-color: #e0e6ed;
    --accent-cyan: #00f3ff;
    --accent-purple: #bc13fe;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-display: 'Orbitron', sans-serif;
}

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

/* Professional Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px; /* For horizontal scrollbars */
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 243, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* Text Selection */
::selection {
    background: rgba(0, 243, 255, 0.2);
    color: var(--accent-cyan);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased; /* Crisper text on Mac */
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(5, 10, 20, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari support */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    z-index: 1002; /* Keep logo above mobile menu */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-cyan);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.cta-button {
    padding: 10px 25px;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-display);
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-cyan);
    transition: left 0.3s ease;
    z-index: -1;
}

.cta-button:hover {
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4);
}

.cta-button:hover::before {
    left: 0;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1002;
    padding: 10px; /* Increase clickable area */
    margin-right: -10px; /* Compensate for padding */
    background: transparent;
    border: none;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--accent-cyan);
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    /* Made background semi-transparent to show particles */
    background: radial-gradient(circle at center, rgba(26, 37, 58, 0.4) 0%, transparent 70%);
    position: relative;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(0, 243, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    perspective: 1000px;
    transform-style: preserve-3d;
    opacity: 0.3;
    z-index: -1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 40px;
    color: #a0aab5;
}

/* Features Grid */
.container {
    max-width: 1200px;
    margin: 100px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--accent-cyan);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.1);
    border-color: var(--accent-cyan);
}

/* CSS/SVG Generated Plots Styling */
.plot-container-css {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plot-label {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.6rem;
    color: var(--accent-cyan);
    font-family: var(--font-display);
    background: rgba(0, 243, 255, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.plot-label-alert {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.6rem;
    color: #ff2a2a;
    font-family: var(--font-display);
    background: rgba(255, 42, 42, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(255, 42, 42, 0.3);
    animation: flash 1s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 3D Surface Plot Simulation */
.surface-3d-wrap {
    perspective: 600px;
    width: 80%;
    height: 60%;
}

.surface-plane {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.2), rgba(188, 19, 254, 0.2));
    transform: rotateX(60deg) rotateZ(-30deg);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
}

.grid-line-x, .grid-line-y {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
}

.grid-line-x { width: 100%; height: 1px; top: 50%; }
.grid-line-y { height: 100%; width: 1px; left: 50%; }

.data-peak {
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
}

.peak-1 { top: 20%; left: 30%; width: 40px; height: 40px; background: var(--accent-cyan); opacity: 0.6; }
.peak-2 { top: 60%; left: 70%; width: 50px; height: 50px; background: var(--accent-purple); opacity: 0.6; }
.peak-3 { top: 40%; left: 50%; width: 30px; height: 30px; background: #fff; opacity: 0.4; }

/* Histogram Simulation */
.chart-histogram {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 80%;
    height: 60%;
    gap: 5px;
}

.bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    transition: height 0.5s ease;
}

.bar.anomaly {
    background: linear-gradient(to top, rgba(255, 42, 42, 0.2), rgba(255, 42, 42, 0.8));
    border-top: 2px solid #ff2a2a;
    box-shadow: 0 0 10px rgba(255, 42, 42, 0.4);
}

/* SVG Charts */
.chart-svg {
    width: 100%;
    height: 100%;
    padding: 20px;
}

.pulse-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 3s linear infinite;
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}


/* Exception for icons */
.card-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}

.card h3 {
    margin-bottom: 15px;
    color: var(--accent-cyan);
}

/* DiagAI Section */
.diagai-hero {
    display: flex;
    align-items: flex-start; /* Changed from center to start for better terminal alignment */
    gap: 50px;
    margin-bottom: 100px;
    flex-wrap: wrap;
}

.diagai-content {
    flex: 1;
    min-width: 300px;
}

.diagai-visual {
    flex: 1;
    position: relative;
    min-width: 300px;
}

.diagai-visual img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(188, 19, 254, 0.2);
    border: 1px solid var(--accent-purple);
}

.agent-node-small {
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #aaa;
    transition: all 0.3s ease;
}

.agent-node-small.active {
    background: rgba(255, 42, 42, 0.1);
    border-color: #ff2a2a;
    color: #ff2a2a;
    box-shadow: 0 0 10px rgba(255, 42, 42, 0.2);
}

/* Terminal Simulation */
.terminal-window {
    background: rgba(5, 10, 20, 0.95);
    border: 1px solid var(--accent-purple);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(188, 19, 254, 0.15);
    font-family: monospace;
    overflow: hidden;
    margin-bottom: 30px;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    font-size: 0.8rem;
    color: #aaa;
    margin-left: 10px;
}

.terminal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.term-line {
    display: flex;
    gap: 10px;
    line-height: 1.4;
    font-size: 0.9rem;
}

.term-prompt {
    color: var(--accent-cyan);
    font-weight: bold;
}

.term-cmd {
    color: #fff;
}

.term-output {
    color: #aaa;
    margin-left: 20px;
}

.dtc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
    margin-left: 20px;
}

.dtc-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 10px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
}

.dtc-item.critical {
    border-color: #ff2a2a;
    background: rgba(255, 42, 42, 0.1);
}

.dtc-item.warning {
    border-color: #ffbd2e;
    background: rgba(255, 189, 46, 0.1);
}

.dtc-code {
    font-weight: bold;
    color: #fff;
    margin-bottom: 2px;
}

.dtc-desc {
    font-size: 0.75rem;
    color: #ccc;
}

.agent-badge {
    display: inline-block;
    background: rgba(188, 19, 254, 0.2);
    color: var(--accent-purple);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-right: 5px;
    border: 1px solid var(--accent-purple);
}

/* Specs Table */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
}

.specs-table th,
.specs-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.specs-table th {
    color: var(--accent-cyan);
    font-family: var(--font-display);
    width: 30%;
}

/* Footer */
footer {
    background: rgba(5, 10, 20, 0.9);
    padding: 50px 20px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 100px;
}

.footer-logo {
    font-size: 2rem;
    font-family: var(--font-display);
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

/* Animations */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px var(--accent-cyan);
    }

    50% {
        box-shadow: 0 0 20px var(--accent-cyan), 0 0 10px var(--accent-purple);
    }

    100% {
        box-shadow: 0 0 5px var(--accent-cyan);
    }
}

/* Particle Background */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Brought forward, but behind content (which is z-index 1+) */
    pointer-events: none;
}

/* Schematic Diagrams */
.schematic-section {
    margin: 80px 0;
    padding: 40px;
    background: rgba(5, 10, 20, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.schematic-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    animation: scanline 3s linear infinite;
}

@keyframes scanline {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.diagram-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.diagram-node {
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid var(--accent-cyan);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    min-width: 150px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

.diagram-node.central {
    border-color: var(--accent-purple);
    background: rgba(188, 19, 254, 0.1);
    box-shadow: 0 0 20px rgba(188, 19, 254, 0.2);
    transform: scale(1.1);
}

.diagram-node h4 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #fff;
}

.diagram-node p {
    font-size: 0.8rem;
    color: #aaa;
}

/* Connecting Lines (Visual only via pseudo-elements for simple flows) */
.flow-diagram {
    display: flex;
    align-items: center;
    gap: 20px;
}

.flow-arrow {
    color: var(--accent-cyan);
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.agent-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.agent-card:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 243, 255, 0.05);
}

.agent-card h5 {
    color: var(--accent-cyan);
    margin-bottom: 5px;
}

.agent-card p {
    font-size: 0.85rem;
    color: #ccc;
}

/* Contact Page Refined */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    margin-top: 30px;
}

.contact-card-minimal {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.contact-card-minimal:hover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 243, 255, 0.1);
}

.contact-card-minimal .icon {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.05);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--accent-cyan);
}

.contact-info h4 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
}

.contact-info span {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Specs: Visual Processing Flow */
.flow-visual-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin: 60px 0;
    position: relative;
}

.flow-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.flow-node {
    background: rgba(5, 10, 20, 0.8);
    border: 1px solid var(--accent-cyan);
    padding: 15px 25px;
    border-radius: 30px;
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.9rem;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
    position: relative;
    min-width: 180px;
    text-align: center;
}

.flow-node.start {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.flow-node.decision {
    border-color: var(--accent-purple);
    border-radius: 10px;
    transform: rotate(0deg);
    background: rgba(188, 19, 254, 0.1);
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.2);
}

.flow-node.process {
    border-color: var(--accent-cyan);
}

.flow-node.output {
    border-color: #0f0;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

/* Connecting Lines */
.flow-arrow-down {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple));
    position: relative;
}

.flow-arrow-down::after {
    content: '▼';
    position: absolute;
    bottom: -10px;
    left: -6px;
    color: var(--accent-purple);
    font-size: 12px;
}

/* Specs: File Structure */
.file-tree {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    color: #a0aab5;
    white-space: pre;
    overflow-x: auto;
}

.file-tree .dir {
    color: var(--accent-purple);
    font-weight: bold;
}

.file-tree .file {
    color: var(--accent-cyan);
}

.file-tree .comment {
    color: #666;
    font-style: italic;
}

/* Visual Enhancements for Case Studies */
.visual-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    /* Replaced previous basic style */
}

.visual-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.visual-container:hover img {
    transform: scale(1.05);
}

.overlay-data {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(5, 10, 20, 0.8);
    border: 1px solid var(--accent-cyan);
    padding: 5px 10px;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    backdrop-filter: blur(5px);
    z-index: 2;
}

.target-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--accent-cyan);
    animation: pulse 2s infinite;
    z-index: 2;
}

.target-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--accent-cyan);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.overlay-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
}

/* WLTP Digital Report */
.digital-report {
    background: rgba(5, 10, 20, 0.9);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 10px;
    font-family: monospace;
    position: relative;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.report-header {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-title {
    color: var(--accent-cyan);
    font-weight: bold;
}

.report-status {
    background: rgba(0, 255, 0, 0.1);
    color: #0f0;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #0f0;
    font-size: 0.8rem;
}

.report-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #a0aab5;
}

.progress-bar {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-cyan);
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 243, 255, 0.5);
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: scan 3s linear infinite;
    opacity: 0.5;
    pointer-events: none;
}

@keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* NEW: Professional Plot Widgets (Zoomed visuals) */
.plot-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Main plot left, small data right */
    grid-template-rows: 200px 100px;
    gap: 10px;
    width: 100%;
}

.plot-widget {
    background-color: rgba(5, 10, 20, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background-repeat: no-repeat;
    transition: border-color 0.3s ease;
}

.plot-widget:hover {
    border-color: var(--accent-cyan);
}

.plot-widget.main-view {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.plot-widget.sub-view-1 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.plot-widget.sub-view-2 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.widget-label {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 6px;
    font-size: 0.6rem;
    color: var(--accent-cyan);
    border-radius: 3px;
    font-family: var(--font-display);
    border: 1px solid var(--glass-border);
    z-index: 2;
}

/* Background configurations for Zooming */
.bg-fleet {
    background-image: url('assets/dashboard-main.png');
}

.bg-gear {
    background-image: url('assets/gear-hunt.png');
}

/* Fleet Zoom Levels */
.zoom-fleet-main {
    background-position: 15% 30%; /* Adjusted to find a good graph area */
    background-size: 250%; /* Zoom in on the main graph */
}

.zoom-fleet-sub1 {
    background-position: 80% 10%; /* Top right specific metric */
    background-size: 400%; /* Extreme zoom on a list/detail */
}

.zoom-fleet-sub2 {
    background-position: 80% 90%; /* Bottom right specific metric */
    background-size: 400%;
}

/* Gear Zoom Levels */
.gear-strip-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gear-strip {
    height: 100px;
    width: 100%;
    border: 1px solid var(--glass-border);
    background-color: rgba(5, 10, 20, 0.8);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    background-repeat: no-repeat;
}

.gear-strip.wide {
    background-position: 10% 50%;
    background-size: 200%; /* Slight zoom for context */
}

.gear-strip.detail {
    background-position: 60% 50%; /* Focus on a specific event */
    background-size: 400%; /* Extreme zoom */
    border-color: var(--accent-purple);
}

.gear-strip::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 1px;
    background: rgba(255, 0, 0, 0.5);
}

/* --- MEDIA QUERIES FOR MOBILE STABILITY --- */
@media (max-width: 992px) {
    nav {
        padding: 20px 30px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .diagai-hero {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    nav {
        padding: 15px 20px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%; /* Occupy most of the screen */
        max-width: 300px;
        background: rgba(5, 10, 20, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
        z-index: 1001;
        border-left: 1px solid var(--glass-border);
        gap: 40px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        visibility: hidden; /* Accessibility fix: Hide completely when closed */
    }

    .nav-links.active {
        right: 0;
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 10px 20px; /* Larger touch target */
    }

    .nav-links .cta-button {
        margin-top: 20px;
        width: 100%;
        text-align: center;
        padding: 15px 25px; /* Larger touch target */
    }

    /* Hero */
    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .hero div[style*="display: flex"] {
        flex-direction: column;
        width: 100%;
        gap: 15px !important;
    }

    .hero .cta-button {
        width: 100%;
    }

    /* Container */
    .container {
        margin: 60px auto;
        padding: 0 15px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    /* Grid */
    .grid {
        grid-template-columns: 1fr;
    }

    /* Diagrams & Flows */
    .diagram-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .flow-diagram {
        flex-direction: column;
    }

    /* Tables */
    .specs-table th, .specs-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .specs-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Plot Widgets */
    .plot-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .plot-widget.main-view {
        grid-column: 1 / -1;
        grid-row: 1;
        height: 200px;
    }
    
    .plot-widget.sub-view-1 {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    
    .plot-widget.sub-view-2 {
        grid-column: 1 / -1;
        grid-row: 3;
    }
}
