/* =====================================================
   public.css — "Neon Architect" Design System
   Logical Leap — Engineered for Precision
   ===================================================== */

/* ── 1. Design Tokens ── */
:root {
    /* Surface hierarchy (deep-code aesthetic) */
    --color-bg-dark:       #0c0e12;
    --color-bg-card:       #171a1f;
    --color-surface-high:  #1d2025;
    --color-surface-bright:#292c33;
    --color-border:        rgba(116,117,122,0.15);
    --color-border-solid:  #2a2d33;

    /* Text */
    --color-text:          #f6f6fc;
    --color-text-muted:    #aaabb0;

    /* Accent */
    --color-primary:       #3fff8b;
    --color-primary-dim:   #24f07e;
    --color-primary-container: #13ea79;
    --color-secondary:     #74fbbb;
    --color-tertiary:      #7ae6ff;

    /* Functional */
    --color-error:         #ff716c;

    /* Shared */
    --border-radius:       8px;
    --font-headline:       'Space Grotesk', sans-serif;
    --font-body:           'Inter', sans-serif;
}

/* ── 2. Global base ── */
*,*::before,*::after { box-sizing: border-box; }

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text);
    font-family: var(--font-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: var(--color-primary);
    color: var(--color-bg-dark);
}

/* ── 3. Animated dot-grid background ── */
.dot-grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(63,255,139,0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    animation: dotPulse 8s ease-in-out infinite alternate;
}
@keyframes dotPulse {
    0%   { opacity: 0.35; }
    50%  { opacity: 0.55; }
    100% { opacity: 0.35; }
}

/* Ambient glow orbs (placed via ::before/::after on sections) */
.ambient-glow {
    position: relative;
    overflow: hidden;
}
.ambient-glow::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -15%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(63,255,139,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.ambient-glow::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -15%;
    width: 45%;
    height: 55%;
    background: radial-gradient(circle, rgba(122,230,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ── 4. Typography (headline utility) ── */
.font-headline { font-family: var(--font-headline); }

/* ── 5. Glassmorphism + surface components ── */
.glass-panel {
    background: rgba(23,26,31,0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
}
.glass-nav {
    background: rgba(12,14,18,0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.ghost-border {
    border: 1px solid var(--color-border);
}
.neon-glow {
    box-shadow: 0 0 40px rgba(63,255,139,0.06);
}

/* ── 6. Page load animation ── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.animate-page-load {
    animation: fadeIn 0.6s ease-out forwards;
}

/* ── 7. Card animate-in (home course cards) ── */
.card-animate-in {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}
.card-animate-in.card-upcoming {
    animation: fadeInDim 0.5s ease-out forwards;
}
@keyframes fadeInDim {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 0.55; transform: translateY(0); }
}

/* ── 8. Neon hover links ── */
.neon-hover-link {
    transition: color 0.3s, text-shadow 0.3s, transform 0.3s;
    position: relative;
    color: var(--color-text-muted);
}
.neon-hover-link:hover,
.neon-hover-link.active {
    color: var(--color-primary);
    text-shadow: 0 0 8px rgba(63,255,139,0.4);
}
/* Active dot indicator beneath link */
.neon-hover-link.active::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
    margin: 6px auto 0;
    box-shadow: 0 0 6px rgba(63,255,139,0.6);
}

/* ── 9. Buttons ── */
.btn-primary-cta {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-container));
    color: var(--color-bg-dark);
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(63,255,139,0.25);
}
.btn-primary-cta:hover {
    box-shadow: 0 0 30px rgba(63,255,139,0.5), 0 8px 24px rgba(0,0,0,0.4);
    transform: translateY(-2px);
}
.btn-ghost {
    background: transparent;
    border: 1px solid rgba(63,255,139,0.2);
    color: var(--color-primary);
    font-weight: 700;
    transition: all 0.3s ease;
}
.btn-ghost:hover {
    background: rgba(63,255,139,0.05);
    border-color: rgba(63,255,139,0.4);
}

/* ── 10. Dropdown menu ── */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
}
.dropdown-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── 11. Utility classes ── */
.text-primary  { color: var(--color-primary); }
.text-secondary{ color: var(--color-secondary); }
.text-tertiary { color: var(--color-tertiary); }
.bg-card       { background-color: var(--color-bg-card); }

/* ── 12. Card Premium (home course cards, about) ── */
.course-card-premium {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: transform 0.45s cubic-bezier(0.175,0.885,0.32,1.275),
                box-shadow 0.45s ease, border-color 0.45s ease;
}
.course-card-premium:hover {
    transform: translateY(-10px) scale(1.015);
    box-shadow: 0 24px 48px rgba(0,0,0,0.45), 0 0 40px rgba(63,255,139,0.1);
    border-color: rgba(63,255,139,0.35);
}
.course-card-upcoming:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-color: var(--color-border);
}

