/*
Theme Name: Invoice Generator
Theme URI: https://invoicegenerator.us.com
Author: Invoice Generator Team
Author URI: https://invoicegenerator.us.com
Description: A mind-blowing, premium "Tech Luxury" blog theme. 
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: invoicegenerator
*/

/* ============================
   DESIGN TOKENS & VARIABLES
   ============================ */
:root {
    /* Color Palette - Luxury Tech */
    --color-bg: #FCFCF9;       /* Soft Cream */
    --color-surface: #FFFFFF;
    --color-text-main: #111111; /* Obsidian */
    --color-text-dim: #555555;
    --color-primary: #4F46E5;  /* Indigo Accent */
    --color-accent: #6366F1;
    --color-border: rgba(17, 17, 17, 0.08);
    --color-glass: rgba(255, 255, 255, 0.7);
    
    /* Typography */
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Animation Easings */
    --ease-premium: cubic-bezier(0.23, 1, 0.32, 1);
    --duration-slow: 0.8s;
    --duration-medium: 0.4s;
    
    /* spacing */
    --container-width: 1320px;
    --container-mid: 1240px;
    --container-narrow: 800px;
    --section-padding: 60px;
    --radius-pill: 9999px;
    --radius-lg: 24px;
    --radius-md: 12px;
}

/* Dark Mode Fallback / Toggle class */
body.dark-mode {
    --color-bg: #0A0A0A;       /* Pure Black */
    --color-surface: #121212;
    --color-text-main: #F8FAFC;
    --color-text-dim: #94A3B8;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-glass: rgba(0, 0, 0, 0.7);
}

/* ============================
   BASE STYLES
   ============================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--duration-medium) ease;
}

h1, h2, h3, h4, .editorial-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a { text-decoration: none; color: inherit; transition: all var(--duration-medium) var(--ease-premium); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 60px;
}

.container-mid {
    max-width: var(--container-mid);
    margin: 0 auto;
    padding: 0 60px;
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 60px;
}

/* ============================
   ANIMATIONS (INFRASTRUCTURE)
   ============================ */
.reveal-init {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity var(--duration-slow) var(--ease-premium), 
                transform var(--duration-slow) var(--ease-premium);
}
.is-revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ============================
   HEADER (PILL-STYLE REDESIGN)
   ============================ */
.navbar-wrapper {
    position: fixed;
    top: 24px;
    left: 0;
    width: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    padding: 0 60px;
    transition: transform 0.4s var(--ease-premium);
}

.navbar-pill {
    background: var(--color-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    width: 100%;
    max-width: var(--container-width);
}

.nav-left, .nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-right { justify-content: flex-end; gap: 24px; }

/* Brand */
.nav-brand-lux {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text-main);
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.2);
}

/* Centered Menu */
.nav-center {
    flex: 2;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
    align-items: center;
}

.nav-menu a {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu a:hover { color: var(--color-text-main); }
.nav-menu .chevron { opacity: 0.5; }

/* Actions & Buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    border-right: 1px solid var(--color-border);
    padding-right: 20px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--color-text-dim);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover { background: rgba(0,0,0,0.05); color: var(--color-text-main); }
.dark-mode .action-btn:hover { background: rgba(255,255,255,0.05); }

.btn-buy {
    background: var(--color-primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s var(--ease-premium);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.15);
}

.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(79, 70, 229, 0.25); }

@media (max-width: 1024px) {
    .nav-center { display: none; }
    .navbar-pill { padding: 0 24px; }
}


/* ============================
   HERO (EDITORIAL)
   ============================ */
.hero-wrapper {
    min-height: 60vh;
    padding-top: 100px;
    padding-bottom: 40px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-shape {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    filter: blur(100px);
    z-index: -1;
    animation: flow 20s infinite alternate var(--ease-premium);
}

@keyframes flow {
    from { transform: translate(0,0); }
    to { transform: translate(-10%, 10%); }
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 5.5rem);
    margin-bottom: 32px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--color-text-dim);
    max-width: 500px;
    margin-bottom: 48px;
}

