/* ==========================================================================
   Celmin Theme - Dark Magazine Style
   ========================================================================== */

/* CSS Variables - matching Next.js design */
:root {
    --background: #0a0a0a;
    --foreground: #fafafa;
    --card: #141414;
    --card-foreground: #fafafa;
    --primary: #586066;
    --secondary: #1a1a1a;
    --muted: #1a1a1a;
    --muted-foreground: #737373;
    --accent: var(--ghost-accent-color, #586066);
    --border: rgba(255, 255, 255, 0.1);
    --radius: 0.625rem;
    --font-sans: var(--font-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    --font-heading: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
}

/* Use Ghost typography settings for headings */
h1, h2, h3, h4, h5, h6,
.post-title, .hero-title, .card-title, .side-title, .compact-title,
.section-title, .sidebar-title, .author-name, .tag-name, .articles-title {
    font-family: var(--font-heading);
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* Utility */
.hidden { display: none !important; }
.meta-sep { color: rgba(255, 255, 255, 0.3); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

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

@media (min-width: 768px) {
    .header-inner {
        height: 5rem;
    }
}

.site-logo img {
    height: 1.75rem;
    width: auto;
}

@media (min-width: 768px) {
    .site-logo img {
        height: 2rem;
    }
}

.site-title {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Navigation */
.main-nav {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 1024px) {
    .main-nav {
        display: flex;
    }
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.6);
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--foreground);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .header-actions {
        gap: 1rem;
    }
}

.search-btn {
    padding: 0.5rem;
    color: rgba(250, 250, 250, 0.7);
    transition: color 0.2s;
}

.search-btn:hover {
    color: var(--foreground);
}

.subscribe-btn {
    display: none;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background 0.2s;
}

@media (min-width: 640px) {
    .subscribe-btn {
        display: block;
    }
}

.subscribe-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-btn {
    display: block;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    background: var(--background);
    border-top: 1px solid var(--border);
    max-height: 80vh;
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .mobile-menu {
        display: none !important;
    }
}

.mobile-nav {
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-link {
    padding: 0.75rem 0;
    color: rgba(250, 250, 250, 0.6);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-nav-link:hover {
    color: var(--foreground);
}

.mobile-nav-link.border-top {
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.mobile-subscribe-btn {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--primary);
    color: var(--foreground);
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
}


/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: 2rem 0 4rem;
}

@media (min-width: 768px) {
    .hero {
        padding: 4rem 0;
    }
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 2fr 1fr;
        gap: 2.5rem;
    }
}

/* Main Hero Card */
.hero-card {
    display: block;
}

.hero-image {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius);
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-image {
        aspect-ratio: 16/10;
    }
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease-out;
}

.hero-card:hover .hero-image img {
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.4) 50%, transparent);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .hero-content {
        padding: 2.5rem;
    }
}

.tag-label {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: white;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-excerpt {
    display: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    max-width: 42rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .hero-excerpt {
        display: block;
    }
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .hero-meta {
        margin-top: 1.5rem;
    }
}

.author-avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    max-width: 36px;
    min-height: 36px;
    max-height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.hero-meta .author-avatar {
    width: 36px !important;
    height: 36px !important;
}

.author-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.hero-meta time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Side Cards */
.hero-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .hero-side {
        gap: 1.5rem;
    }
}

.side-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.side-image {
    position: relative;
    width: 6rem;
    height: 5rem;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .side-image {
        width: 7rem;
        height: 6rem;
    }
}

.side-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.side-card:hover .side-image img {
    transform: scale(1.05);
}

.side-content {
    flex: 1;
    min-width: 0;
    padding: 0.25rem 0;
}

.tag-label-sm {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(250, 250, 250, 0.5);
}

.side-title {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 0.25rem;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .side-title {
        font-size: 1rem;
    }
}

.side-card:hover .side-title {
    color: var(--accent);
}

.side-content time {
    font-size: 0.75rem;
    color: rgba(250, 250, 250, 0.5);
    margin-top: 0.5rem;
    display: block;
}

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
}


/* ==========================================================================
   Latest Section
   ========================================================================== */
.latest-section {
    padding: 3rem 0 5rem;
}

@media (min-width: 768px) {
    .latest-section {
        padding: 4rem 0;
    }
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 3rem;
    }
}

.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(250, 250, 250, 0.5);
}

.view-all {
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.5);
    transition: color 0.2s;
}

.view-all:hover {
    color: var(--foreground);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: 2fr 1fr;
        gap: 4rem;
    }
}

/* Article List */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .article-list {
        gap: 3rem;
    }
}

/* ==========================================================================
   Article Cards
   ========================================================================== */
.article-card {
    display: block;
}

.card-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .card-inner {
        flex-direction: row;
        gap: 2rem;
    }
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .card-image {
        width: 18rem;
        height: 12rem;
        aspect-ratio: auto;
    }
}

@media (min-width: 1024px) {
    .card-image {
        width: 20rem;
    }
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-card:hover .card-image img {
    transform: scale(1.02);
}

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.25rem 0;
}

.card-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(250, 250, 250, 0.5);
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

@media (min-width: 768px) {
    .card-title {
        font-size: 1.5rem;
    }
}

.article-card:hover .card-title {
    color: var(--accent);
}

.card-excerpt {
    color: rgba(250, 250, 250, 0.6);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.card-author {
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.7);
}

.card-meta time {
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.5);
}

/* Compact Card */
.article-card-compact {
    display: block;
}

.compact-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.compact-image {
    position: relative;
    width: 100%;
    align-self: stretch;
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.compact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-card-compact:hover .compact-image img {
    transform: scale(1.02);
}

.compact-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(250, 250, 250, 0.5);
    margin-bottom: 0.5rem;
    display: block;
}

