:root {
    --bg-color: #020202;
    --card-bg: rgba(10, 15, 20, 0.9);
    --card-border: rgba(100, 150, 200, 0.2);
    --card-hover-bg: rgba(20, 30, 40, 0.9);
    --card-hover-border: #00aaff;

    --text-main: #eeeeee;
    --text-dim: #667788;
    --accent-primary: #00aaff;
    /* Intellectual Blue */
    --accent-secondary: #ffffff;

    --font-stack: 'komm64fantasy', monospace;
}

@font-face {
    font-family: 'komm64fantasy';
    src: url('fonts/komm64fantasy-webfont.woff2') format('woff2'),
        url('fonts/komm64fantasy-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-stack);
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    letter-spacing: 0.05em;
    /* Increase readability for pixel font */
    line-height: 1.5;
}

/* Background Grid - Precise and Subtle */
.background-anim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(30, 40, 50, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 40, 50, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
}

/* Vignette for depth */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(2, 2, 2, 0.8) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Main Container */
.command-center {
    width: 100%;
    max-width: 900px;
    padding: 60px 20px;
    opacity: 0;
    animation: systemStart 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Header */
.header {
    text-align: left;
    /* More like a console read-out */
    margin-bottom: 40px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

h1 {
    font-size: 2rem;
    margin: 0;
    color: var(--text-main);
    /* text-transform: uppercase; Removed to allow lowercase */
    font-weight: normal;
}

.subtitle {
    color: var(--accent-primary);
    font-size: 0.9rem;
    margin: 0;
    margin-bottom: 5px;
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    /* Tighter gap for structure */
}

/* Cards - "Data Modules" */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0;
    /* Sharp edges */
    padding: 25px 20px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.15s ease-out;
    /* Snappy transition */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Hover State - Precise Highlight */
.card:hover {
    background: var(--card-hover-bg);
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
    /* Hard shadow, not soft */
}

/* Decorative Corner Accents */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border-top: 2px solid transparent;
    border-right: 2px solid transparent;
    transition: border-color 0.15s;
}

.card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-bottom: 2px solid transparent;
    border-left: 2px solid transparent;
    transition: border-color 0.15s;
}

.card:hover::after,
.card:hover::before {
    border-color: var(--accent-primary);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.card-title {
    font-size: 1.1rem;
    color: var(--accent-primary);
    text-transform: uppercase;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Footer - "System Line" */
.footer {
    margin-top: 60px;
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-dim);
    border-top: 1px solid var(--card-border);
    padding-top: 10px;
    text-transform: uppercase;
}

/* System Start Animation */
@keyframes systemStart {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsiveness */
@media (max-width: 600px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    h1 {
        font-size: 1.8rem;
    }
}