/* =============================================
   The Chronicle — Main Stylesheet
   Editorial Dark Theme · Amber Accent
   ============================================= */

/* --- CSS Variables --- */
:root {
    --bg: #f5f4f0;
    --bg-surface: #eceae4;
    --bg-card: #ffffff;
    --bg-card-hover: #faf9f6;
    --border: rgba(0,0,0,0.08);
    --border-hover: rgba(240,165,0,0.3);
    --accent: #00aef0;
    --accent-dark: #c88a00;
    --accent-light: rgba(0,230,240,0.12);rgb(0 230 240 / 12%)
    --accent-glow: rgba(0,230,240,0.25);
    --text: #e4e4ef;
    --text-muted: #8080a0;
    --text-faint: #50506a;
    --heading-font: 'Playfair Display', Georgia, serif;
    --body-font: 'Source Serif 4', Georgia, serif;
    --ui-font: 'Hind Siliguri', sans-serif;
    --radius: 8px;
    --radius-lg: 14px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-hover: 0 8px 40px rgba(0,0,0,0.55);
    --transition: 0.22s ease;
    --max-width: 1180px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    background: var(--bg);
    color:var(--text-faint);
    font-family: var(--body-font);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
body.lang-bn { font-family: 'Hind Siliguri', 'Source Serif 4', sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--accent); color: #000; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333344; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* --- Skip Link --- */
.skip-link {
    position: absolute; top: -100px; left: 16px; z-index: 9999;
    background: var(--accent); color: #000; padding: 8px 16px;
    border-radius: var(--radius); font-family: var(--ui-font); font-weight: 600;
    transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* --- Container --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* =============================================
   TOP BAR
   ============================================= */
.top-bar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 6px 0;
    font-family: var(--ui-font);
    font-size: 12px;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-date { color: var(--text-muted); }
.lang-switch { display: flex; align-items: center; gap: 8px; }
.lang-switch a { color: var(--text-muted); font-weight: 500; transition: color var(--transition); letter-spacing: 0.05em; }
.lang-switch a:hover, .lang-switch a.active { color: var(--accent); }
.lang-switch span { color: var(--text-faint); }

/* =============================================
   HEADER
   ============================================= */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
}

/* Logo */
.site-logo a { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    font-size: 24px;
    color: var(--accent);
    line-height: 1;
    display: block;
}
.logo-text { display: flex; flex-direction: column; }
.logo-name {
    font-family: var(--heading-font);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color:var(--text-faint);
}
.logo-tagline {
    font-family: var(--ui-font);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Nav */
.main-nav ul { display: flex; list-style: none; gap: 4px; }
.main-nav > ul > li > a {
    font-family: var(--ui-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
    color: var(--accent);
    background: var(--accent-light);
}
.caret { font-size: 10px; transition: transform var(--transition); }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-width: 200px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition);
    box-shadow: var(--shadow);
    z-index: 200;
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.has-dropdown:hover .caret { transform: rotate(180deg); }
.dropdown li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius);
    font-family: var(--ui-font);
    font-size: 13.5px;
    color: var(--text-muted);
    transition: all var(--transition);
}
.dropdown li a:hover { background: var(--accent-light); color: var(--accent); }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cat-count {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-faint);
    background: rgba(255,255,255,0.05);
    padding: 2px 7px;
    border-radius: 99px;
}

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 8px; }
.search-toggle, .menu-toggle {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all var(--transition);
}
.search-toggle:hover, .menu-toggle:hover { background: var(--accent-light); color: var(--accent); }
.menu-toggle { display: none; flex-direction: column; gap: 5px; }
.menu-toggle span { width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: all var(--transition); display: block; }

