/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Real-time generation animations */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes drawLine {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(29, 78, 216, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(29, 78, 216, 0.6);
    }
}

:root {
    --accent: #1d4ed8;
    --accent-2: #0ea5e9;
    --ink: #0b1220;
    --text: #0f172a;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --muted: #475569;
    --muted-2: #64748b;
    --bg: #ffffff;
    --bg-2: #f8fafc;
    --bg-secondary: #f1f5f9;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --border: rgba(15, 23, 42, 0.12);
    --primary-color: #1d4ed8;
    --primary-dark: #1e40af;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;

    --shadow-1: 0 1px 2px rgba(2, 6, 23, 0.05), 0 1px 1px rgba(2, 6, 23, 0.03);
    --shadow-2: 0 10px 30px rgba(2, 6, 23, 0.08);
    --shadow-3: 0 18px 60px rgba(2, 6, 23, 0.12);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 1;
    animation: fadeIn 0.6s ease forwards;
    overscroll-behavior: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for specific elements */
p, h1, h2, h3, h4, h5, h6, span, li, a {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Disable text selection on interactive elements */
button, .btn-primary, .btn-secondary, .filter-tab, .hamburger, .nav-link {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Disable pull-to-refresh */
html, body {
    overscroll-behavior-y: contain;
}

/* Page load animation */
.page-loading {
    opacity: 0;
}

.page-loaded {
    animation: fadeIn 0.6s ease forwards;
}

/* Disable context menu styling */
.no-context-menu {
    pointer-events: none;
}

/* Smooth scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-radius: 6px;
    border: 2px solid var(--bg-2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #1e40af, #0284c7);
}

/* Selection styling */
::selection {
    background: rgba(29, 78, 216, 0.2);
    color: var(--text);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: var(--ink);
    color: white;
    text-decoration: none;
    font-weight: 700;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
    z-index: 2000;
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid rgba(29, 78, 216, 0.45);
    outline-offset: 3px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
    opacity: 1;
    transform: translateY(0);
    animation: slideInFromTop 0.6s ease forwards 0.2s;
}

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

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.9;
}

.logo-icon {
    color: var(--accent);
    display: flex;
    align-items: center;
}

.logo-icon svg {
    stroke: var(--accent);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--muted);
    font-weight: 500;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    z-index: 1001;
    border: none;
    background: transparent;
    padding: 0.5rem;
    border-radius: 10px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.78rem 1.2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 10px 26px rgba(29, 78, 216, 0.18);
    position: relative;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
    pointer-events: none;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 40px rgba(29, 78, 216, 0.28);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: white;
    color: var(--text);
    border: 2px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 1;
}

.btn-secondary:hover {
    background: var(--bg-2);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background:
        radial-gradient(900px 400px at 10% 0%, rgba(29, 78, 216, 0.10), transparent 55%),
        radial-gradient(700px 350px at 90% 15%, rgba(14, 165, 233, 0.10), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
    --scroll-offset: 0;
    --scroll-opacity: 1;
    transform: translateY(calc(var(--scroll-offset) * 1px));
    opacity: var(--scroll-opacity);
    will-change: transform, opacity;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-1);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 1;
    animation: slideInFromLeft 0.6s ease forwards 0.4s;
}

.hero-title {
    font-size: 3.15rem;
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 1.5rem;
    color: var(--text);
    letter-spacing: -0.03em;
    opacity: 1;
    animation: slideInFromLeft 0.8s ease forwards 0.6s;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--muted);
    margin-bottom: 2rem;
    line-height: 1.8;
    opacity: 1;
    animation: slideInFromLeft 0.8s ease forwards 0.8s;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    opacity: 1;
    animation: slideInFromLeft 0.8s ease forwards 1s;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    opacity: 1;
    animation: scaleIn 0.8s ease forwards 1.2s;
}

.hero-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.stat {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.35rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--muted-2);
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-visual {
    display: flex;
    justify-content: flex-end;
    opacity: 1;
    animation: slideInFromRight 0.8s ease forwards 0.8s;
}

.visual-card {
    width: min(520px, 100%);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: var(--shadow-3);
    overflow: hidden;
}

.visual-header {
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(241, 245, 249, 0.65);
}

.visual-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.18);
}

.visual-title {
    justify-self: end;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.visual-body {
    padding: 1.1rem;
    display: grid;
    gap: 0.75rem;
}

.visual-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
}

.visual-pill {
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text);
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(29, 78, 216, 0.08);
    border: 1px solid rgba(29, 78, 216, 0.14);
}

.visual-bar {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(29, 78, 216, 0.35), rgba(14, 165, 233, 0.25));
}

.visual-meta {
    color: var(--muted-2);
    font-weight: 600;
    font-size: 0.95rem;
}

.visual-footer {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.1rem 1.1rem;
}

.visual-badge {
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.70);
    color: var(--muted);
    font-weight: 650;
    font-size: 0.9rem;
}

