/* ===== Visuals - Shared Styles ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-from: #0d1b2a;
    --bg-to: #1a2744;
    --accent-orange: #f97316;
    --accent-orange-light: #fb923c;
    --accent-blue: #60a5fa;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-hover-bg: rgba(255, 255, 255, 0.09);
    --text-primary: #f1f5f9;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-card: #e2e8f0;
    --text-card-muted: rgba(255, 255, 255, 0.55);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-from) 0%, var(--bg-to) 60%, #0d1520 100%);
    min-height: 100vh;
    color: var(--text-primary);
}

/* ===== Binary rain canvas ===== */
#binaryCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ===== Nav / Header ===== */
header {
    background: rgba(10, 18, 40, 0.88);
    backdrop-filter: blur(12px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    font-size: 1.6rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.nav-links li { list-style: none; }

.nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.6rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.74);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.nav-links a:hover {
    color: #ffffff;
    background: rgba(249, 115, 22, 0.14);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.15);
}

.nav-links a[href="#subjects"] {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(251, 146, 60, 0.14));
    border: 1px solid rgba(249, 115, 22, 0.28);
}

.nav-links a[href="#subjects"]:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.3), rgba(251, 146, 60, 0.2));
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.18);
}

.nav-links a[target="_blank"] {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

/* ===== Hero ===== */
.hero {
    padding-top: 120px;
    padding-bottom: 60px;
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-orange-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* ===== Container / Sections ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 1;
}

.section-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 2.5rem 0 1.2rem;
    padding-left: 1rem;
    border-left: 4px solid var(--accent-orange);
}

/* ===== Cards ===== */
.subjects, .topics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-card);
    display: block;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    animation: fadeInUp 0.8s ease both;
    backdrop-filter: blur(6px);
}

.card:hover {
    transform: translateY(-6px);
    background: var(--card-hover-bg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    border-color: rgba(249, 115, 22, 0.35);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card p { color: var(--text-card-muted); line-height: 1.6; font-size: 0.95rem; }

.card .coming-soon {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.45);
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(255,255,255,0.12);
}

/* ===== Floating circles (background decoration) ===== */
.visual-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.06);
    animation: float 6s ease-in-out infinite;
    border: 1px solid rgba(249, 115, 22, 0.08);
}

.circle:nth-child(1) { width: 80px; height: 80px; top: 20%; left: 10%; animation-delay: 0s; }
.circle:nth-child(2) { width: 120px; height: 120px; top: 60%; left: 80%; animation-delay: 1s; }
.circle:nth-child(3) { width: 60px; height: 60px; top: 80%; left: 30%; animation-delay: 2s; }
.circle:nth-child(4) { width: 100px; height: 100px; top: 30%; left: 70%; animation-delay: 3s; }

/* ===== Footer ===== */
footer {
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    position: relative;
    z-index: 1;
}

footer a { color: rgba(255, 255, 255, 0.75); }
footer a:hover { color: var(--accent-orange-light); }

/* ===== Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .nav-links { display: none; }
    .subjects, .topics { grid-template-columns: 1fr; }
}