.hero-image-block {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.1);
}
.hero-image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease-premium);
}
.hero-image-block:hover img { transform: scale(1.05); }

/* ============================
   EDITORIAL GRID
   ============================ */
.section-title {
    font-size: 32px;
    margin: var(--section-padding) 0 40px;
    text-align: left;
}

.editorial-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 40px;
    margin-bottom: var(--section-padding);
}

.story-card {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.story-card.featured { grid-column: span 8; }

.card-image {
    position: relative;
    aspect-ratio: 16/11;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-surface);
}

.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease-premium); }
.story-card:hover .card-image img { transform: scale(1.05); }

.card-metadata {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 8px;
    display: flex;
    gap: 16px;
    font-weight: 700;
}

.card-title { font-size: 24px; margin-bottom: 12px; font-weight: 500; }
.featured .card-title { font-size: 32px; }

/* ============================
   NEWSLETTER (TECH LUXURY)
   ============================ */
.newsletter-section {
    padding: var(--section-padding) 0;
}
.newsletter-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.newsletter-container h3 { font-size: 32px; margin-bottom: 16px; font-weight: 400; }
.newsletter-container p { color: var(--color-text-dim); margin-bottom: 40px; }

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 12px;
}

.newsletter-form input {
    flex: 1;
    background: #f1f3f4;
    border: 1px solid transparent;
    padding: 18px 24px;
    border-radius: var(--radius-md);
    font-family: inherit;
    transition: all 0.3s;
}
.newsletter-form input:focus { outline: none; border-color: var(--color-primary); background: #fff; box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1); }

.newsletter-form button {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 18px 32px;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}
.newsletter-form button:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2); }

/* ============================
   SINGLE POST (READING EXPERIENCE)
   ============================ */
/* ============================
   ADVANCED SINGLE POST (READ NEXT / NO NOISE)
   ============================ */

.post-entry-header {
    padding: 120px 0 40px;
    text-align: center;
}

.breadcrumbs-modern {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-dim);
    margin-bottom: 24px;
}
.breadcrumbs-modern span { margin: 0 8px; opacity: 0.5; }
.breadcrumbs-modern .current { color: var(--color-text-main); font-weight: 700; }

.category-tag-lux {
    color: var(--color-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 13px;
    display: block;
    margin-bottom: 16px;
}

.post-title-jumbo {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    font-weight: 800;
    margin-bottom: 32px;
    letter-spacing: -0.03em;
}

.post-excerpt-lux {
    font-size: 20px;
    color: var(--color-text-dim);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* ============================
   TOOLS CTA GRID
   ============================ */
.tools-cta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    margin-bottom: 12px;
}

.tool-cta-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-main);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.tool-cta-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.15);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.tool-cta-card .tool-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--color-text-dim);
    transition: all 0.3s ease;
}

.tool-cta-card:hover .tool-icon {
    background: linear-gradient(135deg, #4f46e5 0%, #a855f7 100%);
    color: #fff;
}

.tool-cta-card .tool-name {
    white-space: nowrap;
}

/* Primary Tool Highlight */
.tool-cta-card.tool-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border-color: transparent;
    color: #fff;
}

.tool-cta-card.tool-primary .tool-icon {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.tool-cta-card.tool-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.35);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .tools-cta-grid {
        gap: 8px;
    }
    .tool-cta-card {
        padding: 8px 14px;
        font-size: 13px;
    }
    .tool-cta-card .tool-icon {
        width: 28px;
        height: 28px;
    }
    .tool-cta-card .tool-icon svg {
        width: 16px;
        height: 16px;
    }
}

.post-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    max-width: 900px;
    margin: 0 auto;
}

.author-block {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
}

.meta-separator { width: 4px; height: 4px; border-radius: 50%; background: var(--color-border); }

.meta-info-group {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--color-text-dim);
    font-weight: 500;
}

