/* ================================
   GLOBAL TOKENS
================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&display=swap');

:root {
    --bg-primary: #030305;
    --bg-secondary: #1f1f1f;
    --surface-primary: rgba(255, 255, 255, 0.03);
    --surface-secondary: rgba(255, 255, 255, 0.06);

    --border-dark: #262626;
    --border-soft: rgba(255, 255, 255, 0.08);

    --text-primary: #ffffff;
    --text-secondary: #cfcfcf;
    --text-muted: #737373;

    --accent: #a855f7;
    --accent-soft: rgba(168, 85, 247, 0.12);
    --accent-border: rgba(168, 85, 247, 0.3);
    --accent-glow: rgba(168, 85, 247, 0.3);

    --container-width: 1200px;

    --font-primary: 'Inter', sans-serif;
    --font-code: 'Fira Code', monospace;

    --header-height-mobile: 48px;
    --header-height-desktop: 56px;
}

/* ================================
   RESET
================================ */

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

/* ================================
   BASE
================================ */

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    padding-top: var(--header-height-mobile);
    line-height: 1.5;
}

@media (min-width: 640px) {
    body {
        padding-top: var(--header-height-desktop);
    }
}

img {
    max-width: 100%;
    display: block;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

/* ================================
   GLOBAL LAYERS
================================ */

main,
section,
footer,
header {
    position: relative;
    z-index: 10;
}

.grid-overlay {
    z-index: -1 !important;
}

.bg-glow {
    position: fixed;
    inset: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(142, 34, 243, 0.25) 0%,
        transparent 20%
    );
    pointer-events: none;
    z-index: 0;
}

/* ================================
   LAYOUT UTILS
================================ */

.container-default {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 768px) {
    .container-default {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* ================================
   SHARED CANVAS
================================ */

#canvas-container {
    display: block;
    position: relative;
    pointer-events: none;
    width: 100%;
    min-height: 400px;
}

#canvas-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* ================================
   TERMINAL FOOTER
================================ */

.terminal-container {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--bg-secondary);
    color: #e5e5e5;
    width: 100%;
    font-family: var(--font-code);
    position: relative;
    z-index: 60;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-dark);
    font-size: 12px;
    color: var(--text-muted);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    padding: 40px 20px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    color: var(--accent);
    margin-bottom: 15px;
    text-transform: lowercase;
}

.section-title::before {
    content: '> ';
    opacity: 0.6;
}

.nav-link {
    display: block;
    color: var(--text-muted);
    transition: all 0.2s ease;
    font-size: 14px;
    margin-bottom: 8px;
}

.nav-link:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

.bottom-info {
    border-top: 1px solid var(--border-dark);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
}

/* ================================
   ANIMATIONS
================================ */

.cursor-blink {
    width: 8px;
    height: 15px;
    background: var(--accent);
    display: inline-block;
    margin-left: 5px;
    animation: blink 1s infinite;
    vertical-align: middle;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}