/* ==========================================================================
   CSS Variables & Theme Setup
   ========================================================================== */
:root {
    /* Light Theme (Default) */
    --bg-color: #F8FAFC;
    --bg-alt: #FFFFFF;
    --card-bg: #FFFFFF;
    
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    
    --text-main: #0F172A;
    --text-muted: #64748B;
    
    --border: #E2E8F0;
    
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --radius: 12px;
    --transition: 0.3s ease;
}

/* Dark Theme Overrides */
body.dark-mode {
    --bg-color: #0F172A;
    --bg-alt: #1E293B;
    --card-bg: #1E293B;
    
    --primary: #3B82F6;
    --primary-hover: #60A5FA;
    
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    
    --border: #334155;
    
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition), color var(--transition);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img, svg { max-width: 100%; display: block; }

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.section { padding: 80px 0; }
.bg-alt { background-color: var(--bg-alt); }
.bg-primary { background-color: var(--primary); }
.text-white { color: #FFFFFF; }
.border-bottom { border-bottom: 1px solid var(--border); }
.border-top { border-top: 1px solid var(--border); }
.w-100 { width: 100%; }
.mt-4 { margin-top: 1.5rem; }

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}
.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    margin-bottom: 16px;
}
.difficulty {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}
.difficulty.beginner { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.difficulty.intermediate { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.difficulty.advanced { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.difficulty.expert { background: rgba(15, 23, 42, 0.1); color: var(--text-main); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--transition);
    gap: 8px;
}
.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-outline {
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-lg {
    padding: 14px 32px;
    font-size: 1.125rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(var(--bg-color-rgb), 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}
#header.scrolled {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}
.logo i {
    color: var(--primary);
    font-size: 1.5rem;
}
.nav-list {
    display: flex;
    gap: 32px;
}
.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width var(--transition);
}
.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.theme-toggle {
    font-size: 1.25rem;
    color: var(--text-main);
    padding: 8px;
    border-radius: 50%;
    transition: background var(--transition);
}
.theme-toggle:hover {
    background: var(--border);
}
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
}
.nav-actions-mobile {
    display: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding-top: 120px;
    min-height: 90vh;
    display: flex;
    align-items: center;
}
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}
.hero-title span {
    color: var(--primary);
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 90%;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}
.hero-stats {
    display: flex;
    gap: 32px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}
.stat-item h4 {
    font-size: 1.5rem;
    color: var(--text-main);
}
.stat-item p {
    color: var(--text-muted);
    font-size: 0.875rem;
}
.floating-illustration {
    width: 100%;
    height: auto;
    animation: float 6s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* ==========================================================================
   Tech Ticker
   ========================================================================== */
.tech-title {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}
.ticker-wrapper {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.ticker-track {
    display: inline-block;
    animation: ticker 30s linear infinite;
}
.ticker-track span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 32px;
    transition: color var(--transition);
}
.ticker-track span:hover {
    color: var(--text-main);
}
@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Requires duplicating content in JS or HTML for smooth loop, simplified here */
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.icon-box {
    width: 48px;
    height: 48px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 24px;
}
.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Domains Section
   ========================================================================== */
.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}
.domain-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.domain-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.domain-header i {
    font-size: 2rem;
    color: var(--primary);
}
.domain-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}
.domain-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}
.domain-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   Roadmap (Vertical Timeline)
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
}
.timeline-item:nth-child(even) {
    left: 50%;
}
.timeline-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    right: -20px;
    background-color: var(--primary);
    border: 4px solid var(--bg-alt);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.timeline-item:nth-child(even) .timeline-icon {
    left: -20px;
}
.timeline-content {
    padding: 24px;
    background-color: var(--card-bg);
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.timeline-date {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 8px;
    display: block;
}
.timeline-content h3 {
    margin-bottom: 12px;
}
.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/* ==========================================================================
   Tools Section
   ========================================================================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.fav-icon {
    color: var(--border);
    cursor: pointer;
    transition: color var(--transition);
}
.fav-icon:hover { color: var(--warning); }
.tool-category {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 12px;
}
.tool-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Stats
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    text-align: center;
}
.stat-box h2 {
    font-size: 3rem;
    font-weight: 800;
    display: inline-block;
}
.stat-box span {
    font-size: 2.5rem;
    font-weight: 700;
}
.stat-box p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* ==========================================================================
   Resources (Tabs) & Certifications
   ========================================================================== */
.tabs-header {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.tab-btn {
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.tab-btn.active, .tab-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}
.tab-pane.active {
    display: block;
}
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.resource-card, .cert-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.resource-card:hover {
    border-color: var(--primary);
}
.resource-card h4, .cert-card h4 {
    margin-bottom: 8px;
    font-size: 1.125rem;
}
.resource-card p, .cert-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.cert-card .difficulty {
    margin-bottom: 12px;
    display: inline-block;
}

/* ==========================================================================
   FAQ (Accordion)
   ========================================================================== */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}
.accordion-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
}
.accordion-header {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-main);
    text-align: left;
}
.accordion-header i {
    transition: transform var(--transition);
}
.accordion-header.active i {
    transform: rotate(180deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--card-bg);
}
.accordion-content p {
    padding: 0 24px 24px;
    color: var(--text-muted);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}
.contact-list {
    margin: 24px 0;
}
.contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-muted);
}
.contact-list i {
    color: var(--primary);
    font-size: 1.25rem;
}
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    margin-right: 12px;
    color: var(--text-main);
    transition: all var(--transition);
}
.social-links a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.contact-form {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-main);
    font-family: inherit;
    transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--bg-alt);
    padding: 64px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 48px;
}
.footer-brand p {
    color: var(--text-muted);
    margin-top: 16px;
    font-size: 0.9rem;
}
.footer-links h4 {
    margin-bottom: 20px;
    font-size: 1.125rem;
}
.footer-links ul li {
    margin-bottom: 12px;
}
.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }
.newsletter-form {
    display: flex;
    margin-top: 16px;
}
.newsletter-form input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
    background: var(--bg-color);
    color: var(--text-main);
    outline: none;
}
.newsletter-form .btn {
    border-radius: 0 8px 8px 0;
}
.footer-bottom {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ==========================================================================
   Animations & Components
   ========================================================================== */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    z-index: 9999;
    width: 0%;
    transition: width 0.1s;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.fade-left { transform: translateX(30px); }
.fade-right { transform: translateX(-30px); }
.reveal.fade-left.active, .reveal.fade-right.active { transform: translateX(0); }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    z-index: 99;
    box-shadow: var(--shadow-md);
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}
.back-to-top:hover {
    transform: translateY(-3px);
    background: var(--primary-hover);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-subtitle { margin: 0 auto 32px; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 80px; padding-right: 0; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-icon { left: 11px !important; }
}

@media (max-width: 768px) {
    .nav-list { display: none; }
    .nav-actions { display: none; }
    .mobile-toggle { display: block; }
    
    /* Mobile Menu styles */
    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: var(--bg-alt);
        flex-direction: column;
        padding: 32px 24px;
        transition: 0.4s ease;
        overflow-y: auto;
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-list {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 24px;
        margin-bottom: 32px;
    }
    .nav-actions-mobile {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .hero-title { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}