.compact-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-compact:hover .compact-title {
    color: var(--accent);
}

.compact-excerpt {
    color: rgba(250, 250, 250, 0.6);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.compact-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.compact-author {
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.7);
}

.compact-meta time {
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.5);
}


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

.sidebar-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.sidebar-logo {
    height: 1.5rem;
    width: auto;
    margin-bottom: 1rem;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.sidebar-description {
    color: rgba(250, 250, 250, 0.6);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.sidebar-social {
    display: flex;
    gap: 1rem;
}

.sidebar-social a {
    color: rgba(250, 250, 250, 0.4);
    transition: color 0.2s;
}

.sidebar-social a:hover {
    color: var(--foreground);
}

.sidebar-heading {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sidebar-text {
    color: rgba(250, 250, 250, 0.6);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.sidebar-subscribe-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: var(--accent);
    color: var(--foreground);
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.sidebar-subscribe-btn:hover {
    opacity: 0.9;
}

/* Sidebar Sections */
.sidebar-section {
    margin-top: 0;
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(250, 250, 250, 0.5);
    margin-bottom: 1.5rem;
}

/* Featured List */
.featured-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.featured-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.featured-number {
    font-size: 1.875rem;
    font-weight: 300;
    color: rgba(250, 250, 250, 0.2);
    width: 2rem;
    transition: color 0.2s;
}

.featured-item:hover .featured-number {
    color: rgba(88, 96, 102, 0.5);
}

.featured-content {
    flex: 1;
}

.featured-title {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    transition: color 0.2s;
}

.featured-item:hover .featured-title {
    color: var(--accent);
}

.featured-content time {
    font-size: 0.75rem;
    color: rgba(250, 250, 250, 0.5);
    margin-top: 0.375rem;
    display: block;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-pill {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    color: rgba(250, 250, 250, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, color 0.2s;
}

.tag-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 5rem;
}

.site-footer .container {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (min-width: 768px) {
    .site-footer .container {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
}

.footer-brand {
    grid-column: span 2;
}

@media (min-width: 768px) {
    .footer-brand {
        grid-column: span 1;
    }
}

.footer-logo {
    height: 1.5rem;
    width: auto;
    margin-bottom: 1rem;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-description {
    color: rgba(250, 250, 250, 0.5);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    max-width: 20rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: rgba(250, 250, 250, 0.4);
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--foreground);
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(250, 250, 250, 0.5);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.6);
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 2.5rem;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: rgba(250, 250, 250, 0.4);
}


/* ==========================================================================
   Post Page
   ========================================================================== */
.post-article {
    position: relative;
}

.post-hero {
    position: relative;
    height: 50vh;
    width: 100%;
}

@media (min-width: 768px) {
    .post-hero {
        height: 60vh;
    }
}

.post-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4) 50%, transparent);
}

.post-container {
    position: relative;
    z-index: 10;
    margin-top: -8rem;
}

.post-wrapper {
    max-width: 48rem;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 1.5rem;
}

.post-tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.post-tag:hover {
    color: white;
}

.post-title {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .post-title {
        font-size: 3rem;
    }
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-author-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author-info {
    display: flex;
    flex-direction: column;
}

.post-author-name {
    color: white;
    font-weight: 500;
}

.post-date-reading {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Post Content Wrapper */
.post-content-wrapper {
    background: var(--background);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
    .post-content-wrapper {
        padding: 2.5rem;
    }
}

.post-excerpt {
    font-size: 1.25rem;
    color: rgba(250, 250, 250, 0.7);
    line-height: 1.6;
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    border-left: 4px solid var(--accent);
}

/* Post Tags */
.post-tags {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tag-pill {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, color 0.2s;
}

.post-tag-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Author Bio */
.post-author-bio {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.author-bio-link {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.author-bio-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.author-bio-name {
    font-size: 1.125rem;
    font-weight: 600;
}

.author-bio-text {
    color: rgba(250, 250, 250, 0.6);
    margin-top: 0.25rem;
    line-height: 1.6;
}

/* Related Posts */
.related-posts {
    padding: 4rem 0;
}

.related-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(250, 250, 250, 0.5);
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   Tag Page
   ========================================================================== */
.tag-page {
    padding: 3rem 0 5rem;
}

@media (min-width: 768px) {
    .tag-page {
        padding: 4rem 0;
    }
}

.tag-header {
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .tag-header {
        margin-bottom: 4rem;
    }
}

.tag-label-page {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(250, 250, 250, 0.5);
    margin-bottom: 0.5rem;
    display: block;
}

.tag-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .tag-name {
        font-size: 3rem;
    }
}

.tag-description {
    color: rgba(250, 250, 250, 0.6);
    font-size: 1.125rem;
    max-width: 42rem;
}

.tag-count {
    color: rgba(250, 250, 250, 0.4);
    margin-top: 1rem;
}

.tag-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .tag-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tag-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.no-posts {
    text-align: center;
    color: rgba(250, 250, 250, 0.5);
    padding: 4rem 0;
}


/* ==========================================================================
   Author Page
   ========================================================================== */
.author-page {
    padding: 3rem 0 5rem;
}

@media (min-width: 768px) {
    .author-page {
        padding: 4rem 0;
    }
}

.author-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

@media (min-width: 768px) {
    .author-header {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        margin-bottom: 4rem;
    }
}

.author-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .author-info {
        align-items: flex-start;
    }
}

.author-name {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .author-name {
        font-size: 2.25rem;
    }
}

.author-location {
    color: rgba(250, 250, 250, 0.5);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.author-bio {
    color: rgba(250, 250, 250, 0.6);
    font-size: 1.125rem;
    max-width: 42rem;
    margin-bottom: 1rem;
}

.author-post-count {
    color: rgba(250, 250, 250, 0.4);
}

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

@media (min-width: 768px) {
    .author-social {
        justify-content: flex-start;
    }
}

.author-social a {
    color: rgba(250, 250, 250, 0.4);
    transition: color 0.2s;
}

.author-social a:hover {
    color: var(--foreground);
}

.author-posts {
    border-top: 1px solid var(--border);
    padding-top: 3rem;
}

.author-posts-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(250, 250, 250, 0.5);
    margin-bottom: 2rem;
}

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

.author-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .author-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .author-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   Page
   ========================================================================== */
.page-article {
    padding: 3rem 0 5rem;
}

@media (min-width: 768px) {
    .page-article {
        padding: 4rem 0;
    }
}

.page-wrapper {
    max-width: 48rem;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 3rem;
    }
}

/* ==========================================================================
   Error Page
   ========================================================================== */
.error-page {
    padding: 8rem 0;
}

.error-content {
    text-align: center;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: rgba(250, 250, 250, 0.1);
    line-height: 1;
}

.error-message {
    font-size: 1.25rem;
    color: rgba(250, 250, 250, 0.6);
    margin-top: 1rem;
}

.error-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--accent);
    transition: color 0.2s;
}

.error-link:hover {
    color: var(--foreground);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination,
.articles-pagination {
    padding: 3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.pagination-link {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s;
    color: var(--foreground);
}

.pagination-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(88, 96, 102, 0.1);
}

.pagination-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* More Articles CTA */
.more-articles-cta {
    padding: 3rem 0 4rem;
    text-align: center;
}

.view-all-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    color: var(--foreground);
    transition: all 0.2s;
}

.view-all-btn:hover {
    background: var(--secondary);
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================================================
   Prose (Article Content)
   ========================================================================== */
.prose {
    color: #d4d4d4;
    line-height: 1.75;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    color: var(--foreground);
    font-weight: 600;
}

.prose h2 {
    font-size: 1.5em;
    margin-top: 2em;
    margin-bottom: 1em;
}

.prose h3 {
    font-size: 1.25em;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose ul,
.prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: var(--foreground);
}

.prose blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1em;
    font-style: italic;
    color: #e5e5e5;
}

.prose hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2em 0;
}

.prose strong {
    color: var(--foreground);
    font-weight: 600;
}

.prose code {
    background: var(--secondary);
    padding: 0.2em 0.4em;
    border-radius: 0.25em;
    font-size: 0.875em;
}

.prose pre {
    background: var(--secondary);
    padding: 1em;
    border-radius: 0.5em;
    overflow-x: auto;
}

.prose img {
    border-radius: 0.5em;
    margin: 2em 0;
}

.prose figure {
    margin: 2em 0;
}

.prose figcaption {
    text-align: center;
    font-size: 0.875em;
    color: rgba(250, 250, 250, 0.5);
    margin-top: 0.75em;
}

/* Table styles */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 0.9em;
}

.prose thead {
    border-bottom: 2px solid var(--border);
}

.prose th {
    text-align: left;
    padding: 0.75em 1em;
    font-weight: 600;
    color: var(--foreground);
    background: var(--secondary);
}

.prose td {
    padding: 0.75em 1em;
    border-bottom: 1px solid var(--border);
    color: rgba(250, 250, 250, 0.8);
}

.prose tr:last-child td {
    border-bottom: none;
}

.prose tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Ghost-specific content cards */
.kg-card {
    margin: 2em 0;
}

.kg-image-card img {
    width: 100%;
    border-radius: 0.5em;
}

.kg-width-wide {
    margin-left: -2rem;
    margin-right: -2rem;
}

.kg-width-full {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.kg-bookmark-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
}

.kg-bookmark-content {
    padding: 1.25rem;
    flex: 1;
}

.kg-bookmark-title {
    font-weight: 600;
    color: var(--foreground);
}

.kg-bookmark-description {
    font-size: 0.875rem;
    color: rgba(250, 250, 250, 0.6);
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: rgba(250, 250, 250, 0.5);
}

.kg-bookmark-icon {
    width: 16px;
    height: 16px;
}

.kg-bookmark-thumbnail {
    width: 160px;
    flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ==========================================================================
   Articles Page
   ========================================================================== */
.articles-page {
    padding: 3rem 0 5rem;
}

@media (min-width: 768px) {
    .articles-page {
        padding: 4rem 0;
    }
}

.articles-header {
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .articles-header {
        margin-bottom: 4rem;
    }
}

.articles-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .articles-title {
        font-size: 3rem;
    }
}

.articles-description {
    color: rgba(250, 250, 250, 0.6);
    font-size: 1.125rem;
}

.articles-filter {
    margin-bottom: 2.5rem;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-tag {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.2s;
}

.filter-tag:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.25);
    color: white;
}

