body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    font-family: 'JetBrains Mono', monospace;
    background: #0a0a0f;
    color: #e0e0e0;
    scroll-behavior: smooth;
}

#stars {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    transform: translateZ(0);
}

.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(10,10,15,0.8), rgba(20,20,40,0.7));
    z-index: -1;
}

.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.glass:hover {
    transform: translateY(-5px);
    box-shadow:
        0 0 20px rgba(59, 130, 246, 0.7),
        0 0 40px rgba(96, 165, 250, 0.4);
}

.glass-optimal {
    position: relative;
}

.glass-optimal::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200%;
    animation: glow 4s linear infinite;
    z-index: -1;
    filter: blur(8px);
}

@keyframes glow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    color: #e0e7ff;
    border-radius: 9999px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow:
        0 4px 8px rgba(37, 99, 235, 0.6),
        0 0 10px #3b82f6,
        inset 0 -2px 8px #4338ca;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover, .btn:focus {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow:
        0 6px 15px rgba(59, 130, 246, 0.9),
        0 0 20px #a78bfa,
        inset 0 -3px 12px #7c3aed;
    transform: translateY(-3px);
    outline: none;
}

.btn:active {
    transform: translateY(-1px);
    box-shadow:
        0 3px 8px rgba(37, 99, 235, 0.7),
        inset 0 -1px 6px #4338ca;
}

.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    animation: ripple-effect 0.6s linear;
    pointer-events: none;
    transform: scale(0);
}

@keyframes ripple-effect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
.delay-5 { animation-delay: 1.0s; }
.delay-6 { animation-delay: 1.2s; }

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.accent {
    filter: drop-shadow(0 0 8px rgba(59,130,246,0.6));
    transition: transform 0.3s ease;
    color: #60a5fa;
}

.accent:hover {
    transform: scale(1.1);
}

h1, h2, h3 {
    letter-spacing: 0.5px;
    line-height: 1.2;
}

nav a, nav button {
    color: #e0e0e0;
    transition: color 0.3s ease, transform 0.3s ease;
}

nav a:hover, nav button:hover {
    color: #60a5fa;
    transform: translateY(-2px);
}

aside nav a {
    transition: background 0.3s ease, color 0.3s ease;
}

aside nav a:hover {
    background: rgba(59, 130, 246, 0.2);
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    h2 {
        font-size: 2.5rem;
    }
    .btn {
        padding: 0.6rem 1.5rem;
    }
    aside {
        width: 100%;
        height: auto;
        bottom: auto;
        top: 64px;
        z-index: 10;
    }
    main {
        margin-left: 0;
        padding-top: 120px;
    }
}