/*
Theme Name: Cudhey Tech Blog
Theme URI: https://example.com/
Author: Your Name
Author URI: https://example.com/author
Description: A modern tech blog theme with a focus on clean design and readability.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.0
Text Domain: cudhey-tech-blog
Tags: blog, one-column, two-columns, custom-header, custom-menu, featured-images, flexible-header, full-width-template, theme-options, translation-ready
*/

/* --- Rest of the original CSS remains below this line --- */

:root {
    --primary-color: #4285f4;
    --primary-dark: #3367d6;
    --secondary-color: #34a853;
    --accent-color: #ea4335;
    --warning-color: #fbbc04;
    --surface: #ffffff;
    --background: #f8fafc;
    --on-surface: #1f2937;
    --on-surface-variant: #6b7280;
    --outline: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--on-surface);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--outline);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--on-surface-variant);
}

/* Glassmorphism Header */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--outline);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px var(--shadow);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    transition: padding 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--on-surface);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    margin-right: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.logo:hover .logo-icon::before {
    animation: shine 0.6s ease;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); opacity: 0; }
}

.nav {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav a {
    text-decoration: none;
    color: var(--on-surface-variant);
    font-weight: 500;
    font-size: 15px;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(66, 133, 244, 0.1), transparent);
    transition: left 0.5s ease;
}

.nav a:hover::before {
    left: 100%;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-color);
    background: rgba(66, 133, 244, 0.1);
    transform: translateY(-2px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(66, 133, 244, 0.1);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: var(--primary-color);
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(66, 133, 244, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.action-btn:hover::before {
    width: 100px;
    height: 100px;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.3);
}

/* Container with modern spacing */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 32px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 64px;
}

/* Ultra Modern Hero Article */
.hero-article {
    background: var(--gradient-1);
    border-radius: 24px;
    padding: 48px;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 48px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
}

.hero-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-article:hover .hero-content {
    transform: translateY(0);
    opacity: 1;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: inline-block;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    margin: 8px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 20px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-meta svg {
    color: rgba(255, 255, 255, 0.7);
}

/* Main Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.main-article {
    position: relative;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.main-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.main-article:hover .article-image {
    transform: scale(1.05);
}

.article-content {
    padding: 24px;
}

.article-tag {
    background: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.article-title {
    font-size: 20px;
    font-weight: 700;
    margin: 12px 0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--on-surface-variant);
    font-size: 13px;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Sidebar Styling */
.sidebar {
    padding: 0;
}

.sidebar-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.trending-articles-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trending-article {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    padding: 16px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    cursor: pointer;
}

.trending-article:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.trending-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.trending-article:hover .trending-image {
    transform: scale(1.08);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.trending-content {
    flex-grow: 1;
}

.trending-tag {
    background: var(--warning-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 6px;
}

.trending-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--on-surface);
    line-height: 1.4;
}

.trending-meta {
    font-size: 12px;
    color: var(--on-surface-variant);
    margin-top: 4px;
}


/* Newsletter Section */
.newsletter {
    background: var(--gradient-2);
    color: white;
    border-radius: 24px;
    padding: 64px;
    text-align: center;
    margin: 64px 32px;
}

.newsletter-content h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.newsletter-content p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-input {
    flex-grow: 1;
    padding: 16px 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-input:focus {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.2);
}

.newsletter-btn {
    padding: 16px 32px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.newsletter-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.newsletter-btn .loading {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background: var(--surface);
    padding: 64px 32px;
    border-top: 1px solid var(--outline);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
}

.footer-section h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.footer-section p {
    font-size: 15px;
    color: var(--on-surface-variant);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    text-decoration: none;
    color: var(--on-surface-variant);
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    color: var(--on-surface-variant);
}

.contact-info svg {
    color: var(--on-surface-variant);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: -8px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--outline);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--on-surface-variant);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(66, 133, 244, 0.2);
}

.footer-bottom {
    max-width: 1400px;
    margin: 48px auto 0;
    padding-top: 24px;
    text-align: center;
    color: var(--on-surface-variant);
    font-size: 14px;
    border-top: 1px solid var(--outline);
}


/* Animations */
.fade-in {
    animation-name: fadeInAnimation;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

@keyframes fadeInAnimation {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        padding: 32px 24px;
        gap: 48px;
    }

    .main-content {
        order: 1;
    }

    .sidebar {
        order: 2;
    }

    .nav, .header-actions {
        display: none; /* Hide for mobile menu button */
    }

    .header-container {
        padding: 16px 24px;
    }

    .hero-article {
        padding: 32px 24px;
        min-height: 320px;
    }

    .hero-title {
        font-size: 24px;
    }

    .newsletter {
        padding: 32px 24px;
        margin: 48px 16px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .footer-container {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --surface: #1f2937;
        --background: #111827;
        --on-surface: #f9fafb;
        --on-surface-variant: #9ca3af;
        --outline: #374151;
        --shadow: rgba(0, 0, 0, 0.4);
        --glass-bg: rgba(31, 41, 55, 0.1);
        --glass-border: rgba(55, 65, 81, 0.5);
    }

    .header {
        background: rgba(17, 24, 39, 0.8);
        border-bottom-color: var(--outline);
    }
    
    .header.scrolled {
        background: rgba(17, 24, 39, 0.98);
    }

    .logo {
        color: var(--on-surface);
    }

    .nav a {
        color: var(--on-surface-variant);
    }

    .nav a:hover,
    .nav a.active {
        color: var(--primary-color);
        background: rgba(66, 133, 244, 0.2);
    }

    .article-title {
        color: var(--on-surface);
    }

    .trending-title {
        color: var(--on-surface);
    }

    .footer-bottom {
        border-top-color: var(--outline);
    }

    .social-link {
        background: var(--outline);
        color: var(--on-surface-variant);
    }
}
