/*
Theme Name: Harshith AI & ML Theme
Theme URI: https://harshith.org
Author: Harshith
Author URI: https://harshith.org
Description: Modern AI and Machine Learning focused theme with blue/purple gradient design, perfect for tech blogs and AI enthusiasts.
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: harshith-ai
Tags: ai, machine-learning, tech, blog, modern, gradient, responsive
*/

/* ========================================
   CSS Variables & Root Styles
======================================== */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #00d4ff;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #667eea 0%, #00d4ff 100%);
    --shadow-sm: 0 2px 8px rgba(102, 126, 234, 0.1);
    --shadow-md: 0 4px 16px rgba(102, 126, 234, 0.15);
    --shadow-lg: 0 8px 32px rgba(102, 126, 234, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
    font-size: 16px;
}

/* ========================================
   Header & Navigation
======================================== */
.site-header {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.header-content {
    max-width: 1500px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
}

.custom-logo-link {
    display: block;
    transition: var(--transition);
}

.custom-logo-link:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.custom-logo {
    height: 70px;
    width: auto;
    display: block;
}

.site-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.site-title a {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.site-title a:hover {
    transform: translateY(-2px);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.site-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0.3rem 0 0 0;
    font-weight: 400;
}

.main-navigation {
    display: flex;
    gap: 2rem;
}

.main-navigation ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-navigation li {
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
    display: block;
}

.main-navigation a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* ========================================
   Hero Section
======================================== */
.hero-section {
    background: var(--gradient-primary);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--white);
    margin-bottom: 3rem;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-tags {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
}

.hero-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Container & Layout
======================================== */
.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
}

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

.post-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.post-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--gradient-primary);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

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

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-category {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-date {
    display: inline-flex;
    align-items: center;
}

.post-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.read-more:hover {
    gap: 0.8rem;
    color: var(--secondary-color);
}

/* ========================================
   Sidebar
======================================== */
.sidebar {
    position: sticky;
    top: 100px;
}

.widget {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.8rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.widget:hover {
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-dark);
    padding-bottom: 0.8rem;
    border-bottom: 3px solid var(--primary-color);
}

.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget ul li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #e2e8f0;
    margin: 0;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget ul li a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

.widget select {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
}

.widget input[type="search"],
.widget input[type="text"] {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
}

.widget .searchform {
    display: flex;
    gap: 0.5rem;
}

.widget .searchform input[type="submit"] {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* ========================================
   Single Post
======================================== */
.single-post {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-sm);
}

.entry-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.entry-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.entry-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--text-dark);
}

.entry-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--primary-color);
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content ul, .entry-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.8rem;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

/* ========================================
   Footer
======================================== */
.site-footer {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

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

.footer-content p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

/* ========================================
   Pagination
======================================== */
.pagination {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 3rem 0;
}

.pagination a,
.pagination span {
    padding: 0.8rem 1.2rem;
    background: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.pagination a:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination .current {
    background: var(--gradient-primary);
    color: var(--white);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .custom-logo {
        height: 60px;
    }

    .main-navigation {
        flex-direction: column;
        gap: 0.5rem;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

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

    .single-post {
        padding: 2rem 1.5rem;
    }

    .entry-title {
        font-size: 2rem;
    }
}

/* ========================================
   Utility Classes
======================================== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
