@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@600;700;800&display=swap');

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary: #22d3ee;
    --accent: #f43f5e;
    --bg-deep: #020617;
    --bg-card: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-head: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --nav-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-head);
    line-height: 1.1;
    color: #fff;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* --- NAV --- */
header {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: var(--primary);
}

nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s;
}

nav a:hover,
nav a.active {
    color: #fff;
}

.nav-btn {
    background: var(--primary);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 600;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.nav-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.4);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

/* --- SEARCH BAR --- */
.search-container {
    max-width: 600px;
    margin: 40px auto 0;
    position: relative;
    display: flex;
    gap: 12px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 16px 24px 16px 48px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
    backdrop-filter: blur(10px);
}

.search-field:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.search-btn-hero {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 0 32px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn-hero:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.4);
}

/* --- HERO --- */
.hero {
    position: relative;
    padding-top: calc(var(--nav-height) + 100px);
    padding-bottom: 120px;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    z-index: -1;
    filter: blur(100px);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    margin-bottom: 24px;
    background: linear-gradient(to bottom right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 12px 28px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* --- STATS --- */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 80px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: rgba(14, 165, 233, 0.3);
}

.stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

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

/* --- ARTICLES --- */
.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-12px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.card-img-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.article-card:hover .card-img {
    transform: scale(1.1);
}

.card-content {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    margin-bottom: 12px;
    display: block;
    line-height: 1.2;
}

.card-title:hover {
    color: var(--primary);
}

.card-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link {
    margin-top: auto;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.card-link:hover {
    gap: 12px;
}

/* --- FOOTER --- */
footer {
    padding: 100px 0 50px;
    background: #010409;
    border-top: 1px solid var(--glass-border);
    margin-top: 120px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 64px;
    margin-bottom: 64px;
}

.footer-brand p {
    margin-top: 24px;
    max-width: 300px;
}

.footer-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 24px;
    font-size: 1.1rem;
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

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

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.reveal {
    animation: fadeInUp 0.8s ease forwards;
}

/* --- MOBILE --- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-deep);
        padding: 80px 40px;
        transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 999;
        gap: 24px;
        text-align: center;
    }

    nav.active {
        right: 0;
    }

    nav a {
        font-size: 1.75rem;
        font-weight: 700;
        color: #fff;
    }

    nav .nav-btn {
        width: 100%;
        margin-top: 20px;
        font-size: 1.25rem;
        padding: 16px;
    }

    .search-container {
        flex-direction: column;
        padding: 0 20px;
    }

    .search-btn-hero {
        padding: 16px;
        justify-content: center;
    }

    .hero {
        padding-top: calc(var(--nav-height) + 60px);
    }

    .hero-actions {
        flex-direction: column;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* --- PAGE STYLES --- */
.page-header {
    padding: calc(var(--nav-height) + 80px) 0 60px;
    background: linear-gradient(to bottom, rgba(14, 165, 233, 0.05), transparent);
    text-align: center;
}

.std-container {
    padding-bottom: 100px;
}

.std-article {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 60px;
    border-radius: 32px;
}

.std-article h2 {
    margin-top: 48px;
}

.std-article p {
    font-size: 1.125rem;
}

/* Clean Blog List */
.blog-header {
    padding-top: calc(var(--nav-height) + 60px);
}

.blog-grid-system {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    margin-top: 60px;
}

/* Form Styles */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 48px;
    border-radius: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #fff;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 18px;
    color: #fff;
    font-family: inherit;
    transition: 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.05);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}