/* Header Search */
.header-search {
    max-height: 0; overflow: hidden;
    border-top: 1px solid transparent;
    transition: max-height 0.3s ease, padding 0.3s ease, border-color 0.3s;
}
.header-search.open {
    max-height: 80px;
    padding: 12px 0;
    border-top-color: var(--border);
}
.search-form { display: flex; gap: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.search-form input {
    flex: 1; background: none; border: none; outline: none;
    padding: 12px 16px; color:var(--text-faint); font-size: 15px;
    font-family: var(--ui-font);
}
.search-form input::placeholder { color: var(--text-faint); }
.search-form button {
    padding: 0 18px; color: var(--text-muted);
    background: rgba(255,255,255,0.04);
    transition: all var(--transition);
}
.search-form button:hover { background: var(--accent-light); color: var(--accent); }

/* =============================================
   HERO / FEATURED
   ============================================= */
.hero-section {
    padding: 48px 0 0;
    position: relative;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 64px;
}

/* Main Featured Card */
.hero-main {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--bg-card);
}
.hero-main img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.hero-main:hover img { transform: scale(1.04); }
.hero-main .overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}
.hero-main-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 32px 28px;
}
.hero-main-content .cat-badge {
    display: inline-block;
    font-family: var(--ui-font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    color: #000;
    background: var(--accent);
}
.hero-main-content h2 {
    font-family: var(--heading-font);
    font-size: clamp(20px, 2.5vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    margin-bottom: 12px;
}
.hero-main-content h2 a:hover { color: var(--accent); }
.hero-meta { display: flex; align-items: center; gap: 16px; font-family: var(--ui-font); font-size: 12px; color: rgba(255,255,255,0.6); }
.hero-meta span::before { content: '·'; margin-right: 8px; }
.hero-meta span:first-child::before { display: none; }

/* Hero Side */
.hero-side { display: flex; flex-direction: column; gap: 2px; background: var(--border); }
.hero-side-card {
    flex: 1;
    background: var(--bg-card);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background var(--transition);
    position: relative;
    overflow: hidden;
}
.hero-side-card:hover { background: var(--bg-card-hover); }
.hero-side-card::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform var(--transition);
    transform-origin: bottom;
}
.hero-side-card:hover::after { transform: scaleY(1); }
.hero-side-card .cat-badge {
    display: inline-block;
    font-family: var(--ui-font);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
    color: #000;
}
.hero-side-card h3 {
    font-family: var(--heading-font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color:var(--text-faint);
    margin-bottom: 8px;
    transition: color var(--transition);
}
.hero-side-card:hover h3 { color: var(--accent); }
.hero-side-card .meta { font-family: var(--ui-font); font-size: 11px; color: var(--text-muted); }

/* =============================================
   SECTION HEADINGS
   ============================================= */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.section-title {
    font-family: var(--heading-font);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    padding-left: 16px;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 70%;
    background: var(--accent);
    border-radius: 2px;
}
.section-link {
    font-family: var(--ui-font);
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap var(--transition);
}
.section-link:hover { gap: 8px; }

/* =============================================
   POST CARDS
   ============================================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}
.posts-grid-2 { grid-template-columns: repeat(2, 1fr); }

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.post-card-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-surface);
}
.post-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.06); }
.post-card-thumb .cat-badge {
    position: absolute;
    top: 12px; left: 12px;
    font-family: var(--ui-font);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 4px;
    color: #000;
    z-index: 1;
}
.no-thumb {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    font-size: 36px;
}
.post-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.post-card-body h3 {
    font-family: var(--heading-font);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    color:var(--text-faint);
    margin-bottom: 10px;
    transition: color var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card:hover .post-card-body h3 { color: var(--accent); }
.post-card-body p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--ui-font);
    font-size: 11.5px;
    color: var(--text-faint);
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.post-meta .author { display: flex; align-items: center; gap: 6px; margin-right: auto; }
.author-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--accent);
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* =============================================
   SKELETON ANIMATIONS
   ============================================= */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.skeleton {
    background: linear-gradient(90deg,
        var(--bg-card) 25%,
        rgba(255,255,255,0.04) 37%,
        var(--bg-card) 63%
    );
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
    border-radius: 4px;
}
.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.skeleton-thumb {
    aspect-ratio: 16/9;
    background: linear-gradient(90deg,
        var(--bg-surface) 25%,
        rgba(255,255,255,0.04) 37%,
        var(--bg-surface) 63%
    );
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
}
.skeleton-body { padding: 20px; }
.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    background: linear-gradient(90deg,
        var(--bg-surface) 25%,
        rgba(255,255,255,0.05) 37%,
        var(--bg-surface) 63%
    );
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
    border-radius: 4px;
}
.skeleton-line.w-75 { width: 75%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.h-20 { height: 20px; }

/* =============================================
   CATEGORIES BAR
   ============================================= */
.categories-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 99px;
    font-family: var(--ui-font);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: transparent;
    transition: all var(--transition);
    cursor: pointer;
}
.cat-pill:hover, .cat-pill.active {
    border-color: transparent;
    color: #000;
}
.cat-pill .dot { width: 7px; height: 7px; border-radius: 50%; }

/* =============================================
   SINGLE POST
   ============================================= */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    padding: 40px 0 80px;
}
.post-article { min-width: 0; }
.post-header { margin-bottom: 32px; }
.post-cats { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.post-cat-link {
    font-family: var(--ui-font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    color: #000;
    transition: opacity var(--transition);
}
.post-cat-link:hover { opacity: 0.8; }
h1.post-title {
    font-family: var(--heading-font);
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color:var(--text-faint);
    margin-bottom: 20px;
}
.post-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-family: var(--ui-font);
    font-size: 13px;
    color: var(--text-muted);
}
.post-info .author { display: flex; align-items: center; gap: 10px; }
.post-info .author-avatar { width: 34px; height: 34px; font-size: 13px; }
.post-info .author-name { color:var(--text-faint); font-weight: 500; }
.post-divider { color: var(--border); }

/* Post Featured Image */
.post-featured-img {
    width: 100%;
    aspect-ratio: 16/8;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin: 28px 0;
}

/* Post Content */
.post-content {
    font-size: 17px;
    line-height: 1.8;
    color:var(--text-faint);
}
.post-content h2 {
    font-family: var(--heading-font);
    font-size: 26px;
    font-weight: 700;
    margin: 36px 0 16px;
    color:var(--text-faint);
    letter-spacing: -0.02em;
}
.post-content h3 {
    font-family: var(--heading-font);
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 12px;
    color:var(--text-faint);
}
.post-content p { margin-bottom: 20px; }
.post-content a { color: var(--accent); border-bottom: 1px solid rgba(240,165,0,0.3); }
.post-content a:hover { border-bottom-color: var(--accent); }
.post-content blockquote {
    margin: 28px 0;
    padding: 20px 24px;
    border-left: 4px solid var(--accent);
    background: var(--bg-card);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-muted);
    font-size: 16px;
}
.post-content ul, .post-content ol {
    padding-left: 24px;
    margin-bottom: 20px;
}
.post-content li { margin-bottom: 8px; }
.post-content code {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--accent);
}
.post-content pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 20px;
}
.post-content img {
    border-radius: var(--radius);
    width: 100%;
    height: auto;
    margin: 20px 0;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.post-tags-label {
    font-family: var(--ui-font);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    width: 100%;
}
.tag-chip {
    font-family: var(--ui-font);
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 99px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all var(--transition);
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }

/* Share */
.post-share { display: flex; align-items: center; gap: 12px; margin: 24px 0; font-family: var(--ui-font); font-size: 13px; color: var(--text-muted); }
.share-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all var(--transition);
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* Sidebar */
.post-sidebar { position: sticky; top: 90px; }
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}
.widget-title {
    font-family: var(--heading-font);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget-title::before {
    content: '';
    width: 3px; height: 16px;
    background: var(--accent);
    border-radius: 2px;
}
.sidebar-posts { list-style: none; }
.sidebar-posts li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.sidebar-posts li:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-posts a {
    font-family: var(--ui-font);
    font-size: 13px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
    transition: color var(--transition);
    line-height: 1.4;
}
.sidebar-posts a:hover { color: var(--accent); }
.sidebar-posts .date { font-size: 11px; color: var(--text-faint); }

/* =============================================
   COMMENTS
   ============================================= */
.comments-section {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.comments-title { font-family: var(--heading-font); font-size: 22px; font-weight: 700; margin-bottom: 28px; }
.comment-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 40px;
}
.comment-form h3 { font-family: var(--heading-font); font-size: 18px; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-family: var(--ui-font); font-size: 13px; font-weight: 500; color: var(--text-muted); }
.form-group input, .form-group textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 14px;
    color:var(--text-faint);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition);
    font-family: var(--ui-font);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 120px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; border-radius: var(--radius); font-family: var(--ui-font); font-size: 14px; font-weight: 600; cursor: pointer; transition: all var(--transition); border: none; }
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.comment-list { list-style: none; }
.comment-item {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}
.comment-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.commenter-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    font-family: var(--ui-font);
    flex-shrink: 0;
}
.commenter-name { font-family: var(--ui-font); font-weight: 600; font-size: 14px; }
.comment-date { font-family: var(--ui-font); font-size: 12px; color: var(--text-faint); }
.comment-text { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination { display: flex; justify-content: center; margin: 48px 0; }
.pagination ul { display: flex; list-style: none; gap: 4px; }
.pagination a {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: var(--radius);
    font-family: var(--ui-font);
    font-size: 14px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.pagination a:hover, .pagination a.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}
.pagination a.prev, .pagination a.next { width: auto; padding: 0 14px; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { border-top: 1px solid var(--border); margin-top: 80px; }
.footer-top {
    padding: 64px 0 48px;
    background: var(--bg-surface);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 48px;
}
.footer-brand { max-width: 280px; }
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--heading-font);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
}
.footer-logo .logo-icon { color: var(--accent); }
.footer-brand p { font-family: var(--ui-font); font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.social-links { display: flex; gap: 8px; }
.social-link {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all var(--transition);
}
.social-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

.footer-col h4 {
    font-family: var(--heading-font);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-family: var(--ui-font); font-size: 13px; color: var(--text-muted); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-posts li { padding-bottom: 10px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.footer-posts li:last-child { border-bottom: none; }
.footer-post-date { display: block; font-size: 11px; color: var(--text-faint); margin-top: 3px; }

.newsletter-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.newsletter-form input {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    color:var(--text-faint);
    font-size: 13px;
    outline: none;
    font-family: var(--ui-font);
    transition: border-color var(--transition);
}
.newsletter-form input:focus { border-color: var(--accent); }
.newsletter-form button {
    background: var(--accent);
    color: #000;
    font-family: var(--ui-font);
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}
.newsletter-form button:hover { background: var(--accent-dark); }
.newsletter-msg { font-family: var(--ui-font); font-size: 12px; color: #4ade80; margin-top: 8px; }

.footer-bottom {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 18px 0;
}
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-family: var(--ui-font); font-size: 13px; color: var(--text-faint); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-family: var(--ui-font); font-size: 13px; color: var(--text-faint); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }

/* =============================================
   BACK TO TOP + TOAST
   ============================================= */
.back-to-top {
    position: fixed;
    bottom: 32px; right: 32px;
    width: 44px; height: 44px;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all var(--transition);
    opacity: 0;
    pointer-events: none;
    z-index: 500;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--accent); border-color: var(--accent); color: #000; transform: translateY(-3px); }

.toast {
    position: fixed;
    bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 24px;
    font-family: var(--ui-font);
    font-size: 14px;
    color:var(--text-faint);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: #4ade80; color: #4ade80; }
.toast.error { border-color: #f87171; color: #f87171; }

/* =============================================
   SEARCH / CATEGORY PAGE
   ============================================= */
.page-hero {
    padding: 56px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.page-hero h1 {
    font-family: var(--heading-font);
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}
.page-hero p { font-family: var(--ui-font); color: var(--text-muted); font-size: 16px; max-width: 500px; margin: 0 auto; }

/* Search Input (search page) */
.search-page-form {
    max-width: 600px;
    margin: 0 auto 56px;
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition);
}
.search-page-form:focus-within { border-color: var(--accent); }
.search-page-form input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    padding: 16px 20px;
    font-size: 16px;
    color:var(--text-faint);
    font-family: var(--ui-font);
}
.search-page-form button {
    padding: 0 24px;
    background: var(--accent);
    color: #000;
    font-weight: 600;
    font-family: var(--ui-font);
    font-size: 14px;
    transition: background var(--transition);
}
.search-page-form button:hover { background: var(--accent-dark); }

/* =============================================
   404 PAGE
   ============================================= */
.page-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px;
}
.page-404 .num {
    font-family: var(--heading-font);
    font-size: 120px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -0.05em;
}
.page-404 h2 { font-family: var(--heading-font); font-size: 28px; margin-bottom: 16px; }
.page-404 p { color: var(--text-muted); font-family: var(--ui-font); margin-bottom: 32px; }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.fade-in { animation: fadeIn 0.4s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* =============================================
   READING PROGRESS BAR
   ============================================= */
.reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: var(--accent);
    z-index: 9999;
    transition: width 0.1s ease;
    border-radius: 0 2px 2px 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-side { flex-direction: row; }
    .hero-side-card { flex: 1; }
    .post-layout { grid-template-columns: 1fr; }
    .post-sidebar { position: static; }
}

@media (max-width: 768px) {
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-surface); border-bottom: 1px solid var(--border); padding: 16px; z-index: 100; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; }
    .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: transparent; padding: 0; padding-left: 16px; margin-top: 8px; max-height: 0; overflow: hidden; transition: max-height 0.3s; }
    .has-dropdown.open .dropdown { max-height: 400px; }
    .menu-toggle { display: flex !important; }
    .posts-grid { grid-template-columns: 1fr; }
    .hero-side { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .hero-main-content h2 { font-size: 20px; }
    .footer-brand { max-width: 100%; }
    .back-to-top { bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .logo-tagline { display: none; }
    .section-title { font-size: 20px; }
    .posts-grid-2 { grid-template-columns: 1fr; }
    h1.post-title { font-size: 24px; }
}
