/* The Midnight Fortress Color Palette */
:root {
    --obsidian: #0A1428;
    --midnight: #1C2E4A;
    --silver: #E5E7EB;
    --slate: #708090;
    --titanium: #C0C0C0;
    --cyan: #4A90E2;
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--obsidian);
    color: var(--silver);
    line-height: 1.6;
}

h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: var(--titanium);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--cyan);
}

/* Layout & Containers */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    border-bottom: 1px solid rgba(112, 128, 144, 0.2);
}

/* Header Navigation */
header {
    position: sticky;
    top: 0;
    background-color: rgba(10, 20, 40, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(112, 128, 144, 0.3);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--titanium);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg, var(--midnight) 0%, var(--obsidian) 100%);
    padding: 8rem 0;
    text-align: center;
    border-bottom: none;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--silver);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--slate);
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.btn {
    display: inline-block;
    background-color: var(--titanium);
    color: var(--obsidian);
    padding: 1rem 2.5rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--cyan);
    color: white;
}

/* Grid Layouts for Cards */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Card Styling */
.card {
    background-color: var(--midnight);
    border: 1px solid var(--slate);
    border-radius: 6px;
    padding: 2.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.clickable-card {
    cursor: pointer;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--cyan);
}

.clickable-card:hover .read-more {
    color: var(--cyan);
    transform: translateX(5px);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--titanium);
}

.metric-highlight {
    color: var(--cyan);
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
    margin: 1.5rem 0 0.5rem 0;
    line-height: 1;
}

.metric-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--slate);
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--titanium);
    text-transform: uppercase;
    transition: all 0.3s ease;
}

/* Specific Section Adjustments */
.section-header {
    margin-bottom: 3.5rem;
    text-align: center;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--slate);
}

/* The Lab */
.the-lab {
    background-color: var(--midnight);
    text-align: center;
}

/* Footer */
footer {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--obsidian);
}

.footer-legacy {
    font-size: 1.5rem;
    letter-spacing: 10px;
    color: var(--slate);
    margin: 2rem 0;
}

.footer-links a {
    color: var(--slate);
    font-size: 0.9rem;
    margin: 0 1rem;
}

.cert-badge {
    color: var(--titanium); 
    font-weight: bold; 
    border: 1px solid var(--slate); 
    padding: 0.5rem 1rem; 
    border-radius: 4px; 
    margin: 0 0.5rem;
}

/* Typography Content Formatting */
.text-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
.text-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.text-content li {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.text-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--silver);
    font-size: 1.3rem;
}

/* Modal Styles */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 20, 40, 0.9);
    backdrop-filter: blur(5px);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    opacity: 1;
}

.modal-content {
    display: none; 
    background-color: var(--obsidian);
    border: 1px solid var(--slate);
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    margin-top: 5vh;
    margin-bottom: 5vh;
    padding: 3rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.modal-content.active {
    display: block;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2rem;
    color: var(--slate);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--cyan);
}

.modal-body h2 {
    color: var(--titanium);
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--midnight);
    padding-bottom: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .modal-content {
        padding: 2rem;
    }
}