.articles-count {
    text-align: center;
    color: var(--muted-foreground);
    font-size: 0.9rem;
    margin-top: 3rem;
}

.load-more-wrap {
    text-align: center;
    padding: 3rem 0;
}

.load-more-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover:not(:disabled) {
    background: var(--secondary);
    border-color: rgba(255, 255, 255, 0.25);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.articles-status {
    color: var(--muted-foreground);
    font-size: 0.85rem;
    margin-top: 1rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   Search Results (Ghost Portal)
   ========================================================================== */
.gh-search-results {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}


/* ==========================================================================
   Ghost Gallery Cards (Required)
   ========================================================================== */
.kg-gallery-container {
    display: flex;
    flex-direction: column;
    max-width: 1040px;
    width: 100%;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.kg-gallery-row:not(:first-of-type) {
    margin: 0.75em 0 0 0;
}

.kg-gallery-image {
    flex: 1 1 0%;
    margin: 0 0.75em 0 0;
}

.kg-gallery-image:last-of-type {
    margin-right: 0;
}

.kg-gallery-image img {
    display: block;
    margin: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Ghost Bookmark Card Author/Publisher (Required)
   ========================================================================== */
.kg-bookmark-author {
    color: rgba(250, 250, 250, 0.6);
    font-size: 0.75rem;
}

.kg-bookmark-publisher {
    color: rgba(250, 250, 250, 0.5);
    font-size: 0.75rem;
}

.kg-bookmark-author::after {
    content: "•";
    margin: 0 0.25em;
}



/* ==========================================================================
   Category Colors
   ========================================================================== */
.tag-audio, .tag-audio::before { --tag-color: #8b5cf6; }
.tag-headphones, .tag-headphones::before { --tag-color: #a855f7; }
.tag-home-theater, .tag-home-theater::before { --tag-color: #6366f1; }
.tag-smart-home, .tag-smart-home::before { --tag-color: #06b6d4; }
.tag-wearables, .tag-wearables::before { --tag-color: #14b8a6; }
.tag-home-office, .tag-home-office::before { --tag-color: #f59e0b; }
.tag-apple, .tag-apple::before { --tag-color: #64748b; }
.tag-kitchen, .tag-kitchen::before { --tag-color: #ef4444; }
.tag-climate, .tag-climate::before { --tag-color: #22c55e; }
.tag-personal-care, .tag-personal-care::before { --tag-color: #ec4899; }
.tag-reviews, .tag-reviews::before { --tag-color: #f97316; }
.tag-guides, .tag-guides::before { --tag-color: #3b82f6; }

/* ==========================================================================
   Magazine Homepage v2
   ========================================================================== */

/* Hero Grid Section - 1 big + 4 small */
.hero-grid-section {
    padding: 1.5rem 0 2rem;
}

@media (min-width: 768px) {
    .hero-grid-section {
        padding: 2rem 0 3rem;
    }
}

.hero-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 1.25rem;
    }
}

/* Main Featured Card */
.hero-main-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/10;
}

@media (min-width: 1024px) {
    .hero-main-card {
        aspect-ratio: auto;
        height: 100%;
        min-height: 480px;
    }
}

.hero-main-img {
    position: absolute;
    inset: 0;
}

.hero-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-main-card:hover .hero-main-img img {
    transform: scale(1.03);
}

.hero-main-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.2) 70%,
        transparent 100%
    );
}

.hero-main-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
}

@media (min-width: 768px) {
    .hero-main-content {
        padding: 2rem;
    }
}

.hero-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-main-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .hero-main-title {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) {
    .hero-main-title {
        font-size: 2.25rem;
    }
}

.hero-main-excerpt {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: none;
}

@media (min-width: 768px) {
    .hero-main-excerpt {
        display: block;
    }
}

.hero-main-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.hero-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Small Cards Grid */
.hero-small-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 1024px) {
    .hero-small-grid {
        gap: 1.25rem;
    }
}

.hero-small-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
}

@media (min-width: 1024px) {
    .hero-small-card {
        aspect-ratio: auto;
    }
}

.hero-small-img {
    position: absolute;
    inset: 0;
}

.hero-small-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-small-card:hover .hero-small-img img {
    transform: scale(1.05);
}

.hero-small-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
}

.hero-small-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    color: white;
}

@media (min-width: 768px) {
    .hero-small-content {
        padding: 1.25rem;
    }
}

.hero-small-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: capitalize;
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-small-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-small-title {
        font-size: 1.05rem;
    }
}

.hero-small-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.65);
}

/* Section Styling */
.magazine-section {
    padding: 3rem 0;
}

@media (min-width: 768px) {
    .magazine-section {
        padding: 4rem 0;
    }
}

.category-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.section-label {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tag-color, var(--accent));
}

.section-link {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    transition: color 0.2s;
}

.section-link:hover {
    color: var(--foreground);
}

/* Top Stories Layout */
.top-stories-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .top-stories-layout {
        grid-template-columns: 1.2fr 1fr;
        gap: 2.5rem;
    }
}

