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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #f59e0b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --hero-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
    --card-hover: translateY(-10px);
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #3b82f6;
        --primary-dark: #60a5fa;
        --secondary: #fbbf24;
        --bg-light: #0f172a;
        --bg-white: #1e293b;
        --text-main: #f8fafc;
        --text-muted: #94a3b8;
        --border: #334155;
        --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
        --glass-bg: rgba(15, 23, 42, 0.7);
        --glass-border: rgba(51, 65, 85, 0.5);
        --hero-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    }
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.7;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Navbar with Glassmorphism */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.25rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.navbar-brand i {
    color: var(--primary);
    font-size: 1.5rem;
}

.navbar-nav {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.navbar-nav a {
    color: var(--text-main);
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.25rem;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.navbar-nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    padding: 6rem 5%;
    align-items: center;
    background: var(--hero-gradient);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.hero-content h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    background: linear-gradient(to right, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-form {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
}

.hero-form h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    background-color: var(--bg-white);
    color: var(--text-main);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.15rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: #fff;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #d97706 100%);
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.39);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Stats Badges */
.stats-badges {
    display: flex;
    gap: 1rem;
}

.stats-badges .badge {
    background: var(--bg-white);
    border: 1px solid var(--border);
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Container & Grid */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 5%;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: var(--card-hover);
    box-shadow: var(--card-shadow);
}

.card-img-wrapper {
    overflow: hidden;
}

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

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

.card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.badge {
    align-self: flex-start;
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

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

/* Layout for articles & sidebar */
.page-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 4rem;
}

.sidebar {
    position: sticky;
    top: 7rem;
    align-self: start;
}

.widget {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.widget h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.75rem;
}

/* Post Reader */
.post-header {
    margin-bottom: 3rem;
    text-align: center;
}

.post-header h1 {
    font-size: 3.5rem;
    margin: 1.5rem 0;
    line-height: 1.2;
}

.hero-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 1.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--card-shadow);
}

.post-content {
    font-size: 1.15rem;
}

.post-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    color: var(--primary);
}

.post-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.post-content p {
    margin-bottom: 1.75rem;
}

.post-content ul, .post-content ol {
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--bg-white);
    padding: 4rem 5% 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-2 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 4rem; }
.mt-4 { margin-top: 4rem; }

/* Responsive */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 4rem 5%;
    }
    .hero-content h1 {
        font-size: 3.5rem;
    }
    .stats-badges {
        justify-content: center;
    }
    .page-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
}
@media (max-width: 768px) {
    .navbar-nav {
        display: none;
    }
    .post-header h1 {
        font-size: 2.5rem;
    }
    .hero-image {
        height: 300px;
    }
}
