/* ============================================
   BlueFeverSoft — Personal Site
   Dark theme, mobile-first, vanilla CSS
   ============================================ */

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1322;
    --bg-card: #141832;
    --bg-card-hover: #1a1f40;
    --border: #1e2444;
    --border-hover: #2d3460;
    --accent: #4d9fff;
    --accent-light: #70b3ff;
    --accent-glow: rgba(77, 159, 255, 0.12);
    --text-primary: #e2e4ec;
    --text-secondary: #8b90a7;
    --text-muted: #5a5f78;
    --star: #fbbf24;
    --badge-bestseller: #22c55e;
    --badge-highest: #a855f7;
    --badge-new: #3b82f6;
    --badge-finance: #f59e0b;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
    --transition: 0.3s ease;
    --nav-height: 64px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-light);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border);
}

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

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-bracket {
    color: var(--accent);
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform var(--transition), opacity var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    padding: 5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: right var(--transition);
    border-left: 1px solid var(--border);
}

.nav-links.open {
    right: 0;
}

.nav-links li a {
    display: block;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    transition: color var(--transition);
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--accent);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 50% 50%, var(--accent-glow), transparent),
        radial-gradient(ellipse 800px 600px at 80% 20%, rgba(168, 85, 247, 0.06), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    padding: 6rem 0 4rem;
}

.hero-name {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-author {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.social-icon:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(77, 159, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-align: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.0625rem;
}

/* ============================================
   About
   ============================================ */
.about-grid {
    display: grid;
    gap: 3rem;
    margin-top: 2.5rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.0625rem;
}

.about-text a {
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   Projects
   ============================================ */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2.5rem;
    transition: border-color var(--transition);
}

.project-card:hover {
    border-color: var(--border-hover);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.project-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--accent-glow);
    border-radius: 14px;
    color: var(--accent);
    flex-shrink: 0;
}

.project-name {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.project-subtitle {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.125rem;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 8px;
    background: rgba(77, 159, 255, 0.08);
    color: var(--accent);
    border: 1px solid rgba(77, 159, 255, 0.15);
}

.project-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ============================================
   Courses
   ============================================ */
.courses-grid {
    display: grid;
    gap: 1.25rem;
}

.course-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
}

.course-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    color: inherit;
}

.course-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-bestseller {
    background: rgba(34, 197, 94, 0.12);
    color: var(--badge-bestseller);
}

.badge-highest {
    background: rgba(168, 85, 247, 0.12);
    color: var(--badge-highest);
}

.badge-new {
    background: rgba(59, 130, 246, 0.12);
    color: var(--badge-new);
}

.badge-finance {
    background: rgba(245, 158, 11, 0.12);
    color: var(--badge-finance);
}

.course-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.625rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.course-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.course-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.stars {
    color: var(--star);
    font-size: 0.875rem;
    letter-spacing: 1px;
}

.rating-value {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.course-students {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}

.course-link-text {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    transition: color var(--transition);
}

.course-card:hover .course-link-text {
    color: var(--accent-light);
}

/* ============================================
   YouTube
   ============================================ */
.youtube-content {
    margin-top: 2.5rem;
}

.youtube-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.youtube-icon {
    color: #ff0000;
    margin-bottom: 1rem;
}

.youtube-info h3 {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.youtube-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}

.youtube-series {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.series-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: rgba(77, 159, 255, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(77, 159, 255, 0.1);
}

.series-episodes {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.series-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   Company
   ============================================ */
.company-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    max-width: 700px;
    margin: 2.5rem auto 0;
    transition: border-color var(--transition);
}

.company-card:hover {
    border-color: var(--border-hover);
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

.company-tagline {
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.company-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.0625rem;
}

.company-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.company-stat {
    text-align: center;
}

.company-stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.company-stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-brand .nav-logo {
    display: inline-block;
    margin-bottom: 0.75rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9375rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive — Tablet (768px+)
   ============================================ */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .nav-links {
        position: static;
        width: auto;
        height: auto;
        background: none;
        padding: 0;
        flex-direction: row;
        gap: 0.25rem;
        border: none;
    }

    .nav-links li a {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
        border-radius: 8px;
    }

    .nav-links li a:hover {
        background: var(--accent-glow);
    }

    .about-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .youtube-series {
        flex-direction: row;
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* ============================================
   Responsive — Desktop (1024px+)
   ============================================ */
@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .about-grid {
        grid-template-columns: 1.3fr 1fr;
        gap: 4rem;
    }
}

/* ============================================
   Reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }

    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