.top-story-main {
    display: block;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.top-story-main:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.top-story-img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.top-story-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.top-story-main:hover .top-story-img img {
    transform: scale(1.03);
}

.card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0.01em;
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
}

.top-story-body {
    padding: 1.5rem;
}

.top-story-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.top-story-excerpt {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.top-story-meta, .cat-card-meta, .latest-card-meta {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.meta-dot {
    color: rgba(255, 255, 255, 0.25);
}

/* Numbered Stories List */
.top-stories-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.numbered-story {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s;
}

.numbered-story:first-child {
    padding-top: 0;
}

.numbered-story:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.numbered-story:hover {
    background: transparent;
}

.story-number {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1;
    min-width: 2rem;
    text-align: center;
    padding-top: 0.25rem;
}

.numbered-story:hover .story-number {
    color: rgba(255, 255, 255, 0.7);
}

.numbered-story-content {
    flex: 1;
}

.numbered-cat {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0.01em;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.4rem;
}

.numbered-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.numbered-story:hover .numbered-title {
    color: var(--accent);
}

.numbered-meta {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.numbered-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

/* Tags Section */
.tags-section {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tags-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tags-scroll::-webkit-scrollbar {
    display: none;
}

.tag-chip {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.2s;
}

.tag-chip:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Category Grid - 3 columns max */
.category-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .category-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .category-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.cat-card-v2 {
    display: block;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cat-card-v2:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.cat-card-img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.cat-card-v2:hover .cat-card-img img {
    transform: scale(1.03);
}

.cat-card-body {
    padding: 1.25rem;
}

.cat-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-card-excerpt {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Latest with Sidebar */
.latest-with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .latest-with-sidebar {
        grid-template-columns: 2fr 1fr;
    }
}

.latest-articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .latest-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.latest-card-v2 {
    display: block;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.latest-card-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.latest-card-img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.latest-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.latest-card-v2:hover .latest-card-img img {
    transform: scale(1.02);
}

.latest-card-body {
    padding: 1.25rem;
}

.latest-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-card-excerpt {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sticky Sidebar */
.sticky-sidebar {
    position: sticky;
    top: 6rem;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-topics {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.sidebar-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.sidebar-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-badge {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
}

.topic-badge:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.subscribe-box {
    background: linear-gradient(145deg, var(--card) 0%, rgba(88, 96, 102, 0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
}

.subscribe-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.subscribe-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subscribe-text {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.subscribe-btn {
    display: block;
    background: var(--foreground);
    color: var(--background);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    transition: opacity 0.2s, transform 0.2s;
}

.subscribe-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.subscribe-note {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.75rem;
}

.sidebar-tags {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.sidebar-tags-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.sidebar-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sidebar-tag {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
    padding: 0.45rem 0.9rem;
    border-radius: 50px;
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--tag-color, #f87171);
    transition: all 0.2s;
}

.sidebar-tag:hover {
    background: rgba(30, 30, 30, 0.95);
    border-color: var(--tag-color, #f87171);
}


/* ==========================================================================
   Page with Sidebar Layout
   ========================================================================== */
.page-with-sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

@media (min-width: 1024px) {
    .page-with-sidebar {
        grid-template-columns: 1fr 320px;
        gap: 4rem;
    }
}

.page-main-content {
    min-width: 0;
}

/* ==========================================================================
   Post Layout with Sidebar
   ========================================================================== */
.post-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .post-layout {
        grid-template-columns: 1fr 320px;
        gap: 4rem;
    }
}

.post-main {
    min-width: 0;
}

/* ==========================================================================
   Sidebar Wrapper - Only Subscribe Box Sticky
   ========================================================================== */
.sidebar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.subscribe-box-sticky {
    position: static;
}

@media (min-width: 1024px) {
    .subscribe-box-sticky {
        position: sticky;
        top: 6rem;
    }
}

/* ==========================================================================
   Sidebar Stories
   ========================================================================== */
.sidebar-section {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-foreground);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.sidebar-stories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-story {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.2s;
}

.sidebar-story:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-story:hover {
    opacity: 0.8;
}

.sidebar-story-num {
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1;
    min-width: 1.5rem;
}

.sidebar-story-content {
    flex: 1;
    min-width: 0;
}

.sidebar-story-title {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-story-author {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* ==========================================================================
   Share Box
   ========================================================================== */
.share-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    margin: 1.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.share-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--foreground);
    transition: all 0.2s;
    cursor: pointer;
}

.share-btn:hover {
    background: var(--secondary);
    border-color: var(--accent);
    color: var(--accent);
}

.share-x:hover { color: #fff; background: #000; border-color: #000; }
.share-facebook:hover { color: #fff; background: #1877f2; border-color: #1877f2; }
.share-reddit:hover { color: #fff; background: #ff4500; border-color: #ff4500; }
.share-link:hover { color: var(--accent); }

/* ==========================================================================
   Comments Section
   ========================================================================== */
.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.comments-note {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.comments-signup-link {
    color: var(--foreground);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.comments-signup-link:hover {
    color: var(--accent);
}

#ghost-comments-root {
    min-height: 100px;
}

/* Ghost native comments styling */
.gh-comments {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
}

/* ==========================================================================
   Tag Page Grid Adjustments
   ========================================================================== */
.tag-page .tag-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .tag-page .tag-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Articles Page Grid Adjustments
   ========================================================================== */
.articles-page .articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .articles-page .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Author Page Grid Adjustments
   ========================================================================== */
.author-page .author-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .author-page .author-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ==========================================================================
   Subscribe Box Gradient Style
   ========================================================================== */
.subscribe-box {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9) 0%, rgba(20, 20, 20, 0.95) 100%);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: center;
}

.subscribe-icon {
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.subscribe-icon svg {
    opacity: 0.8;
}

/* ==========================================================================
   Compact Tag Badge (below image)
   ========================================================================== */
.compact-tag-badge {
    display: inline-block;
    width: auto;
    max-width: fit-content;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
    margin-top: 0.75rem;
}

/* ==========================================================================
   Ghost Portal Dark Theme Override
   ========================================================================== */
.gh-portal-popup-wrapper,
.gh-portal-popup-container {
    --ghost-accent-color: #586066 !important;
}

/* Portal popup dark styling */
[data-ghost-portal] iframe {
    color-scheme: dark !important;
}

/* Override Ghost Portal styles */
html body .gh-portal-popup-wrapper {
    background: rgba(0, 0, 0, 0.8) !important;
}

/* Dark theme for portal content */
:root {
    --ghost-portal-background: #0a0a0a;
    --ghost-portal-text: #fafafa;
}

/* ==========================================================================
   Ghost Search Dark Theme Override
   ========================================================================== */
.gh-search-modal {
    background: var(--background) !important;
    color: var(--foreground) !important;
}

.gh-search-input {
    background: var(--card) !important;
    color: var(--foreground) !important;
    border-color: var(--border) !important;
}

.gh-search-results {
    background: var(--card) !important;
}

.gh-search-result {
    color: var(--foreground) !important;
}

.gh-search-result:hover {
    background: var(--secondary) !important;
}

/* Sodo Search Dark Theme */
.sodo-search .bg-white,
.sodo-search [class*="bg-white"] {
    background: var(--background) !important;
}

.sodo-search .text-black,
.sodo-search .text-gray-900,
.sodo-search [class*="text-black"],
.sodo-search [class*="text-gray-900"] {
    color: var(--foreground) !important;
}

.sodo-search .text-gray-500,
.sodo-search .text-gray-600,
.sodo-search [class*="text-gray-500"],
.sodo-search [class*="text-gray-600"] {
    color: var(--muted-foreground) !important;
}

.sodo-search .border-gray-200,
.sodo-search [class*="border-gray"] {
    border-color: var(--border) !important;
}

.sodo-search input {
    background: var(--card) !important;
    color: var(--foreground) !important;
    border-color: var(--border) !important;
}

.sodo-search .hover\:bg-gray-100:hover,
.sodo-search [class*="hover:bg-gray"]:hover {
    background: var(--secondary) !important;
}

/* ==========================================================================
   Hide Ghost Branding
   ========================================================================== */
.gh-powered-by,
[class*="powered-by-ghost"],
.gh-portal-powered {
    display: none !important;
}

/* ==========================================================================
   Remove Borders but Keep Boxes
   ========================================================================== */
.sidebar-section,
.sidebar-card,
.top-story-main,
.top-stories-list,
.cat-card-v2,
.latest-card-v2,
.subscribe-box {
    border: none;
}

.top-story-main,
.top-stories-list,
.cat-card-v2,
.latest-card-v2 {
    background: var(--card);
    border-radius: var(--radius);
}


/* Author Location Icon */
.author-location {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.author-location svg {
    flex-shrink: 0;
    opacity: 0.6;
}


/* ==========================================================================
   Custom Portal Modal (Dark Theme) - Full Replacement
   ========================================================================== */
.portal-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.portal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.portal-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--card);
    border-radius: calc(var(--radius) * 1.5);
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.portal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
    z-index: 1;
}

.portal-close:hover {
    color: var(--foreground);
}

.portal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.portal-header-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
}

.portal-back {
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.portal-back:hover {
    color: var(--foreground);
}

.portal-title {
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.portal-subtitle {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.portal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.portal-field label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.portal-field input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: 0.9375rem;
    transition: border-color 0.2s;
}

.portal-field input:focus {
    outline: none;
    border-color: var(--accent);
}

.portal-field input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.portal-field input::placeholder {
    color: var(--muted-foreground);
}

.portal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.portal-btn-primary {
    background: var(--foreground);
    color: var(--background);
}

.portal-btn-secondary {
    background: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
}

.portal-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.portal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: none;
}

.btn-loading svg.spin {
    animation: spin 1s linear infinite;
}

.portal-message {
    font-size: 0.8125rem;
    text-align: center;
    min-height: 1.25rem;
}

.portal-error {
    color: #ef4444;
}

.portal-success {
    color: #22c55e;
}

.portal-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.portal-footer-buttons {
    display: flex;
    gap: 0.75rem;
}

.portal-footer-buttons .portal-btn {
    flex: 1;
}

.portal-btn-primary {
    background: #fff;
    color: #0a0a0a;
    border: 1px solid #fff;
}

.portal-btn-primary:hover {
    background: var(--ghost-accent-color, var(--accent));
    border-color: var(--ghost-accent-color, var(--accent));
    color: #fff;
}

.portal-btn-secondary {
    background: transparent;
    color: var(--foreground);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.portal-btn-secondary:hover {
    border-color: var(--ghost-accent-color, var(--accent));
    color: var(--ghost-accent-color, var(--accent));
}

.portal-link {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.portal-link:hover {
    color: var(--foreground);
}

/* Account View */
.portal-account-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.account-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--foreground);
    overflow: hidden;
    flex-shrink: 0;
}

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

.account-details {
    min-width: 0;
}

.account-name {
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.account-email {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-edit-btn {
    margin-left: auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: var(--foreground);
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.account-edit-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.portal-account-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.portal-action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.portal-action-btn:hover {
    border-color: var(--ghost-accent-color, var(--accent));
    color: var(--ghost-accent-color, var(--accent));
}

.portal-action-btn svg {
    flex-shrink: 0;
    opacity: 0.8;
}

.portal-action-btn:hover svg {
    opacity: 1;
}

.portal-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: var(--foreground);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.portal-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.portal-nav-item .nav-arrow {
    margin-left: auto;
    color: var(--muted-foreground);
}

/* Newsletter Preferences */
.portal-newsletters-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--radius);
    cursor: pointer;
}

.newsletter-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.newsletter-name {
    font-weight: 500;
}

.newsletter-desc {
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}

.newsletter-toggle {
    width: 44px;
    height: 24px;
    appearance: none;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.newsletter-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--foreground);
    border-radius: 50%;
    transition: transform 0.2s;
}

.newsletter-toggle:checked {
    background: var(--accent);
}

.newsletter-toggle:checked::before {
    transform: translateX(20px);
}


/* ==========================================================================
   Hero V2 Section - 3 Small Top + 1 Big Below
   ========================================================================== */
.hero-v2-section {
    padding: 1.5rem 0 2rem;
}

@media (min-width: 768px) {
    .hero-v2-section {
        padding: 2rem 0 3rem;
    }
}

/* Top Row - 3 Horizontal Cards */
.hero-top-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .hero-top-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .hero-top-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

.hero-top-card {
    display: flex;
    gap: 1rem;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hero-top-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.hero-top-img {
    width: 120px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-top-img {
        width: 140px;
        height: 110px;
    }
}

.hero-top-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.hero-top-card:hover .hero-top-img img {
    transform: scale(1.05);
}

.hero-top-content {
    flex: 1;
    padding: 0.75rem 0.75rem 0.75rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.hero-top-meta {
    font-size: 0.7rem;
    color: var(--muted-foreground);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.hero-top-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--foreground);
    transition: color 0.2s;
}

@media (min-width: 768px) {
    .hero-top-title {
        font-size: 0.95rem;
    }
}

.hero-top-card:hover .hero-top-title {
    color: var(--foreground);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
}

/* Big Full-Width Card */
.hero-big-card {
    display: block;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
}

@media (min-width: 768px) {
    .hero-big-card {
        aspect-ratio: 21/9;
    }
}

.hero-big-img {
    position: absolute;
    inset: 0;
}

.hero-big-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-big-card:hover .hero-big-img img {
    transform: scale(1.02);
}

.hero-big-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.5) 40%,
        rgba(0, 0, 0, 0.2) 70%,
        transparent 100%
    );
}

.hero-big-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
}

@media (min-width: 768px) {
    .hero-big-content {
        padding: 2rem 2.5rem;
    }
}

.hero-big-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-big-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-big-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-big-excerpt {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 0.75rem;
    line-height: 1.5;
    display: none;
}

@media (min-width: 768px) {
    .hero-big-title {
        font-size: 2rem;
    }
    
    .hero-big-excerpt {
        display: block;
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .hero-big-title {
        font-size: 2.5rem;
    }
    
    .hero-big-excerpt {
        font-size: 1.1rem;
        max-width: 600px;
    }
}

/* ==========================================================================
   Today's Highlight Section - Big Left + 3 Small Right
   ========================================================================== */
.highlight-section {
    padding: 2rem 0 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
    .highlight-section {
        padding: 3rem 0 4rem;
    }
}

.highlight-heading {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.highlight-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .highlight-grid {
        grid-template-columns: 1.3fr 1fr;
        gap: 2.5rem;
        align-items: stretch;
    }
}

/* Big Card Left */
.highlight-main {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
}

.highlight-main-img-link {
    display: block;
    position: relative;
    aspect-ratio: 16/8;
    overflow: hidden;
}

.highlight-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.highlight-main-img-link:hover .highlight-main-img {
    transform: scale(1.03);
}

.highlight-badge {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
}

.highlight-main-body {
    padding: 1.25rem;
}

@media (min-width: 768px) {
    .highlight-main-body {
        padding: 1.5rem;
    }
}

.highlight-main-meta {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.highlight-author {
    font-weight: 500;
    color: var(--foreground);
}

.highlight-main-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .highlight-main-title {
        font-size: 1.5rem;
    }
}

.highlight-main-title a {
    color: var(--foreground);
    transition: color 0.2s;
}

.highlight-main-title a:hover {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
}

.highlight-main-excerpt {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.highlight-read-more {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    transition: color 0.2s;
}

.highlight-read-more:hover {
    color: var(--accent);
}

/* 3 Horizontal Cards Right */
.highlight-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

@media (min-width: 1024px) {
    .highlight-side {
        justify-content: space-between;
    }
}

.highlight-side-card {
    display: flex;
    gap: 1rem;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    flex: 1;
}

.highlight-side-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.highlight-side-img {
    position: relative;
    width: 140px;
    flex-shrink: 0;
    overflow: hidden;
}

@media (min-width: 768px) {
    .highlight-side-img {
        width: 160px;
    }
}

.highlight-side-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.highlight-side-card:hover .highlight-side-img img {
    transform: scale(1.05);
}

.highlight-side-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: capitalize;
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
}

.highlight-side-content {
    flex: 1;
    padding: 0.75rem 0.75rem 0.75rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.highlight-side-meta {
    font-size: 0.7rem;
    color: var(--muted-foreground);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.highlight-side-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--foreground);
    transition: color 0.2s;
}

.highlight-side-card:hover .highlight-side-title {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
}

.highlight-side-excerpt {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* ==========================================================================
   Global Card Title Hover Underline Effect
   ========================================================================== */

/* All card titles - white color, accent underline on hover */
.hero-top-title,
.hero-big-title,
.highlight-main-title a,
.highlight-side-title,
.cat-card-title,
.latest-card-title,
.top-story-title,
.numbered-title,
.compact-title,
.card-title {
    color: var(--foreground);
    text-decoration: none;
    transition: text-decoration-color 0.2s;
}

.hero-top-card:hover .hero-top-title,
.hero-big-card:hover .hero-big-title,
.highlight-main-title a:hover,
.highlight-side-card:hover .highlight-side-title,
.cat-card-v2:hover .cat-card-title,
.latest-card-v2:hover .latest-card-title,
.top-story-main:hover .top-story-title,
.numbered-story:hover .numbered-title,
.article-card-compact:hover .compact-title,
.article-card:hover .card-title {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

/* ==========================================================================
   Hero & Featured Section Author Styling
   ========================================================================== */

/* Hero top cards meta */
.hero-top-meta,
.hero-big-meta,
.highlight-main-meta,
.highlight-side-meta {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.hero-top-meta span,
.hero-big-meta span,
.highlight-main-meta span,
.highlight-side-meta span {
    color: var(--muted-foreground);
}

/* Author name highlight */
.hero-top-meta span:last-child,
.highlight-main-meta .highlight-author,
.highlight-side-meta .highlight-author {
    color: var(--foreground);
    font-weight: 500;
}

/* Big hero card - white text on overlay */
.hero-big-meta {
    color: rgba(255, 255, 255, 0.7);
}

.hero-big-meta span {
    color: rgba(255, 255, 255, 0.7);
}

.hero-big-meta span:last-child {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ==========================================================================
   Tag Page - Fix Tag Badge Width
   ========================================================================== */

.tag-page .card-badge,
.tag-page .cat-card-img .card-badge,
.articles-page .card-badge {
    display: inline-block;
    width: auto;
    max-width: fit-content;
}

/* Ensure badge positioning doesn't stretch */
.cat-card-img,
.latest-card-img,
.compact-image {
    position: relative;
}

.cat-card-img .card-badge,
.latest-card-img .card-badge,
.compact-image .card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: auto;
    width: auto;
}

/* ==========================================================================
   Articles Page Card Titles
   ========================================================================== */

.articles-page .compact-title,
.articles-page .card-title {
    color: var(--foreground);
}

.articles-page .article-card-compact:hover .compact-title,
.articles-page .article-card:hover .card-title {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

/* ==========================================================================
   Author Page Card Titles
   ========================================================================== */

.author-page .compact-title,
.author-page .card-title {
    color: var(--foreground);
}

.author-page .article-card-compact:hover .compact-title,
.author-page .article-card:hover .card-title {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}

/* ==========================================================================
   Tag Page Card Titles
   ========================================================================== */

.tag-page .compact-title,
.tag-page .card-title {
    color: var(--foreground);
}

.tag-page .article-card-compact:hover .compact-title,
.tag-page .article-card:hover .card-title {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}


/* ==========================================================================
   Hero Top Cards - Author Avatar Style
   ========================================================================== */

.hero-top-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.hero-top-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.hero-top-author {
    color: var(--foreground);
    font-weight: 500;
}

.hero-top-meta .meta-dot {
    color: rgba(255, 255, 255, 0.3);
}

.hero-top-meta time {
    color: var(--muted-foreground);
}


/* ==========================================================================
   Featured Highlight - Author Avatar Style
   ========================================================================== */

.highlight-main-meta,
.highlight-side-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.highlight-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.highlight-side-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.highlight-author {
    color: var(--foreground);
    font-weight: 500;
}

.highlight-main-meta .meta-dot,
.highlight-side-meta .meta-dot {
    color: rgba(255, 255, 255, 0.3);
}


/* ==========================================================================
   Hero Big Card - Author Avatar Style
   ========================================================================== */

.hero-big-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
}

.hero-big-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.hero-big-author {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.hero-big-meta .meta-dot {
    color: rgba(255, 255, 255, 0.4);
}

.hero-big-meta time {
    color: rgba(255, 255, 255, 0.7);
}


/* ==========================================================================
   Articles/Tags/Author Page Cards - Title Underline & Tag Alignment
   ========================================================================== */

/* Card titles - white color, underline on hover (not color change) */
.articles-page .compact-title,
.tag-page .compact-title,
.author-page .compact-title,
.related-posts .compact-title,
.articles-page .card-title,
.tag-page .card-title,
.author-page .card-title,
.related-posts .card-title {
    color: var(--foreground) !important;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
    display: inline;
}

.articles-page .article-card-compact:hover .compact-title,
.tag-page .article-card-compact:hover .compact-title,
.author-page .article-card-compact:hover .compact-title,
.related-posts .article-card-compact:hover .compact-title,
.articles-page .article-card:hover .card-title,
.tag-page .article-card:hover .card-title,
.author-page .article-card:hover .card-title,
.related-posts .article-card:hover .card-title {
    color: var(--foreground) !important;
    text-decoration: underline !important;
    text-decoration-color: var(--accent) !important;
    text-underline-offset: 3px !important;
    text-decoration-thickness: 2px !important;
}

/* Tag badges - left aligned, not full width */
.articles-page .compact-tag-badge,
.tag-page .compact-tag-badge,
.author-page .compact-tag-badge,
.related-posts .compact-tag-badge,
.articles-page .card-tag,
.tag-page .card-tag,
.author-page .card-tag,
.related-posts .card-tag {
    display: inline-block;
    width: auto;
    text-align: left;
}

/* Ensure tag container doesn't stretch */
.compact-inner .compact-tag-badge,
.card-inner .card-tag {
    display: inline-block;
    width: auto;
    max-width: fit-content;
}


/* ==========================================================================
   Sidebar Story Title - Underline on Hover
   ========================================================================== */

.sidebar-story-title {
    color: var(--foreground);
    transition: text-decoration-color 0.2s;
}

.sidebar-story:hover .sidebar-story-title {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}


/* ==========================================================================
   Tag/Category Page Header V2
   ========================================================================== */

.tag-header-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .tag-header-v2 {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 2rem 0;
    }
}

.tag-header-content {
    flex: 1;
}

.tag-label-page {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.tag-name-large {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

@media (min-width: 768px) {
    .tag-name-large {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .tag-name-large {
        font-size: 4rem;
    }
}

.tag-description-v2 {
    font-size: 1.1rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 1rem;
}

.tag-count-v2 {
    font-size: 0.9rem;
    color: var(--muted-foreground);
}

.tag-header-image {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .tag-header-image {
        width: 180px;
        height: 180px;
    }
}

@media (min-width: 1024px) {
    .tag-header-image {
        width: 200px;
        height: 200px;
    }
}

.tag-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