.share-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.share-label { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; opacity: 0.5; }
.share-icons { display: flex; gap: 8px; }
.share-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-dim);
    transition: all 0.3s;
}
.share-btn:hover { border-color: var(--color-text-main); color: var(--color-text-main); background: #f8fafc; }

.post-featured-hero {
    max-width: 900px;
    margin: 0 auto 60px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.1);
    aspect-ratio: 16 / 9;
}
.post-featured-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 3-Column Body Grid */
.body-grid-lux {
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: 48px;
    padding-bottom: 80px;
    width: 100%;
    margin: 0 auto;
}

.sidebar-sticky-wrap {
    position: sticky;
    top: 120px;
}

/* Left Sidebar */
.reading-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    margin-bottom: 40px;
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.reading-progress-track {
    height: 4px;
    background: #f1f5f9;
    border-radius: 2px;
    overflow: hidden;
}

.reading-progress-fill {
    height: 100%;
    background: var(--color-primary);
    width: 30%; /* Will be animated by JS */
}

.toc-modern .toc-title {
    font-size: 11px;
    letter-spacing: 0.2em;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--color-text-dim);
}

.toc-list-wrap ul { list-style: none; padding: 0; }
.toc-list-wrap li { margin-bottom: 16px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.toc-list-wrap a { color: var(--color-text-dim); transition: all 0.3s; }
.toc-list-wrap a:hover, .toc-list-wrap a.active { color: var(--color-text-main); }
.toc-list-wrap a.active { padding-left: 12px; border-left: 2px solid var(--color-primary); }

/* Center Content */
.body-content-center {
    max-width: 720px;
}

.content-break-cta {
    margin: 80px 0;
}

.content-cta-card {
    padding: 48px;
    border-radius: 16px;
    border: 2px solid;
    border-image: linear-gradient(135deg, #4f46e5, #a855f7) 1;
    background: #fff;
}

.content-cta-card h3 { font-size: 24px; margin-bottom: 24px; line-height: 1.4; }
.btn-learn {
    display: inline-block;
    padding: 12px 32px;
    background: #f1f5f9;
    color: var(--color-text-main);
    font-weight: 700;
    border-radius: 8px;
    font-size: 14px;
}

/* Right Sidebar (Spotlight) */
.widget-label {
    font-size: 11px;
    letter-spacing: 0.2em;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--color-text-dim);
}

.spotlight-list { display: flex; flex-direction: column; gap: 32px; }

.spotlight-item {
    display: flex;
    gap: 20px;
    align-items: start;
    text-decoration: none;
}

.item-cat { color: var(--color-primary); font-weight: 700; font-size: 11px; margin-bottom: 8px; display: block; }
.item-title { font-size: 15px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; color: var(--color-text-main); }
.item-date { font-size: 12px; color: var(--color-text-dim); }
.item-thumb { width: 80px; height: 80px; flex-shrink: 0; border-radius: 12px; overflow: hidden; }
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }

.thought-trail-cta {
    margin-top: 60px;
    background: linear-gradient(135deg, #4f46e5 0%, #312e81 100%);
    border-radius: 20px;
    padding: 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.cta-tag { font-size: 10px; font-weight: 800; background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 100px; display: flex; align-items: center; gap: 6px; width: fit-content; margin-bottom: 20px; }
.thought-trail-cta h3 { font-size: 28px; margin-bottom: 12px; color: #fff; }
.thought-trail-cta p { opacity: 0.8; font-size: 14px; margin-bottom: 24px; line-height: 1.5; }

.btn-explore {
    display: block;
    width: 100%;
    padding: 14px;
    background: #fff;
    color: var(--color-primary);
    text-align: center;
    font-weight: 700;
    border-radius: 10px;
    font-size: 14px;
}

/* Read Next */
.read-next-section { padding: 100px 0; background: #fcfcfd; border-top: 1px solid var(--color-border); }
.section-label { font-size: 11px; letter-spacing: 0.2em; font-weight: 800; margin-bottom: 40px; text-align: left; }
.read-next-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.next-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: transform 0.3s;
}
.next-card:hover { transform: translateY(-10px); }
.card-image { aspect-ratio: 16/10; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-content { padding: 32px; }
.card-cat { font-size: 12px; font-weight: 700; color: var(--color-primary); margin-bottom: 12px; display: block; }
.card-title { font-size: 20px; font-weight: 800; margin-bottom: 12px; line-height: 1.3; }
.card-excerpt { font-size: 15px; color: var(--color-text-dim); margin-bottom: 24px; line-height: 1.6; }
.card-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f1f5f9; padding-top: 20px; }
.card-footer .author { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; }
.card-footer .date { font-size: 12px; color: var(--color-text-dim); }

/* No Noise Section */
.no-noise-section { padding: 140px 0; text-align: center; }
.no-noise-visual { display: flex; justify-content: center; align-items: center; gap: -40px; margin-bottom: 60px; }
.visual-card { width: 220px; height: 280px; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,0.15); border: 4px solid #fff; transition: transform 0.5s; }
.visual-card img { width: 100%; height: 100%; object-fit: cover; }
.card-1 { transform: rotate(-10deg) translateX(40px); z-index: 1; }
.card-2 { transform: scale(1.1); z-index: 2; width: 260px; height: 320px; }
.card-3 { transform: rotate(10deg) translateX(-40px); z-index: 1; }

.no-noise-content .loop-tag { font-size: 12px; font-weight: 800; color: var(--color-primary); background: #f5f3ff; padding: 6px 16px; border-radius: 100px; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.no-noise-content h2 { font-size: 64px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.04em; }
.no-noise-content p { font-size: 18px; color: var(--color-text-dim); margin-bottom: 48px; }

.no-noise-form { display: flex; gap: 12px; max-width: 500px; margin: 0 auto; background: #fff; padding: 8px; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.05); border: 1px solid var(--color-border); }
.no-noise-form input { flex: 1; border: none; padding: 0 20px; font-size: 16px; outline: none; }
.no-noise-form button { background: var(--color-primary); color: #fff; border: none; padding: 14px 32px; border-radius: 10px; font-weight: 700; cursor: pointer; transition: background 0.3s; }
.no-noise-form button:hover { background: #4338ca; }

/* Dark Mode Adjustments */
.dark-mode .reading-card, 
.dark-mode .content-cta-card,
.dark-mode .next-card,
.dark-mode .no-noise-form { background: #161618; border-color: #2a2a2c; }
.dark-mode .next-card:hover { background: #1c1c1e; }
.dark-mode .btn-learn { background: #2a2a2c; color: #fff; }
.dark-mode .no-noise-section { background: #000; }
.dark-mode .visual-card { border-color: #1a1a1c; }

/* Post Footer Refinement */
.post-footer-modern {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}

.footer-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.dark-mode .meta-left .stats-group { color: var(--color-text-dim); }

.meta-right .updated-date {
    font-size: 13px;
    color: var(--color-text-dim);
    font-weight: 500;
}

.share-actions-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 24px 32px;
    border-radius: 16px;
    margin-bottom: 48px;
}

.dark-mode .share-actions-bottom { background: #161618; border: 1px solid var(--color-border); }

/* Prev/Next Navigation Tiles */
.prev-next-posts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 40px;
}

.nav-tile {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition: all 0.3s var(--ease-premium);
    align-items: center;
    text-decoration: none;
}

.nav-tile:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.dark-mode .nav-tile { background: #121212; }

.tile-thumb { width: 70px; height: 70px; flex-shrink: 0; border-radius: 12px; overflow: hidden; }
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; }

.tile-content { display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.nav-label { font-size: 10px; font-weight: 800; color: var(--color-primary); display: flex; align-items: center; gap: 6px; text-transform: uppercase; }
.tile-title { font-size: 15px; font-weight: 700; color: var(--color-text-main); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: block; }

.entry-content-lux p { margin-bottom: 40px; }
.entry-content-lux h2 { font-size: 32px; margin: 60px 0 24px; font-weight: 600; }
.entry-content-lux img { border-radius: var(--radius-md); max-width: 100%; height: auto; margin: 40px 0; }

.reading-progress-bar {
    position: fixed;
    top: 0; left: 0;
    height: 4px;
    background: var(--color-primary);
    z-index: 2000;
    width: 0%;
    transition: width 0.1s ease;
}

/* ============================
   FOOTER
   ============================ */
.site-footer {
    padding: 100px 0 60px;
    border-top: 1px solid var(--color-border);
}
.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
}
.footer-brand { font-size: 24px; font-weight: 800; margin-bottom: 24px; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 32px; color: var(--color-text-dim); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 16px; font-size: 15px; color: var(--color-text-dim); }
.footer-col li a:hover { color: var(--color-text-main); }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1320px) {
    /* Tighten Layout for smaller desktops */
    :root { 
        --container-width: 94%;
        --container-mid: 94%; 
    }
    .body-grid-lux { grid-template-columns: 1fr 300px; gap: 40px; }
    .body-sidebar-left { display: none; }
}

@media (max-width: 1024px) {
    /* Tablet Portrait / Small Laptops */
    .hero-container { grid-template-columns: 1fr; }
    .hero-title { font-size: 3.5rem; }
    
    .body-grid-lux { grid-template-columns: 1fr; gap: 32px; }
    .body-sidebar-right { display: none; }
    
    .read-next-grid { grid-template-columns: 1fr; }
    .no-noise-content h2 { font-size: 40px; }
    .no-noise-visual { display: none; }
    
    .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* Mobile Devices */
    :root {
        --section-padding: 60px; /* Keep vertical spacing generous */
    }

    .container, 
    .container-mid, 
    .container-narrow,
    .navbar-wrapper { 
        padding: 0 20px; 
    }

    /* Adjust Navbar for Mobile */
    .navbar-pill { padding: 0 20px; height: 60px; }
    .nav-right .nav-cta { display: none; } /* Hide heavy CTA on mobile if needed */
    
    /* Hero Adjustments */
    .hero-title { font-size: 2.2rem; }
    .post-meta-row { flex-direction: column; align-items: flex-start; gap: 16px; }
    
    /* Grid Adjustments */
    .prev-next-posts { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; gap: 40px; }
    .story-card, .story-card.featured { grid-column: span 12; }
    
    /* Typography & Spacing */
    .entry-content-lux h2 { font-size: 28px; margin-top: 48px; }
    .post-entry-header { padding-top: 100px; padding-bottom: 40px; }
}
/* ============================
   SEARCH OVERLAY
   ============================ */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-premium);
}

.search-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

.search-modal {
    width: 100%;
    max-width: 800px;
    padding: 0 40px;
    position: relative;
    text-align: center;
}

.search-close-btn {
    position: absolute;
    top: -100px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-main);
    padding: 10px;
    transition: transform 0.3s;
}

.search-close-btn:hover { transform: rotate(90deg) scale(1.1); }

.search-field-lux {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--color-border);
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text-main);
    padding: 20px 0;
    outline: none;
    text-align: center;
    transition: border-color 0.3s;
}

.search-field-lux:focus { border-color: var(--color-primary); }

.search-hint {
    margin-top: 20px;
    color: var(--color-text-dim);
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

@media (max-width: 768px) {
    .search-field-lux { font-size: 24px; }
    .search-close-btn { top: -60px; }
}

/* ============================
   DYNAMIC LOGOS
   ============================ */
.custom-logo {
    display: block;
    height: auto;
    max-height: 40px; /* Adjust based on navbar height */
    width: auto;
}

/* Default Behavior: Show Desktop, Hide Mobile */
.logo-desktop { display: block; }
.logo-mobile { display: none; }

/* Mobile Only: Show Mobile, Hide Desktop */
@media (max-width: 768px) {
    .logo-desktop { display: none; }
    .logo-mobile { display: block; }

    /* If only one logo exists, show it always */
    .logo-desktop:only-child { display: block !important; }
    .logo-mobile:only-child { display: block !important; }
}

/* Desktop Only: Ensure single mobile logo shows on desktop if it's the only one (edge case) */

/* ============================
   MOBILE MENU DRAWER
   ============================ */
.hamburger-menu {
    display: none; /* Hidden on Desktop */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.hamburger-menu span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-main);
    transition: 0.3s;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.mobile-menu-drawer.is-active {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--color-border);
}

.drawer-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-main);
}

.drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-main);
}

.drawer-content {
    padding: 24px;
    overflow-y: auto;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    margin-bottom: 20px;
    opacity: 0;
    transform: translateX(20px);
    transition: 0.4s var(--ease-premium);
}

.mobile-menu-drawer.is-active .mobile-nav-list li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-nav-list a {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-main);
    text-decoration: none;
    display: block;
}