.visual-badge.subtle {
    background: rgba(241, 245, 249, 0.70);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(29, 78, 216, 0.03), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(14, 165, 233, 0.03), transparent 50%),
        var(--bg);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(29, 78, 216, 0.2), transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-header.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text);
    position: relative;
    display: inline-block;
    letter-spacing: -0.03em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, rgba(29, 78, 216, 0.95), rgba(14, 165, 233, 0.85));
    border-radius: 2px;
}

.section-description {
    font-size: 1.25rem;
    color: var(--muted);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(15, 23, 42, 0.10);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(29, 78, 216, 0.15);
    border-color: rgba(29, 78, 216, 0.25);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(29, 78, 216, 0.06);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    transition: transform 0.18s ease, background 0.18s ease;
    position: relative;
}

.feature-card:hover .feature-icon {
    transform: translateY(-1px);
    background: rgba(29, 78, 216, 0.10);
}

.feature-icon svg {
    stroke: var(--accent);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-icon svg {
    stroke: #1e40af;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.feature-description {
    color: var(--muted);
    line-height: 1.6;
}

/* Resources Section */
.resources {
    padding: 80px 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(29, 78, 216, 0.04), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.04), transparent 40%),
        var(--bg-2);
    position: relative;
    overflow: hidden;
}

.resources::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(29, 78, 216, 0.2), transparent);
}

.resources::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(29, 78, 216, 0.2), transparent);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(15, 23, 42, 0.12);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease forwards;
}

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

.filter-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    pointer-events: none;
}

.filter-tab:hover {
    color: var(--accent);
    border-color: rgba(29, 78, 216, 0.30);
    background: rgba(29, 78, 216, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(29, 78, 216, 0.12);
}

.filter-tab.active {
    color: white;
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.25);
}

.filter-tab.active::before {
    transform: scaleX(1);
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 3rem;
    z-index: 1;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease forwards 0.6s;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.10), 0 8px 24px rgba(29, 78, 216, 0.12);
    transform: translateY(-2px);
}

.search-input:hover:not(:focus) {
    border-color: rgba(15, 23, 42, 0.20);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.search-input::placeholder {
    color: var(--text-light);
}

.resources-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 3rem;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.resources-empty h3 {
    color: var(--text-secondary);
    font-size: 1.5rem;
}

.resources-empty p {
    color: var(--text-light);
    margin-top: 1rem;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.search-icon svg {
    stroke: var(--text-light);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.resource-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(15, 23, 42, 0.10);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.resource-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.03), rgba(14, 165, 233, 0.03));
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

.resource-card:hover::after {
    opacity: 1;
}

.resource-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(29, 78, 216, 0.15);
    border-color: rgba(29, 78, 216, 0.30);
}

.resource-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.resource-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.resource-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.08), rgba(14, 165, 233, 0.08));
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(29, 78, 216, 0.15);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}

.resource-description {
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.6;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.resource-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--muted-2);
    position: relative;
    z-index: 1;
}

.resource-card:hover .resource-title {
    color: var(--text);
    transform: none;
}

.resource-category::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(29, 78, 216, 0.5);
}

.resource-card:hover .resource-category {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.15), rgba(14, 165, 233, 0.15));
    transform: scale(1.05);
    border-color: rgba(29, 78, 216, 0.30);
}

.resource-card:hover .resource-description {
    color: var(--text-primary);
}

.resource-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.resource-card:hover .resource-meta span {
    color: var(--accent);
    background: rgba(29, 78, 216, 0.05);
    transform: translateX(2px);
}

.resource-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--accent) 0%, #1e40af 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.resource-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: -1;
    pointer-events: none;
}

.resource-link:hover::before {
    left: 100%;
}

