/* ===========================================
   SKILLBREED EDUCATION — BUILD SKILLS THAT MATTER
   Netflix-style grid with Julie modal gateway
   =========================================== */

:root {
    --electric-blue: #0EA5E9;
    --sky-blue: #38BDF8;
    --cyber-purple: #A855F7;
    --violet: #8B5CF6;
    --neon-pink: #EC4899;
    --rose: #F43F5E;
    --dark-void: #0F172A;
    --dark-slate: #1E293B;
    --slate: #334155;
    --light: #F8FAFC;
    --text: #E2E8F0;
    --text-dim: #94A3B8;
    --font-display: 'Sora', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--dark-void);
    color: var(--text);
    overflow-x: hidden;
}

/* ===========================================
   NAVIGATION
   =========================================== */

.edu-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0 24px;
}

.edu-nav-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.edu-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
}

.edu-nav-brand img {
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(168, 85, 247, 0.15));
    padding: 3px;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.2);
}

.edu-badge {
    background: linear-gradient(135deg, var(--cyber-purple), var(--neon-pink));
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.edu-nav-back {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.edu-nav-back:hover {
    color: white;
}

/* ===========================================
   HERO
   =========================================== */

.edu-hero {
    position: relative;
    padding: 140px 24px 80px;
    text-align: center;
    overflow: hidden;
}

.edu-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(168, 85, 247, 0.15), transparent),
        radial-gradient(ellipse 80% 40% at 30% 100%, rgba(14, 165, 233, 0.1), transparent),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(236, 72, 153, 0.08), transparent);
    pointer-events: none;
}

.edu-hero-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

.edu-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.25);
    color: var(--cyber-purple);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 24px;
}

.edu-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: white;
}

.gradient-text {
    background: linear-gradient(135deg, var(--electric-blue), var(--cyber-purple), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.edu-hero-sub {
    font-size: 18px;
    color: var(--text-dim);
    line-height: 1.6;
    max-width: 540px;
    margin: 0 auto;
}

/* ===========================================
   CONTAINER & SECTION HEADER
   =========================================== */

.edu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.edu-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.edu-section-header h2 {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.edu-section-header p {
    color: var(--text-dim);
    font-size: 16px;
}

/* ===========================================
   TOPIC SELECTOR
   =========================================== */

.edu-topics {
    padding: 40px 0 100px;
}

.topic-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.topic-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.topic-tab:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.topic-tab.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(168, 85, 247, 0.15));
    border-color: var(--electric-blue);
    color: white;
}

.topic-tab.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.topic-tab.disabled:hover {
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
}

/* ===========================================
   TOOLS GRID — Netflix-style tiles
   =========================================== */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.tools-grid.locked {
    pointer-events: none;
    filter: blur(6px);
    user-select: none;
}

/* Featured tiles span 2 columns */
.tool-tile.featured {
    grid-column: span 2;
}

.tool-tile {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--dark-slate);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.tool-tile:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(14, 165, 233, 0.1);
}

.tile-image {
    position: relative;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.featured .tile-image {
    height: 220px;
}

.tile-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.6);
    z-index: 1;
    transition: transform 0.3s;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.tool-tile:hover .tile-icon {
    transform: scale(1.15);
    color: rgba(255, 255, 255, 0.85);
}

/* Fallback background color for tiles (Pexels images set via inline style) */
.tile-image {
    background-color: var(--dark-slate);
}

.tile-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--dark-slate) 0%, rgba(30, 41, 59, 0.2) 40%, rgba(15, 23, 42, 0.1) 100%);
}

.tile-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tile-provider {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.tile-info h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.featured .tile-info h3 {
    font-size: 24px;
}

.tile-info p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dim);
    margin-bottom: 12px;
    flex: 1;
}

.tile-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 500;
}

/* Play button overlay */
.tile-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    backdrop-filter: blur(8px);
}

.tool-tile:hover .tile-play {
    transform: translate(-50%, -50%) scale(1);
}

/* ===========================================
   JULIE FULLSCREEN CHAT EXPERIENCE
   =========================================== */

.julie-chat-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.julie-chat-overlay.active {
    opacity: 1;
    visibility: visible;
}

.julie-chat-overlay.exiting {
    opacity: 0;
    transition: opacity 0.6s ease;
}

