:root {
    /* Colors - Modern Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --light: #f1f5f9;
    --white: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    
    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    
    /* Spacing */
    --container-width: 1280px;
    --section-padding: 80px;
    --card-radius: 20px;
    
    /* Shadows */
    --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 -1px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--dark);
    background: #fafbfc;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* Modern Background */
.modern-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, #fafbfc 0%, #f0f4f8 100%);
}

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

.gradient-sphere-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: -250px;
    right: -150px;
    animation-delay: 0s;
}

.gradient-sphere-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    bottom: -200px;
    left: -100px;
    animation-delay: 5s;
}

.gradient-sphere-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 50px) scale(0.9);
    }
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Modern Navbar */
.modern-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.modern-navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-lg);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    transition: padding 0.3s ease;
}

.modern-navbar.scrolled .nav-wrapper {
    padding: 12px 0;
}

/* Modern Logo */
.modern-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
}

.modern-logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    font-size: 36px;
    filter: drop-shadow(0 4px 6px rgba(102, 126, 234, 0.3));
    animation: pulse 3s ease-in-out infinite;
}

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

.logo-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 9px;
    color: var(--gray);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Modern Nav Menu */
.modern-nav-menu {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 1200px) {
    .modern-nav-menu {
        gap: 4px;
    }
}

.modern-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    padding: 10px 16px;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.modern-nav-link:hover {
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary);
    transform: translateY(-2px);
}

.modern-nav-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.nav-link-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.modern-nav-link:hover .nav-link-icon {
    transform: scale(1.2) rotate(-5deg);
}

.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.modern-search-toggle,
.modern-mobile-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.08);
    color: var(--primary);
    transition: all 0.3s ease;
}

.modern-search-toggle:hover,
.modern-mobile-toggle:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-toggle,
.mobile-toggle {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--dark);
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-toggle:hover,
.mobile-toggle:hover {
    background: linear-gradient(135deg, var(--primary)15, var(--secondary)15);
    color: var(--primary);
    transform: translateY(-2px);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 24px;
    height: 2.5px;
    background: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: var(--white);
    border-radius: var(--card-radius);
    padding: 40px;
    transform: translateY(-20px);
    transition: var(--transition);
}

.search-modal.active .search-modal-content {
    transform: translateY(0);
}

.search-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    color: var(--gray);
    width: 40px;
    height: 40px;
}

.search-close:hover {
    color: var(--dark);
}

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    font-size: 16px;
    font-family: var(--font-main);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-submit {
    padding: 15px 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.search-label {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 12px;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-tag {
    padding: 8px 16px;
    background: var(--light);
    color: var(--dark);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.search-tag:hover {
    background: var(--primary);
    color: var(--white);
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 400px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-description {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.8;
    opacity: 0.95;
}

.hero-cta {
    display: inline-flex;
    gap: 20px;
}

.btn {
    padding: 15px 35px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--white);
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

/* Section */
.section {
    padding: var(--section-padding) 0;
}

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

.section-title {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark);
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
}

.post-card {
    background: var(--white);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.post-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.post-card-content {
    padding: 25px;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--gray);
}

.post-category {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}

.post-card-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--dark);
}

.post-card-excerpt {
    font-size: 15px;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--gray-light);
}

.post-read-more {
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-read-more:hover {
    gap: 10px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: rgba(255,255,255,0.85);
    padding: 90px 0 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}

.footer::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
    bottom: -300px;
    right: -200px;
    filter: blur(80px);
    animation: pulse 8s ease-in-out infinite;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.footer-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 18px;
}

.footer-subtitle {
    font-size: 19px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.footer-text {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 25px;
    color: rgba(255,255,255,0.75);
}

.social-links {
    display: flex;
    gap: 14px;
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 10px 30px rgba(102,126,234,0.4);
}

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

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

.footer-links a {
    color: rgba(255,255,255,0.75);
    font-size: 15px;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    padding-left: 8px;
    transform: translateX(3px);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-input {
    padding: 15px 18px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    color: white;
    font-family: var(--font-main);
    font-size: 15px;
    transition: all 0.3s ease;
}

.newsletter-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.1);
}

.newsletter-btn {
    padding: 15px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102,126,234,0.3);
}

.newsletter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(102,126,234,0.5);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.footer-bottom p {
    margin-bottom: 8px;
    color: rgba(255,255,255,0.6);
}

.footer-quote {
    margin-top: 12px;
    font-style: italic;
    font-size: 15px;
    color: rgba(255,255,255,0.5);
    font-family: var(--font-display);
    letter-spacing: 0.3px;
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
}

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

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}