.team-card-premium {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275),
                box-shadow 0.4s ease, border-color 0.4s ease;
}
.team-card-premium:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 20px rgba(63,255,139,0.1);
    border-color: rgba(63,255,139,0.3);
}

/* ── 13. Course detail hero ── */
@keyframes subtle-pan {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.hero-background {
    background:
        radial-gradient(ellipse at 20% 80%, rgba(63,255,139,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(122,230,255,0.05) 0%, transparent 50%),
        var(--color-bg-dark);
    background-size: 200% 200%;
    animation: subtle-pan 20s ease-in-out infinite;
}

/* ── 14. Tech glow cards ── */
.tech-glow {
    transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.tech-glow:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 24px rgba(63,255,139,0.15);
    transform: translateY(-3px);
}

/* ── 15. CTA intense (course detail buy button) ── */
.btn-cta-intense {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-container));
    color: var(--color-bg-dark);
    font-weight: 800;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(63,255,139,0.35);
}
.btn-cta-intense:hover {
    box-shadow: 0 8px 40px rgba(63,255,139,0.5), 0 0 60px rgba(63,255,139,0.15);
    transform: scale(1.02);
}

/* ── 16. Neon link hover (generic) ── */
.neon-link-hover {
    transition: color 0.3s, text-shadow 0.3s;
}
.neon-link-hover:hover {
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(63,255,139,0.4);
}

/* ── 17. Section entry animations ── */
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-in {
    opacity: 0;
    animation: fadeInSlide 0.6s ease-out forwards;
}
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-600 { animation-delay: 0.6s; }
.delay-900 { animation-delay: 0.9s; }

/* Scroll-reveal (activated via IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── 18. Auth page animations (login/register) ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp {
    animation: fadeInUp 0.5s ease-out forwards;
}
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-slideInUp {
    animation: slideInUp 0.6s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
}

/* ── 19. Bento grid ── */
.bento-grid {
    display: grid;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .bento-grid .bento-wide  { grid-column: span 2; }
}
.bento-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 2rem;
    transition: border-color 0.4s, box-shadow 0.4s;
}
.bento-card:hover {
    border-color: rgba(63,255,139,0.25);
    box-shadow: 0 0 30px rgba(63,255,139,0.06);
}

/* ── 20. Timeline (course syllabus roadmap) ── */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(63,255,139,0.3), rgba(63,255,139,0.05));
}
.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}
.timeline-dot {
    position: absolute;
    left: -2.15rem;
    top: 0.35rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-bg-dark);
    border: 2px solid var(--color-primary);
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 1;
}
.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(63,255,139,0.4);
}
.timeline-card {
    background: var(--color-surface-high);
    border-left: 3px solid var(--color-primary);
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    transition: background 0.3s, border-color 0.3s;
}
.timeline-item:hover .timeline-card {
    background: var(--color-surface-bright);
}

/* ── 21. Testimonial cards ── */
.testim-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 2rem 2.5rem;
    text-align: center;
}
.testim-quote-icon {
    color: var(--color-primary);
    font-size: 1.5rem;
    opacity: 0.4;
    margin-bottom: 1rem;
    display: block;
}

