:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-blue: #38bdf8;
    --accent-purple: #818cf8;
    --border-color: #334155;
    --success: #4ade80;
    --warning: #facc15;
    --danger: #fb923c;
    --critical: #ef4444;
}

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

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: white;
}

h1 { font-size: 3.0rem; line-height: 1.1; margin-bottom: 1.5rem; }
h2 { font-size: 2.0rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { color: var(--text-muted); margin-bottom: 1rem; }

.mono { font-family: 'JetBrains Mono', monospace; }

.gradient-text {
    background: linear-gradient(to right, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

section { padding: 5rem 0; border-bottom: 1px solid var(--border-color); }

/* Navigation */
nav {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo { font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; gap: 0.5rem; color: white; text-decoration: none;}
.version { font-size: 0.75rem; background: var(--border-color); padding: 2px 8px; border-radius: 99px; color: var(--text-muted); }

.nav-links { display: flex; gap: 2rem; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: white; }

/* Hero */
.hero {
    text-align: center;
    /* Top=2rem (to close top gap), Bottom=0 (to close button gap) */
    padding: 2rem 0 0; 
    position: relative;
    overflow: hidden;
}
.hero img {
    max-width: 100%;
    height: auto;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, rgba(15, 23, 42, 0) 70%);
    z-index: -1;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-primary { background: #2563eb; color: white; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #1e293b; color: white; border: 1px solid var(--border-color); }
.btn-secondary:hover { background: #334155; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

.card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
}

/* Matrix Table */
.matrix-container { overflow-x: auto; }

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.matrix-table th, .matrix-table td {
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    text-align: center;
}

.matrix-table th { background: #1e293b; color: white; font-weight: 600; }
.matrix-table td.row-header { text-align: left; background: #1e293b; color: white; font-weight: 600; vertical-align: middle; }
.matrix-table td.sub-header { text-align: left; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; background: #0f172a; }

/* ABIL Colors */
.abil-qm { color: #94a3b8; font-weight: bold; background: rgba(148, 163, 184, 0.1); }
.abil-a { color: #4ade80; font-weight: bold; background: rgba(74, 222, 128, 0.1); }
.abil-b { color: #facc15; font-weight: bold; background: rgba(250, 204, 21, 0.1); }
.abil-c { color: #fb923c; font-weight: bold; background: rgba(251, 146, 60, 0.1); }
.abil-d { color: #ef4444; font-weight: bold; background: rgba(239, 68, 68, 0.1); }

/* Case Studies */
.case-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.case-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

.alert-box {
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.3);
    color: #fdba74;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    margin-top: 1rem;
}

footer { padding: 4rem 0; text-align: center; border-top: 1px solid var(--border-color); font-size: 0.9rem; color: var(--text-muted); }

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
}
/* --- Hamburger Menu Styles --- */

/* Initially hide the hamburger button on desktop */
.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
}

/* Style the three lines of the hamburger */
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    /* Show the hamburger button */
    .hamburger {
        display: block;
    }

    /* Change nav-links from a row to a hidden dropdown column */
    .nav-links {
        position: fixed;
        left: -100%; /* Hide off-screen by default */
        top: 4rem; /* Match the height of nav-inner */
        gap: 0;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }

    /* Style the links inside the mobile menu */
    .nav-links a {
        display: block;
        padding: 1.5rem 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.1rem;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* The 'active' class slides the menu in */
    .nav-links.active {
        left: 0;
    }

    /* Hamburger Animation to 'X' */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

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

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}