/* ================================
   Byte Blog - Pro-TerrorByte Tech Blog
   Purple/Violet Theme - Enthusiastic Tech Vibe
   ================================ */

:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --secondary: #8b5cf6;
    --accent: #10b981;
    --background: #faf5ff;
    --surface: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.12);
    --radius: 0.75rem;
    --transition: 0.2s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

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

ul, ol {
    list-style: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ================================
   Header
   ================================ */
.site-header {
    background: var(--surface);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.logo-text .tagline {
    font-size: 0.75rem;
    color: var(--text-light);
    font-family: 'Georgia', serif;
    font-style: italic;
}

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

.main-nav a {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-light);
}

.main-nav a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-menu-btn { display: block; }
    .main-nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        gap: 1rem;
    }
}

/* ================================
   Content Grid
   ================================ */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    padding: 2.5rem 0;
}

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

/* ================================
   Featured Post
   ================================ */
.featured-post {
    margin-bottom: 3rem;
}

.featured-post .post-link {
    display: block;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition), transform var(--transition);
}

.featured-post .post-link:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.featured-post .post-image {
    aspect-ratio: 21/9;
    overflow: hidden;
}

.featured-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-post:hover .post-image img {
    transform: scale(1.03);
}

.featured-post .post-content {
    padding: 1.5rem 2rem 2rem;
}

.featured-post .category {
    display: inline-block;
    color: var(--primary);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.featured-post h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.featured-post .excerpt {
    font-size: 1.0625rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.meta {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.875rem;
    color: var(--text-light);
}

.meta .separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

/* ================================
   Posts Section
   ================================ */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-item {
    display: flex;
    gap: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition);
}

.post-item:hover {
    box-shadow: var(--shadow-lg);
}

.post-item .post-thumb {
    width: 180px;
    height: 120px;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.post-item .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-item .post-info {
    flex: 1;
}

.post-item .category {
    color: var(--primary);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-item h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0.5rem 0;
    line-height: 1.4;
}

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

.post-item .excerpt {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .post-item {
        flex-direction: column;
    }
    .post-item .post-thumb {
        width: 100%;
        height: 180px;
    }
}

/* ================================
   Sidebar
   ================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
}

/* Author Bio */
.author-bio {
    text-align: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-bio h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.author-bio .author-title {
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.author-bio .author-desc {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.author-bio .social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.author-bio .social-links a {
    font-size: 1.25rem;
    color: var(--text-light);
}

.author-bio .social-links a:hover {
    color: var(--primary);
}

/* Categories */
.category-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    font-size: 0.9375rem;
}

.category-list .count {
    font-size: 0.75rem;
    color: var(--text-light);
    background: var(--background);
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
}

/* Newsletter */
.newsletter p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
}

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

.newsletter-form button {
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

/* ================================
   Footer
   ================================ */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand .logo-icon {
    font-size: 1.5rem;
}

.footer-brand h4 {
    font-size: 1.125rem;
}

.copyright {
    font-size: 0.875rem;
    color: var(--text-light);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-light);
}

.footer-links a:hover {
    color: var(--primary);
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