/* ── 22. Code terminal decorative ── */
.code-terminal {
    background: rgba(23,26,31,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    overflow: hidden;
}
.code-terminal-bar {
    display: flex;
    gap: 6px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.code-terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.code-terminal-dot.red    { background: #ff716c; }
.code-terminal-dot.yellow { background: #7ae6ff; }
.code-terminal-dot.green  { background: #3fff8b; }
.code-terminal-body {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

/* ── 23. Custom scrollbar ── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg-dark); }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 10px; }

/* ── 24. Responsive ── */
@media (max-width: 640px) {
    .btn-cta-intense {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    #modal-content {
        margin-top: 24px !important;
        margin-bottom: 16px !important;
    }
}

/* ── 25. Course cards track (flex + carousel) ── */
.courses-track {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}
.courses-track .course-card-home {
    width: 100%;
    max-width: 26rem;
    padding: 2rem;
    border-radius: 1.25rem;
    display: flex;
    flex-direction: column;
    min-height: 22rem;
}
.courses-track .course-card-home .text-lg {
    font-size: 1.25rem;
    line-height: 1.3;
}
.courses-track .course-card-home .text-sm {
    font-size: 0.9rem;
    line-height: 1.65;
}
.courses-track .course-card-home .w-12.h-12 {
    width: 3.5rem;
    height: 3.5rem;
}
.courses-track .course-card-home .text-2xl {
    font-size: 1.75rem;
}
@media (min-width: 640px) {
    .courses-track .course-card-home {
        width: calc(50% - 1rem);
        max-width: none;
    }
}
@media (min-width: 1024px) {
    .courses-track .course-card-home {
        width: calc(33.333% - 1.5rem);
        min-height: 24rem;
    }
    .courses-track.carousel-active {
        flex-wrap: nowrap;
        justify-content: flex-start;
        transition: transform 0.5s ease-in-out;
        will-change: transform;
    }
    .courses-track.carousel-active .course-card-home {
        flex-shrink: 0;
    }
}
@media (min-width: 1280px) {
    .courses-track .course-card-home {
        width: calc(25% - 1.5rem);
    }
}

/* ── 26. Footer ── */
.ll-footer {
    background: linear-gradient(to top, var(--color-bg-dark), #000000);
    border-top: 1px solid rgba(246,246,252,0.05);
}
.ll-footer a {
    color: rgba(246,246,252,0.4);
    transition: color 0.3s;
}
.ll-footer a:hover {
    color: var(--color-primary);
}

/* ── 27. Floating geometric shapes ── */
.geo-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.geo-shape {
    position: absolute;
    opacity: 0;
    animation: geoFloat 22s ease-in-out infinite;
    will-change: transform, opacity;
}
/* Triangle */
.geo-tri {
    width: 0; height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-bottom: 32px solid rgba(63,255,139,0.04);
}
/* Circle */
.geo-circle {
    width: 22px; height: 22px;
    border: 1.5px solid rgba(122,230,255,0.05);
    border-radius: 50%;
}
/* Diamond */
.geo-diamond {
    width: 20px; height: 20px;
    border: 1.5px solid rgba(63,255,139,0.04);
    transform: rotate(45deg);
}
/* Hexagon (CSS clip-path) */
.geo-hex {
    width: 28px; height: 28px;
    background: rgba(116,251,187,0.035);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
/* Ring */
.geo-ring {
    width: 34px; height: 34px;
    border: 1.5px solid rgba(63,255,139,0.03);
    border-radius: 50%;
}
/* Cross / Plus */
.geo-cross {
    width: 18px; height: 18px;
    position: absolute;
}
.geo-cross::before, .geo-cross::after {
    content: '';
    position: absolute;
    background: rgba(122,230,255,0.04);
}
.geo-cross::before {
    width: 2px; height: 100%;
    left: 50%; transform: translateX(-50%);
}
.geo-cross::after {
    width: 100%; height: 2px;
    top: 50%; transform: translateY(-50%);
}

/* Float animation family */
@keyframes geoFloat {
    0%   { opacity: 0;    transform: translateY(40px) rotate(0deg); }
    15%  { opacity: 1; }
    50%  { opacity: 1;    transform: translateY(-30px) rotate(90deg); }
    85%  { opacity: 1; }
    100% { opacity: 0;    transform: translateY(40px) rotate(180deg); }
}
@keyframes geoDrift {
    0%   { opacity: 0;    transform: translate(0, 20px) rotate(0deg); }
    20%  { opacity: 1; }
    50%  { transform: translate(15px, -25px) rotate(60deg); }
    80%  { opacity: 1; }
    100% { opacity: 0;    transform: translate(-10px, 20px) rotate(120deg); }
}
@keyframes geoOrbit {
    0%   { opacity: 0;    transform: translate(0, 0) scale(0.8); }
    25%  { opacity: 1;    transform: translate(12px, -18px) scale(1); }
    50%  { opacity: 0.8;  transform: translate(0, -30px) scale(1.1); }
    75%  { opacity: 1;    transform: translate(-12px, -18px) scale(1); }
    100% { opacity: 0;    transform: translate(0, 0) scale(0.8); }
}
/* Variation classes */
.geo-anim-drift  { animation-name: geoDrift; }
.geo-anim-orbit  { animation-name: geoOrbit; }

/* ── 28. Section divider ── */
.section-divider {
    position: relative;
    height: 1px;
    max-width: 80%;
    margin: 0 auto;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(63,255,139,0.12) 30%,
        rgba(63,255,139,0.18) 50%,
        rgba(63,255,139,0.12) 70%,
        transparent 100%
    );
}
.section-divider::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0.25;
    box-shadow: 0 0 12px rgba(63,255,139,0.3);
}
/* Tertiary variant */
.section-divider-tertiary {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(122,230,255,0.10) 30%,
        rgba(122,230,255,0.16) 50%,
        rgba(122,230,255,0.10) 70%,
        transparent 100%
    );
}
.section-divider-tertiary::after {
    background: var(--color-tertiary);
    box-shadow: 0 0 12px rgba(122,230,255,0.3);
}
/* Soft glow separator (no line, just gradient fog) */
.section-glow {
    position: relative;
    height: 80px;
    pointer-events: none;
}
.section-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(63,255,139,0.03) 0%, transparent 70%);
}

/* ── 29. Stat card hover ── */
.stat-cell {
    transition: transform 0.3s ease;
}
.stat-cell:hover {
    transform: translateY(-2px);
}
.stat-cell:hover .stat-value {
    text-shadow: 0 0 20px rgba(63,255,139,0.4);
}

@media (prefers-reduced-motion: reduce) {
    .geo-shape,
    .dot-grid-bg { animation: none !important; opacity: 0.3; }
}
