/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a28;
    --border: #1e1e2e;
    --text: #e4e4ed;
    --text-muted: #8888a0;
    --accent-1: #6366f1;
    --accent-2: #8b5cf6;
    --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --radius: 12px;
    --radius-lg: 20px;
    --font: 'Space Grotesk', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== NAV ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 24px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.nav__logo-icon {
    font-size: 1.1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav__links {
    display: flex;
    gap: 32px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav__links a:hover { color: var(--text); }

.nav__menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav__menu span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 100%);
}

.hero__content {
    position: relative;
    text-align: center;
    max-width: 800px;
}

.hero__badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-1);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    animation: pulse-glow 3s ease-in-out infinite;
}

.hero__title {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero__subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero__cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ORBS */
.hero__visual {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 8s ease-in-out infinite;
}

.hero__orb--1 {
    width: 400px;
    height: 400px;
    background: var(--accent-1);
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.hero__orb--2 {
    width: 300px;
    height: 300px;
    background: var(--accent-2);
    top: 30%;
    right: 10%;
    animation-delay: -3s;
}

.hero__orb--3 {
    width: 200px;
    height: 200px;
    background: #06b6d4;
    bottom: 20%;
    left: 40%;
    animation-delay: -5s;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
}

.btn--primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.45);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn--ghost:hover {
    background: var(--bg-card);
    border-color: var(--text-muted);
}

/* ===== SECTION HEADERS ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.link-arrow {
    color: var(--accent-1);
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s;
}

.link-arrow:hover { opacity: 0.8; }

/* ===== FEATURED ===== */
.featured {
    padding: 100px 0;
}

.featured__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card--large {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.card--large .card__img {
    min-height: 300px;
}

.card__img {
    min-height: 180px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px;
}

.card__tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card__body {
    padding: 28px;
}

.card__date {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 12px;
    font-family: var(--mono);
}

.card__title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card__excerpt {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== CATEGORIES ===== */
.categories {
    padding: 60px 0 100px;
}

.categories__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.cat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.cat-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.cat-card:hover::before { opacity: 1; }

.cat-card__icon {
    font-size: 2rem;
    margin-bottom: 16px;
    opacity: 0.8;
}

.cat-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.cat-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.cat-card__count {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--accent-1);
    font-weight: 500;
}

/* ===== NEWSLETTER ===== */
.newsletter {
    padding: 80px 0;
}

.newsletter__inner {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.newsletter__inner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: var(--accent-2);
    filter: blur(150px);
    opacity: 0.1;
    pointer-events: none;
}

.newsletter__content h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.newsletter__content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.newsletter__form {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.newsletter__input {
    padding: 14px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    width: 280px;
    outline: none;
    transition: border-color 0.2s;
}

.newsletter__input:focus {
    border-color: var(--accent-1);
}

.newsletter__input::placeholder {
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 60px 0 40px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer__brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
}

.footer__col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer__col a {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer__col a:hover { color: var(--text); }

.footer__bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.footer__bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: var(--mono);
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
    50% { box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.15); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .featured__grid {
        grid-template-columns: 1fr;
    }

    .card--large {
        grid-template-columns: 1fr;
    }

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

    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .newsletter__inner {
        flex-direction: column;
        text-align: center;
        padding: 40px;
    }

    .newsletter__form {
        flex-direction: column;
        width: 100%;
    }

    .newsletter__input {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .nav__links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
    }

    .nav__links.open {
        display: flex;
    }

    .nav__menu {
        display: flex;
    }

    .hero__title {
        letter-spacing: -1px;
    }

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

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

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