.resource-link::after {
    content: '→';
    font-size: 1.2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.resource-link:hover {
    background: linear-gradient(135deg, #1e40af 0%, var(--accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(29, 78, 216, 0.30);
}

.resource-link:hover::after {
    transform: translateX(4px);
}

.resource-link:active {
    transform: translateY(0);
}

/* About Section */
.about {
    padding: 80px 0;
    background: 
        radial-gradient(circle at 30% 50%, rgba(29, 78, 216, 0.03), transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(14, 165, 233, 0.03), transparent 50%),
        var(--bg);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(29, 78, 216, 0.2), transparent);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-description {
    font-size: 1.125rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-features {
    margin: 2rem 0;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.check-icon {
    color: #10b981;
    flex-shrink: 0;
}

.check-icon svg {
    stroke: #10b981;
    stroke-width: 3;
}

.stats-card {
    background: var(--bg-2);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: none;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.2);
}

.stats-card:hover::before {
    top: -20%;
    right: -20%;
}

.stats-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.10);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
    padding-left: 0.5rem;
    background: rgba(37, 99, 235, 0.03);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-value {
    color: var(--accent);
    font-weight: 700;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background:
        radial-gradient(900px 400px at 0% 0%, rgba(255, 255, 255, 0.18), transparent 55%),
        radial-gradient(900px 450px at 100% 0%, rgba(255, 255, 255, 0.12), transparent 55%),
        linear-gradient(135deg, #0b1220 0%, #0f1b33 40%, #0b1220 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

.cta .btn-primary {
    background: white;
    color: var(--ink);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.cta .btn-primary::before {
    display: none;
}

.cta .btn-primary:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px) scale(1.02);
}

.cta .btn-secondary {
    border-color: white;
    color: white;
    background: transparent;
}

.cta .btn-secondary:hover {
    background: white;
    color: var(--ink);
    border-color: white;
}

/* Footer */
.footer {
    background: var(--ink);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-description {
    color: rgba(226, 232, 240, 0.72);
    line-height: 1.6;
}

.footer-heading {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: rgba(226, 232, 240, 0.72);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-block;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: white;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(226, 232, 240, 0.62);
}

.footer-bottom p {
    margin: 0.5rem 0;
}

/* Scroll to top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.scroll-to-top:hover::before {
    opacity: 1;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0; }
}

.scroll-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(29, 78, 216, 0.45);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(0.95);
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(29, 78, 216, 0.5);
}

/* Ripple effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(29, 78, 216, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Smooth transitions for grid */
.resources-grid {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Enhanced empty state */
.resources-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.resources-empty h3 {
    color: var(--text-secondary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.resources-empty p {
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(15, 23, 42, 0.10);
    min-width: 300px;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success svg {
    stroke: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error svg {
    stroke: #ef4444;
}

.toast-info {
    border-left: 4px solid var(--accent);
}

.toast-info svg {
    stroke: var(--accent);
}

.toast span {
    font-weight: 500;
    color: var(--text);
}

/* Search clear button */
.search-clear {
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.10);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--muted);
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.search-clear:hover {
    background: rgba(15, 23, 42, 0.15);
    color: var(--text);
    transform: translateY(-50%) scale(1.1);
}

.search-clear:active {
    transform: translateY(-50%) scale(0.95);
}

/* Enhanced focus states */
.filter-tab:focus-visible,
.search-input:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 3px solid rgba(29, 78, 216, 0.45);
    outline-offset: 3px;
}

/* Smooth page transitions */
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    animation: slideInFromBottom 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading spinner */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: none;
}

.loading-spinner.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(29, 78, 216, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Backdrop blur for loading */
.loading-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
}

.loading-backdrop.active {
    display: block;
}

/* Improved resource icon animations */
.resource-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(29, 78, 216, 0.06);
    border-radius: 10px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.resource-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.1), rgba(14, 165, 233, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.resource-card:hover .resource-icon::before {
    opacity: 1;
}

.resource-card:hover .resource-icon {
    transform: translateY(-2px) rotate(5deg) scale(1.1);
    background: rgba(29, 78, 216, 0.12);
}

.resource-icon svg {
    stroke: var(--accent);
    width: 24px;
    height: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.resource-card:hover .resource-icon svg {
    stroke: var(--primary-dark);
    filter: drop-shadow(0 2px 4px rgba(29, 78, 216, 0.3));
}

/* Feather Icons Fallback */
.no-feather-icons .resource-icon i[data-feather],
.no-feather-icons .resource-meta i[data-feather] {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: var(--accent);
    border-radius: 4px;
}

.no-feather-icons .resource-meta i[data-feather] {
    width: 16px;
    height: 16px;
}

/* Ensure critical elements are visible even if animations fail */
.btn-primary,
.btn-secondary,
.hero-buttons,
.filter-tab,
.search-container {
    opacity: 1 !important;
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
        padding: 0.75rem;
        -webkit-tap-highlight-color: transparent;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-visual {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .stat {
        text-align: center;
        padding: 0.75rem;
        background: rgba(29, 78, 216, 0.03);
        border-radius: 8px;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-description {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
        -webkit-tap-highlight-color: transparent;
    }

    .feature-icon {
        width: 56px;
        height: 56px;
    }

    .feature-title {
        font-size: 1.25rem;
    }

    .filter-tabs {
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-tab {
        width: 100%;
        padding: 0.875rem 1rem;
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
    }

    .search-container {
        margin-bottom: 2rem;
    }

    .search-input {
        padding: 0.875rem 3rem 0.875rem 0.875rem;
        font-size: 1rem;
        min-height: 48px;
    }

    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .resource-card {
        padding: 1.5rem;
        -webkit-tap-highlight-color: transparent;
    }

    .resource-icon {
        width: 40px;
        height: 40px;
    }

    .resource-title {
        font-size: 1.25rem;
    }

    .resource-meta {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .resource-link {
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-description {
        font-size: 1rem;
    }

    .stats-card {
        padding: 1.5rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-description {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

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

    .scroll-to-top {
        width: 48px;
        height: 48px;
        bottom: 20px;
        right: 20px;
        -webkit-tap-highlight-color: transparent;
    }

    .container {
        padding: 0 16px;
    }

    /* Improve touch targets */
    a, button, .filter-tab, .resource-card {
        -webkit-tap-highlight-color: rgba(29, 78, 216, 0.1);
    }

    /* Prevent text selection on double tap */
    .filter-tab, .btn-primary, .btn-secondary, .hamburger {
        -webkit-user-select: none;
        user-select: none;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 90px 0 50px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    .feature-card,
    .resource-card {
        padding: 1.25rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        min-height: 44px;
    }

    .scroll-to-top {
        width: 44px;
        height: 44px;
    }

    .container {
        padding: 0 12px;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
