/* custom.css */
*, *::before, *::after {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    overflow-x: hidden;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
a {
    text-decoration: none;
    color: #0066cc;
}
a:hover {
    text-decoration: underline;
}
ul {
    padding: 0;
    margin: 0;
    list-style: none;
}
:root {
    --primary: #1a73e8;
    --secondary: #202124;
    --accent: #fbbc05;
    --light: #f8f9fa;
    --dark: #202124;
    --gray: #5f6368;
    --border: #dadce0;
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.6rem;
    line-height: 1.3;
    color: var(--dark);
    font-weight: 700;
}
h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.15rem); }

/* Ensure uniform H1 inside sectioning elements */
article h1,
section h1,
nav h1,
aside h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.3;
    margin-bottom: 0.6rem;
}

/* Paragraphs */
p {
    margin: 0 0 1rem;
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 0.5rem;
}
.topbar {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
}
.logo span {
    color: var(--accent);
}
.logo svg {
    margin-right: 0.4rem;
    width: 28px;
    height: 28px;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--dark);
}
.main-nav ul {
    display: flex;
    gap: 1rem;
}
.main-nav a {
    color: var(--dark);
    font-weight: 600;
    position: relative;
    padding: 0.4rem 0;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}
.main-nav a:hover::after,
.main-nav a:focus::after {
    width: 100%;
}
.main-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1rem;
    padding: 1rem 0;
}
.sidebar {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.8rem;
}
.sidebar h3 {
    padding-bottom: 0.4rem;
    margin-bottom: 0.8rem;
    border-bottom: 2px solid var(--accent);
    position: relative;
}
.sidebar h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}
.main-content {
    display: grid;
    gap: 1rem;
}

/* Featured Article */
.featured-article {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.featured-img {
    height: 200px;
    background: linear-gradient(45deg, #1a73e8, #34a853);
    position: relative;
    overflow: hidden;
}
.featured-content {
    padding: 1rem;
}

/* Category Tag */
.category-tag {
    display: inline-block;
    background: var(--accent);
    color: #202124;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.article-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.07);
}
.article-img {
    height: 120px;
    background: linear-gradient(45deg, #ea4335, #fbbc05);
}
.article-content {
    padding: 0.8rem;
}
.article-meta {
    display: flex;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    gap: 0.7rem;
}

/* Post Content (Single Post) */
.post-content {
    padding: 0.5rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    font-size: clamp(1rem, 1vw + 0.5rem, 1.125rem);
    line-height: 1.8;
    text-align: justify;
}

/* Headings inside post-content */
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: var(--primary);
    font-weight: 700;
}
.post-content h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
.post-content h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

/* Blockquotes */
.post-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--accent);
    background: var(--light);
    color: var(--gray);
    font-style: italic;
    border-radius: var(--radius);
}

/* Code blocks */
.post-content pre {
    background: #1e1e1e;
    color: #f8f9fa;
    padding: 1rem;
    overflow-x: auto;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}
.post-content code {
    background: var(--light);
    color: var(--secondary);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius);
    font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.post-content th,
.post-content td {
    border: 1px solid var(--border);
    padding: 0.6rem 0.8rem;
    text-align: left;
}
.post-content th {
    background: var(--accent);
    color: #202124;
}

/* Full-screen images for single post */
.post-thumbnail img,
.post-content img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Share & Author Boxes */
.author-box {
    background: #fff;
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.author-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.author-info h3 {
    margin: 0 0 0.5rem;
}
.post-share {
    margin: 2rem 0;
}
.post-share h3 {
    margin-bottom: 1rem;
}
.post-share a {
    color: var(--primary);
    font-weight: 600;
    margin-right: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr 3fr;
    }
    .sidebar-right {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 1rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 99;
    }
    .main-nav.active {
        transform: translateY(0);
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    .main-nav li {
        border-bottom: 1px solid var(--border);
    }
    .main-nav a {
        display: block;
        padding: 1rem 0;
    }
    .main-grid, .sidebar-left, .sidebar-right, .articles-grid {
        grid-template-columns: 1fr;
    }
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    .post-content {
        padding: 1rem;
    }
}

/* Footer (restored to original styles) */
.footer {
    background: var(--secondary);
    color: #fff;
    padding: 2.3rem 0 1rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.footer-col h4 {
    color: #fff;
    margin-bottom: 0.7rem;
    position: relative;
    padding-bottom: 0.4rem;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background: var(--accent);
}
.footer-col ul li {
    margin-bottom: 0.5rem;
}
.footer-col a {
    color: #e8eaed;
    transition: var(--transition);
}
.footer-col a:hover {
    color: var(--accent);
}
.copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #9aa0a6;
    font-size: 0.9rem;
}