/* Chat conversation area — centered vertically, left-aligned messages */
.julie-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 24px 120px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    gap: 16px;
    overflow-y: auto;
}

/* Individual message row (avatar + bubble) */
.julie-msg-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    opacity: 0;
    transform: translateY(12px) scale(0.92);
    animation: chatMsgIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.julie-msg-row.user-row {
    flex-direction: row-reverse;
}

@keyframes chatMsgIn {
    0% { opacity: 0; transform: translateY(12px) scale(0.92); }
    60% { opacity: 1; transform: translateY(-2px) scale(1.01); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Julie avatar in chat */
.julie-chat-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    border: 2px solid var(--electric-blue);
    object-fit: cover;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
}

/* Chat bubble */
.julie-chat-bubble {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px 18px 18px 4px;
    padding: 16px 20px;
    max-width: 440px;
    position: relative;
}

.julie-chat-bubble p {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
}

.julie-chat-bubble p + p {
    margin-top: 10px;
}

/* Typing cursor blink */
.julie-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 18px;
    background: var(--electric-blue);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBlink 0.6s infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* User message bubble */
.user-row .julie-chat-bubble {
    background: linear-gradient(135deg, var(--electric-blue), var(--cyber-purple));
    border: none;
    border-radius: 18px 18px 4px 18px;
}

.user-row .julie-chat-bubble p {
    color: white;
}

/* User avatar placeholder */
.julie-user-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--electric-blue), var(--cyber-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: white;
}

/* Julie name label */
.julie-chat-name {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--electric-blue);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.julie-chat-name .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22C55E;
    display: inline-block;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Center action button (Let's Go, Start Exploring) */
.julie-center-action {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 40px 24px;
    z-index: 10001;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFade 0.5s ease forwards;
}

@keyframes slideUpFade {
    to { opacity: 1; transform: translateY(0); }
}

.julie-action-btn {
    padding: 18px 48px;
    background: linear-gradient(135deg, var(--electric-blue), var(--cyber-purple));
    color: white;
    border: none;
    border-radius: 60px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    box-shadow:
        0 8px 32px rgba(14, 165, 233, 0.35),
        0 0 60px rgba(14, 165, 233, 0.1);
}

.julie-action-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 12px 40px rgba(14, 165, 233, 0.45),
        0 0 80px rgba(14, 165, 233, 0.15);
}

/* Bottom input bar (slides up from bottom) */
.julie-input-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 60%, transparent);
    z-index: 10001;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.julie-input-bar.visible {
    opacity: 1;
    transform: translateY(0);
}

.julie-input-wrapper {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

.julie-input-wrapper input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px 20px;
    color: white;
    font-family: var(--font-body);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.julie-input-wrapper input:focus {
    border-color: var(--electric-blue);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.15);
}

.julie-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.julie-send-btn {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--electric-blue), var(--cyber-purple));
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.julie-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.4);
}

.julie-input-hint {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 8px;
}

/* Typing indicator dots */
.julie-typing-dots {
    display: flex;
    gap: 5px;
    padding: 4px 0;
}

.julie-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    animation: typingBounce 1.2s infinite;
}

.julie-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.julie-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

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

.edu-footer {
    padding: 40px 0;
    background: var(--dark-slate);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.edu-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.edu-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
}

.edu-footer-brand img {
    border-radius: 8px;
}

.edu-footer p {
    color: var(--text-dim);
    font-size: 13px;
}

.edu-footer-back {
    color: var(--electric-blue);
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s;
}

.edu-footer-back:hover {
    opacity: 0.8;
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 768px) {
    .tool-tile.featured {
        grid-column: span 1;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .edu-hero h1 {
        font-size: 36px;
    }

    .edu-hero-sub {
        font-size: 16px;
    }

    .julie-chat-area {
        padding: 24px 16px 100px;
    }

    .julie-chat-avatar,
    .julie-user-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .julie-chat-bubble p {
        font-size: 15px;
    }

    .julie-action-btn {
        padding: 16px 40px;
        font-size: 16px;
    }

    .edu-footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .edu-nav-wrapper {
        height: 56px;
    }

    .edu-nav-brand span:not(.edu-badge) {
        display: none;
    }

    .edu-hero {
        padding: 120px 16px 60px;
    }

    .tile-info h3 {
        font-size: 17px;
    }

    .tile-info p {
        font-size: 13px;
    }
}