/* Delay for staggered animation */
.mobile-menu-drawer.is-active .mobile-nav-list li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-drawer.is-active .mobile-nav-list li:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-drawer.is-active .mobile-nav-list li:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-drawer.is-active .mobile-nav-list li:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu-drawer.is-active .mobile-nav-list li:nth-child(5) { transition-delay: 0.5s; }

/* Mobile Adjustments */
@media (max-width: 768px) {
    /* Hide Desktop Elements */
    .nav-center { display: none; }
    .nav-actions { display: none; } 

    /* Show Hamburger */
    .hamburger-menu { display: flex; }

    /* Layout: Logo - Button - Hamburger */
    .navbar-pill {
        justify-content: space-between;
        padding: 0 16px;
    }
    
    .nav-right {
        gap: 12px;
    }
    
    /* Ensure button is visible but maybe smaller? */
    .btn-buy {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* ============================
   RESPONSIVE BUTTON TEXT
   ============================ */

/* Default: Desktop */
.btn-text-desktop { display: inline; }
.btn-text-mobile { display: none; }

@media (max-width: 768px) {
    /* Mobile: Toggle */
    .btn-text-desktop { display: none; }
    .btn-text-mobile { display: inline; }
}

/* ============================
   VOICE READ BUTTON
   ============================ */
.btn-voice-read {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-sub);
    cursor: pointer;
    transition: all 0.2s var(--ease-premium);
    width: 100%;
    justify-content: center;
}

.btn-voice-read:hover {
    background: var(--color-bg-card);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.btn-voice-read.is-playing {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.btn-voice-read.is-paused {
    background: var(--color-bg-alt);
    border-color: var(--color-primary);
    color: var(--color-primary);
    animation: pulse-border 2s infinite;
}

.voice-icon {
    display: flex;
    align-items: center;
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* ============================
   AUTHOR BOX (CUSTOMIZER)
   ============================ */
.author-box-lux {
    margin-top: 60px;
    margin-bottom: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border);
}

.author-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.author-socials {
    display: flex;
    gap: 12px;
}

.author-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-bg-alt);
    border-radius: 6px;
    color: var(--color-text-sub);
    transition: all 0.2s var(--ease-premium);
}

.author-social-link:hover {
    background: #e0f2fe; /* Light Blue */
    color: #0284c7; /* Brand Blue */
    transform: translateY(-2px);
}

.author-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: -0.02em;
}

