@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Cyber Education */
    --primary: #6366f1;
    /* Indigo 500 */
    --primary-dark: #4338ca;
    /* Indigo 700 */
    --primary-light: #a5b4fc;
    /* Indigo 200 */

    --secondary: #06b6d4;
    /* Cyan 500 */
    --secondary-dark: #0e7490;
    /* Cyan 700 */

    --accent: #f43f5e;
    /* Rose 500 */
    --success: #10b981;
    /* Emerald 500 */
    --warning: #f59e0b;
    /* Amber 500 */

    --bg-dark: #0f172a;
    /* Slate 900 */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Slate 800 with opacity */
    --bg-glass: rgba(255, 255, 255, 0.05);

    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;

    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 20%);
    background-attachment: fixed;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3rem;
    background: linear-gradient(to right, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2.25rem;
    color: var(--text-main);
}

h3 {
    font-size: 1.5rem;
    color: var(--secondary);
}

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

strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

/* Nav */
.navbar {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
}

.brand i {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-light);
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s, box-shadow 0.3s;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    font-family: var(--font-heading);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(6, 182, 212, 0.1);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

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

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

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Interactive Elements */
input[type="checkbox"] {
    accent-color: var(--secondary);
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

input[type="text"],
select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Logic Gate specific additions */
.gate-svg {
    stroke: var(--text-main);
    stroke-width: 2;
    fill: none;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.gate-card {
    text-align: center;
    border-top: 4px solid var(--primary);
}

.output-high {
    color: var(--success);
    text-shadow: 0 0 10px var(--success);
}

.output-low {
    color: var(--text-muted);
}

/* Footer */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 0;
    margin-top: 4rem;
    background: rgba(15, 17, 26, 0.5);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.site-footer {
    font-family: 'Space Grotesk', sans-serif;
    /* Matching font-heading */
    padding: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 400;
    letter-spacing: 1px;
    background-color: var(--bg-card);
    /* Matching theme */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    z-index: 20;
    width: 100%;
}