/*
Theme Name: Tech Card Theme
Theme URI: https://example.com/tech-card-theme
Author: Antigravity
Author URI: https://example.com
Description: A modern, card-style WordPress theme for tech blogs.
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tech-card-theme
Tags: blog, grid-layout, modern, responsive
*/

:root {
    /* Premium Color Palette */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #0f172a;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;

    /* Layout */
    --container-width: 1200px;
    --header-height: 70px;
    --border-radius: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.site-branding h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 32px;
    margin: 0;
}

.main-navigation a {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* Main Content */
.site-main {
    padding: 40px 0 80px;
    min-height: calc(100vh - var(--header-height));
}

/* Card Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

@media (min-width: 1024px) {
    .post-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.post-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(59, 130, 246, 0.1);
}

.post-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 60%;
    /* 5:3 Aspect Ratio */
    overflow: hidden;
    background-color: #e2e8f0;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.no-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f1f5f9 25%, #e2e8f0 25%, #e2e8f0 50%, #f1f5f9 50%, #f1f5f9 75%, #e2e8f0 75%, #e2e8f0 100%);
    background-size: 20px 20px;
    opacity: 0.5;
}

.post-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--text-main);
}

.post-title a {
    color: inherit;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.post-meta-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: auto;
}

.meta-author {
    font-weight: 500;
    color: var(--text-secondary);
}

.meta-right {
    display: flex;
    gap: 12px;
}

.meta-icon {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Pagination */
.navigation.pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.navigation.pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.navigation.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.2s ease;
}

.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Single Post */
.single-post-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.post-hero-wrapper {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.post-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-post-content-wrapper {
    padding: 40px;
}

.entry-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.entry-content {
    font-size: 1.1rem;
    color: #334155;
}

.entry-content h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--text-main);
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* Footer */
.site-footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: 1fr;
    }

    .site-header .container {
        padding: 0 16px;
    }

    .main-navigation {
        display: none;
        /* Simple hide for mobile for now */
    }

    .entry-title {
        font-size: 1.8rem;
    }

    .single-post-content-wrapper {
        padding: 20px;
    }

    .post-hero-wrapper {
        height: 250px;
    }
}