.author-card {
    display: flex;
    gap: 24px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s var(--ease-premium);
}

.author-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-soft);
}

.author-avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-display-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-main);
    margin-bottom: 8px;
}

.author-bio-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-sub);
    margin: 0;
}

@media (max-width: 600px) {
    .author-card {
        flex-direction: column;
        align-items: center; /* or flex-start */
        text-align: center;
    }
}


/* ============================
   AUTHOR PAGE TEMPLATE
   ============================ */
.author-hero-wrapper {
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    padding: 80px 0 60px;
    margin-bottom: 40px;
}

.author-hero-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.author-hero-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: center;
    border: 4px solid var(--color-bg-main);
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

.author-hero-name {
    font-size: 48px; /* Jumbo size */
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    color: var(--color-text-main);
}

.author-hero-bio {
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text-sub);
    margin-bottom: 24px;
}

.author-hero-socials {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.hero-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color-bg-alt);
    border-radius: 12px;
    color: var(--color-text-sub);
    transition: all 0.2s var(--ease-premium);
}

.hero-social-link:hover {
    background: #e0f2fe;
    color: #0284c7;
    transform: translateY(-2px);
}

/* Adjust grid for author page simplicity */
.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}
/* ============================
   STICKY SIDEBAR
   ============================ */
.sidebar-sticky-wrap {
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 120px; /* Header height + spacing */
    z-index: 10;
}

.sidebar-author {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
    background: linear-gradient(135deg, #fafafa 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.05);
}

.sidebar-author img,
.sidebar-author-img,
.sidebar-author .avatar {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.sidebar-author-text {
    font-size: 15px;
    color: #64748b;
    white-space: nowrap;
}

.sidebar-author-text a {
    color: #0ea5e9;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar-author-text a:hover {
    color: #0284c7;
    text-decoration: underline;
}

/* ============================
   AUTHOR PAGE PREMIUM
   ============================ */

.author-page-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 80px;
    gap: 80px;
    padding-bottom: 80px;
    padding-bottom: 80px;
}

.author-profile-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 140px; /* Increased top spacing */
    text-align: left;
    padding: 32px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.author-profile-avatar-wrap {
    margin-bottom: 24px;
    display: flex;
    justify-content: flex-start;
}

.author-profile-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); /* Deeper shadow */
    border: 4px solid #fff;
    background: #f1f5f9;
    transition: transform 0.3s ease;
}

.author-profile-img:hover {
    transform: scale(1.05); /* Subtle zoom on avatar */
}

.author-profile-name {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    color: var(--color-text-main);
    letter-spacing: -0.02em;
}

.author-profile-role {
    font-size: 16px;
    color: var(--color-text-sub);
    margin-bottom: 24px;
    font-weight: 500;
}

.author-profile-bio {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-main);
    margin-bottom: 24px;
}

.author-profile-social a {
    display: inline-flex;
    margin-right: 12px;
    color: var(--color-text-sub);
    transition: color 0.2s;
}

.author-profile-social a:hover { color: var(--color-primary); }


/* Main Content Sections */
.section-label {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 32px;
    display: block;
    color: var(--color-text-main);
}

/* Featured Story Card */
.featured-story-section { margin-bottom: 80px; }

.featured-story-card {
    display: block;
    background: #fff;
    border-radius: 24px; /* More rounded */
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--color-border);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* Smooth spring-like transition */
}

.featured-story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.12); /* Lift effect */
}

.feat-card-link { text-decoration: none; display: block; }

.feat-card-image {
    height: 420px;
    width: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease; /* Slower zoom for background */
}

.featured-story-card:hover .feat-card-image {
    transform: scale(1.03);
}

.feat-card-content {
    padding: 32px;
}

.feat-cat {
    text-transform: uppercase;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: block;
}

.feat-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text-main);
    margin-bottom: 16px;
    line-height: 1.3;
}

.feat-excerpt {
    font-size: 16px;
    color: var(--color-text-sub);
    margin-bottom: 24px;
    line-height: 1.6;
}

.read-more-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.read-more-link svg { transition: transform 0.2s; }
.featured-story-card:hover .read-more-link svg { transform: translateX(4px); }


/* Latest Stories Grid */
.latest-stories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.story-s-card {
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}

.story-s-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.story-s-link {
    text-decoration: none;
    display: flex;
    padding: 24px;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.story-s-thumb img {
    width: 100px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
}

.story-s-meta {
    font-size: 11px;
    line-height: 1.25rem;
    color: var(--color-text-dim);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.story-s-title {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .author-page-layout { grid-template-columns: 1fr; gap: 40px; }
    .author-profile-sticky { position: static; text-align: center; }
    .author-profile-avatar-wrap { justify-content: center; }
    .author-profile-social { justify-content: center; display: flex; }
    .latest-stories-grid { grid-template-columns: 1fr; }
}

/* ============================
   INFINITE SCROLL
   ============================ */
.infinite-scroll-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(79, 70, 229, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animation for newly loaded posts */
.story-item.animated {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
