/*
Theme Name: Sinematik
Theme URI: https://sinematik.pixaquant.com
Author: PixaQuant
Author URI: https://pixaquant.com
Description: Premium WordPress theme for technology companies, software studios, and digital agencies. Features an immersive 3D WebGL particle system background powered by Three.js, glassmorphism UI components, 4 page templates (Homepage, Services, About, Contact), full WordPress Customizer integration, WooCommerce support, Elementor compatibility, RTL support, and translation readiness. Dark blue/cyberpunk color palette for a professional and modern look.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sinematik
Tags: one-column, two-columns, three-columns, four-columns, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-width-template, theme-options, threaded-comments, translation-ready, blog, e-commerce, rtl-language-support
*/

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --color-bg: #0a1628;
    --color-surface: #111d35;
    --color-primary: #00d4ff;
    --color-secondary: #7b61ff;
    --color-text: #e2e8f0;
    --color-muted: #94a3b8; /* slate-400 — WCAG AA 7.07:1 on #0a1628 (was #64748b, 3.81:1) */
    --color-accent: #f59e0b;
    --color-border: rgba(0, 212, 255, 0.15);
    --color-glow: rgba(0, 212, 255, 0.4);
    --glass-bg: rgba(17, 29, 53, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 16px;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

html.light-mode * {
    scrollbar-color: rgba(0,0,0,0.15) transparent;
}

html.light-mode *::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
}

html.light-mode *::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

ul, ol {
    list-style: none;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ============================================
   GLASSMORPHISM CARDS
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all var(--transition-base);
}

/* Pricing badge — inline-block shrink-to-fit */
.badge-popular {
    display: inline-block;
}

.glass-card:hover {
    border-color: var(--color-border);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.08);
    transform: translateY(-4px);
}

/* ============================================
   NEON GLOW EFFECTS
   ============================================ */
.neon-glow {
    box-shadow: 0 0 15px var(--color-glow),
                0 0 45px rgba(0, 212, 255, 0.15);
}

.neon-text {
    text-shadow: 0 0 10px var(--color-glow),
                 0 0 40px rgba(0, 212, 255, 0.2);
}

/* ============================================
   BUTTONS
   ============================================ */
/* Button variants — target <a> inside wp-block-button wrapper */
.wp-block-button.btn-primary .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #ffffff;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-size: 1rem;
}

.wp-block-button.btn-primary .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
    color: #ffffff;
}

/* Standalone primary button — plain <a>/<button>/<input> elements that are NOT
   inside a wp-block-button wrapper (header & mobile CTA, 404, footer, search,
   services, portfolio archive, WooCommerce add-to-cart, comment submit, cookie
   accept, CTA widget). Gutenberg buttons keep their own styling via the
   .wp-block-button.btn-primary .wp-block-button__link rule above; the
   :not(.wp-block-button) guard prevents that wrapper from being double-styled. */
.btn-primary:not(.wp-block-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #ffffff;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.2;
}

.btn-primary:not(.wp-block-button):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
    color: #ffffff;
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--color-accent), #ef4444);
    color: #ffffff;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-size: 1rem;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.3);
    color: #ffffff;
}

.wp-block-button.btn-outline .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid var(--color-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-size: 1rem;
}

.wp-block-button.btn-outline .wp-block-button__link:hover {
    background: var(--color-primary);
    color: var(--color-bg);
}

/* Standalone outline button — plain <a>/<button> (front-page secondary CTA,
   cookie decline). Gutenberg outline buttons are styled above and excluded via
   :not(.wp-block-button) to avoid double-styling the wrapper. */
.btn-outline:not(.wp-block-button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid var(--color-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.2;
}

.btn-outline:not(.wp-block-button):hover {
    background: var(--color-primary);
    color: var(--color-bg);
}

/* ============================================
   SECTION DIVIDERS
   ============================================ */
.section-divider-top {
    border-top: 1px solid var(--glass-border);
}
.section-divider-both {
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

/* ============================================
   INFO CARD (flex layout via CSS class)
   ============================================ */
.info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ============================================
   SECTION HEADINGS
   ============================================ */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
}

.navbar a {
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color var(--transition-base);
}

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

/* ============================================
   DARK MODE TOGGLE BUTTON
   ============================================ */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1.125rem;
    color: var(--color-text);
}

.theme-toggle-btn:hover {
    border-color: var(--color-primary);
    background: var(--glass-bg);
    color: var(--color-primary);
}

html.light-mode .theme-toggle-btn {
    color: var(--color-text);
    border-color: var(--glass-border);
}

html.light-mode .theme-toggle-btn:hover {
    border-color: var(--color-primary);
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1.25rem;
    color: var(--color-text);
    padding: 0;
    line-height: 1;
}

.menu-toggle:hover {
    border-color: var(--color-primary);
    background: var(--glass-bg);
    color: var(--color-primary);
}

.menu-toggle[aria-expanded="true"] {
    border-color: var(--color-primary);
    background: rgba(0, 212, 255, 0.1);
    color: var(--color-primary);
}

html.light-mode .menu-toggle {
    color: var(--color-text);
    border-color: var(--glass-border);
}

html.light-mode .menu-toggle:hover {
    border-color: var(--color-primary);
}

/* ============================================
   FOOTER WIDGETS
   ============================================ */
.footer-widget-col .widget {
    margin-bottom: 0;
}

.footer-widget-col .widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget-col .widget ul li {
    margin-bottom: 0.5rem;
}

.footer-widget-col .widget ul li a {
    color: var(--color-muted);
    font-size: 0.875rem;
    transition: color var(--transition-base);
}

.footer-widget-col .widget ul li a:hover {
    color: var(--color-primary);
}

.footer-widget-col .widget p {
    color: var(--color-muted);
    font-size: 0.875rem;
    line-height: 1.75;
}

.footer-widget-col .widget img {
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

html.light-mode footer {
    border-top-color: var(--glass-border);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 15px var(--color-glow); }
    50% { box-shadow: 0 0 30px var(--color-glow), 0 0 60px rgba(0, 212, 255, 0.15); }
}

@keyframes count-up {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
    opacity: 0;
}

/* ============================================
   PAGE TEMPLATES COMMON
   ============================================ */
.page-hero {
    padding-top: 10rem;
    padding-bottom: 5rem;
    text-align: center;
    position: relative;
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

/* ============================================
   THREE.JS CANVAS
   ============================================ */
#three-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .glass-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.75rem;
    }

    .page-hero {
        padding-top: 8rem;
        padding-bottom: 3rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: var(--color-muted);
}

.text-accent {
    color: var(--color-accent);
}

.bg-surface {
    background-color: var(--color-surface);
}

.overflow-hidden {
    overflow: hidden;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-bg);
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    z-index: 10000;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Page transition fade-in */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--color-bg, #0a1628);
    z-index: 99999;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.35s ease;
}
.page-transition.is-loaded {
    opacity: 0;
}

/* Screen reader text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--color-primary);
    clip: auto !important;
    clip-path: none;
    color: var(--color-bg);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Focus visible styles — keyboard only, not mouse click */
*:focus {
    outline: none;
}

/* ============================================
   LIGHT MODE
   ============================================ */
html.light-mode {
    --color-bg: #f1f5f9;
    --color-surface: #ffffff;
    --color-primary: #0891b2;
    --color-secondary: #7c3aed;
    --color-text: #1e293b;
    --color-muted: #475569;
    --color-accent: #d97706;
    --color-border: rgba(8, 145, 178, 0.2);
    --color-glow: rgba(8, 145, 178, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
}

html.light-mode body {
    background-color: var(--color-bg);
    color: var(--color-text);
}

html.light-mode h1,
html.light-mode h2,
html.light-mode h3,
html.light-mode h4,
html.light-mode h5,
html.light-mode h6 {
    color: #0f172a;
}

html.light-mode .text-white {
    color: #0f172a;
}

html.light-mode .text-\[var\(--color-muted\)\],
html.light-mode [class*="color-muted"] {
    color: var(--color-muted);
}

html.light-mode .section-title {
    background: linear-gradient(135deg, #0f172a 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

html.light-mode .navbar a {
    color: var(--color-text);
}

html.light-mode .navbar.scrolled {
    background: rgba(241, 245, 249, 0.9);
}

html.light-mode .wp-block-button.btn-primary .wp-block-button__link {
    color: #ffffff;
}

html.light-mode .wp-block-button.btn-outline .wp-block-button__link {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

html.light-mode .wp-block-button.btn-outline .wp-block-button__link:hover {
    color: #ffffff;
}

html.light-mode #theme-toggle-icon {
    color: var(--color-text);
}

/* Light-mode footer readability */
html.light-mode footer {
    background-color: #e2e8f0;
    border-top-color: rgba(0, 0, 0, 0.1);
}

html.light-mode footer h4,
html.light-mode footer .text-white {
    color: #0f172a;
}

html.light-mode footer p,
html.light-mode footer a,
html.light-mode footer span,
html.light-mode footer li {
    color: var(--color-muted);
}

html.light-mode footer a:hover {
    color: var(--color-primary);
}

/* Light-mode glass cards */
html.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
}

/* Light-mode back-to-top */
html.light-mode .back-to-top {
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.3);
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    #three-canvas {
        display: none;
    }

    .animate-fade-in-up,
    .animate-fade-in,
    .animate-slide-in-left,
    .reveal,
    .stat-item,
    .timeline-item {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   ACCESSIBILITY — KEYBOARD FOCUS STYLES
   ============================================ */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.theme-toggle-btn:focus-visible {
    outline-offset: 4px;
    border-radius: 50%;
}

.btn-primary:focus-visible,
.btn-accent:focus-visible,
.btn-outline:focus-visible {
    outline-offset: 3px;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
    border-color: var(--color-primary);
}

a:focus-visible {
    outline-offset: 2px;
    border-radius: 2px;
}

/* Skip to content link */
.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100000;
    background: var(--color-primary);
    color: var(--color-bg);
    padding: 0.75rem 1.5rem;
    text-align: center;
    font-weight: 700;
    clip: auto;
    height: auto;
    width: auto;
}

/* ============================================
   PAGINATION
   ============================================ */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--color-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-base);
    backdrop-filter: blur(var(--glass-blur));
}

.nav-links .page-numbers:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
}

.nav-links .page-numbers.current {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 20px var(--color-glow);
}

.nav-links .page-numbers.dots {
    border: none;
    background: none;
    color: var(--color-muted);
    cursor: default;
}

.nav-links .page-numbers.dots:hover {
    box-shadow: none;
    color: var(--color-muted);
}

.nav-links .page-numbers.prev,
.nav-links .page-numbers.next {
    font-size: 0.75rem;
}

html.light-mode .nav-links .page-numbers {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

html.light-mode .nav-links .page-numbers:hover {
    border-color: var(--color-primary);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.5);
}

/* ============================================
   FLOATING CONTACT DRAWER
   ============================================ */
.floating-drawer {
    position: fixed;
    z-index: 998;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    /* bottom is set via inline style from customizer */
}

/* Right (default) */
.floating-drawer--right {
    right: 0;
}

/* Left */
.floating-drawer--left {
    left: 0;
}

/* Toggle button — sits at the bottom of the stack */
.floating-drawer__toggle {
    position: relative;
    z-index: 2;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 20px var(--color-glow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.floating-drawer--right .floating-drawer__toggle {
    margin-right: 0.75rem;
}

.floating-drawer--left .floating-drawer__toggle {
    margin-left: 0.75rem;
}

.floating-drawer__toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(0, 212, 255, 0.5);
}

/* Icon swap: show chat icon, hide close */
.floating-drawer__toggle .fa-times {
    display: none;
}

.floating-drawer.is-open .floating-drawer__toggle .fa-comment-dots {
    display: none;
}

.floating-drawer.is-open .floating-drawer__toggle .fa-times {
    display: inline-block;
}

/* Panel — expands upward from toggle */
.floating-drawer__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.75rem) scaleY(0.8);
    transform-origin: center bottom;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.floating-drawer.is-open .floating-drawer__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scaleY(1);
    pointer-events: auto;
}

/* Individual item */
.floating-drawer__item {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.floating-drawer__item:hover {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    border-color: transparent;
    transform: scale(1.15);
    box-shadow: 0 4px 16px var(--color-glow);
}

/* Light mode adjustments */
html.light-mode .floating-drawer__item {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--color-text);
}

html.light-mode .floating-drawer__item:hover {
    color: #fff;
}

/* Staggered item animation — reverse order so first item appears first */
.floating-drawer__item:nth-last-child(1) { transition-delay: 0.03s; }
.floating-drawer__item:nth-last-child(2) { transition-delay: 0.06s; }
.floating-drawer__item:nth-last-child(3) { transition-delay: 0.09s; }
.floating-drawer__item:nth-last-child(4) { transition-delay: 0.12s; }
.floating-drawer__item:nth-last-child(5) { transition-delay: 0.15s; }
.floating-drawer__item:nth-last-child(6) { transition-delay: 0.18s; }

/* ============================================
   STICKY SIDEBAR
   ============================================ */
@media (min-width: 1024px) {
    .sticky-sidebar {
        position: sticky;
        top: 5rem;
        align-self: start;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
        scrollbar-width: thin;
    }
    .sticky-sidebar::-webkit-scrollbar {
        width: 4px;
    }
    .sticky-sidebar::-webkit-scrollbar-track {
        background: transparent;
    }
    .sticky-sidebar::-webkit-scrollbar-thumb {
        background: var(--glass-border);
        border-radius: 4px;
    }
}

/* ============================================
   SEARCH HIGHLIGHT
   ============================================ */
mark.search-highlight {
    background: rgba(0, 212, 255, 0.25);
    color: var(--color-primary);
    padding: 1px 3px;
    border-radius: 3px;
}

html.light-mode mark.search-highlight {
    background: rgba(8, 145, 178, 0.15);
}

/* ============================================
   TABLE OF CONTENTS (TOC)
   ============================================ */
.sinematik-toc {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sinematik-toc__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: 0;
}

.sinematik-toc__title {
    font-weight: 700;
    font-size: 0.95rem;
}

.sinematik-toc__icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: var(--color-muted);
}

.sinematik-toc.is-collapsed .sinematik-toc__icon {
    transform: rotate(180deg);
}

.sinematik-toc__list {
    margin-top: 1rem;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.25s ease;
    max-height: 800px;
    opacity: 1;
}

.sinematik-toc.is-collapsed .sinematik-toc__list {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.sinematik-toc__list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sinematik-toc__list li {
    margin-bottom: 0.35rem;
}

.sinematik-toc__list a {
    color: var(--color-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
}

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

.sinematik-toc__list li.sinematik-toc__sub {
    padding-left: 1.25rem;
}

.sinematik-toc__list li.sinematik-toc__sub::before {
    content: '─';
    color: var(--glass-border);
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

/* ============================================
   SHARE BUTTONS
   ============================================ */
.share-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.share-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.share-copy-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: var(--color-primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.share-copy.is-copied .share-copy-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.share-copy.is-copied {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
    box-shadow: 0 0 8px var(--color-glow);
}

html.light-mode .reading-progress {
    box-shadow: 0 1px 4px rgba(8, 145, 178, 0.3);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.8125rem;
    color: var(--color-muted);
}

.breadcrumbs a {
    color: var(--color-muted);
    text-decoration: none;
    transition: color var(--transition-base);
}

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

.breadcrumbs .separator {
    color: var(--glass-border);
    font-size: 0.625rem;
}

.breadcrumbs .current {
    color: var(--color-primary);
    font-weight: 500;
}

/* ============================================
   AUTHOR BOX
   ============================================ */
.author-box {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    margin-top: 2rem;
}

.author-box .author-avatar {
    flex-shrink: 0;
}

.author-box .author-avatar img {
    border-radius: 50%;
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border: 2px solid var(--color-primary);
}

.author-box .author-info h4 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.author-box .author-info p {
    color: var(--color-muted);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.author-box .author-info .author-role {
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* ============================================
   RELATED POSTS
   ============================================ */
.related-posts {
    margin-top: 3rem;
}

.related-posts h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

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

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

.related-post-card {
    border-radius: 1rem;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    transition: all var(--transition-base);
}

.related-post-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.related-post-card img {
    width: 100%;
    height: 10rem;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post-card:hover img {
    transform: scale(1.05);
}

.related-post-card .post-info {
    padding: 1rem;
}

.related-post-card .post-info span {
    color: var(--color-primary);
    font-size: 0.6875rem;
    font-family: var(--font-mono);
}

.related-post-card .post-info h4 {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.375rem;
    line-height: 1.4;
}

.related-post-card .post-info h4 a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

.related-post-card .post-info h4 a:hover {
    color: var(--color-primary);
}

/* ============================================
   PAGE LOADER
   ============================================ */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader .spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--glass-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   ADMIN BAR — DARK STYLING (no hiding)
   ============================================ */
#wpadminbar {
    background: linear-gradient(135deg, #0a1628 0%, #111d35 100%);
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

#wpadminbar .ab-top-menu > li:hover > .ab-item,
#wpadminbar .ab-top-menu > li:hover > .ab-item a {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

#wpadminbar .ab-top-menu > li > .ab-item,
#wpadminbar .ab-top-menu > li > .ab-item span {
    color: #e2e8f0;
}

/* ============================================
   WORDPRESS ALIGNMENT & CAPTION CLASSES
   ============================================ */
.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/*
 * Alignment: safe by default.
 *
 * Full-bleed breakouts only apply inside a .full-width-content wrapper, which
 * must itself sit in the centered .container so the calc(-50vw + 50%) math
 * resolves against a viewport-centered box. In every other context (sidebar
 * layouts, post columns, etc.) alignwide/alignfull simply fill the content
 * column — no horizontal overflow.
 */
.alignwide,
.alignfull {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

.alignfull {
    width: 100%;
}

/* Opt-in full-bleed context (used by the default full-width page template). */
.full-width-content .alignwide {
    margin-left: -4rem;
    margin-right: -4rem;
    max-width: calc(100% + 8rem);
}

.full-width-content .alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

/* Safety net: 100vw includes the scrollbar width — clip the sliver so full-
 * width pages never produce a horizontal scrollbar. Applied to the document
 * element only (not body) so position: sticky sidebars keep working on
 * sidebar layouts, which never trigger this overflow anyway. */
html {
    overflow-x: hidden;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption img[class*="wp-image-"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: var(--color-muted, #94a3b8);
    text-align: center;
    padding: 0.5rem 0;
    margin: 0;
}

.bypostauthor {
    /* Author highlight — extend as needed */
}

.sticky {
    /* Sticky post highlight */
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ============================================
   WORDPRESS GALLERY
   ============================================ */
.gallery {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }

.gallery-item {
    margin: 0 !important;
    overflow: hidden;
    border-radius: 0.75rem;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none !important;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    font-size: 0.75rem;
    color: var(--color-muted);
    text-align: center;
    padding: 0.5rem 0.25rem 0;
}

@media (max-width: 768px) {
    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   CORE WIDGET STYLES
   ============================================ */
/* Tag Cloud */
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.widget_tag_cloud .tagcloud a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem !important;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--color-muted);
    text-decoration: none;
    transition: all var(--transition-base);
}

.widget_tag_cloud .tagcloud a:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.1);
}

/* Calendar Widget */
.widget_calendar table {
    width: 100%;
    border-collapse: collapse;
}

.widget_calendar caption {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: center;
}

.widget_calendar th,
.widget_calendar td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--glass-border);
    font-size: 0.8125rem;
}

.widget_calendar th {
    background: var(--glass-bg);
    color: var(--color-primary);
    font-weight: 600;
}

.widget_calendar td {
    color: var(--color-muted);
}

.widget_calendar td a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}

.widget_calendar td a:hover {
    text-decoration: underline;
}

.widget_calendar td#today {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    border-radius: 0.375rem;
    font-weight: 700;
}

.widget_calendar td#today a {
    color: #fff;
}

/* Recent Comments Widget */
.widget_recent_comments ul {
    list-style: none;
    padding: 0;
}

.widget_recent_comments li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.875rem;
    color: var(--color-muted);
}

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

.widget_recent_comments a {
    color: var(--color-primary);
    text-decoration: none;
}

.widget_recent_comments a:hover {
    text-decoration: underline;
}

/* RSS Widget */
.widget_rss ul {
    list-style: none;
    padding: 0;
}

.widget_rss li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
}

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

.widget_rss .rsswidget {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    display: block;
    margin-bottom: 0.25rem;
}

.widget_rss .rsswidget:hover {
    color: var(--color-primary);
}

.widget_rss .rss-date,
.widget_rss .rssSummary {
    font-size: 0.8125rem;
    color: var(--color-muted);
}

/* Pages / Meta / Archives widgets */
.widget_pages ul,
.widget_meta ul,
.widget_archive ul,
.widget_nav_menu ul {
    list-style: none;
    padding: 0;
}

.widget_pages li,
.widget_meta li,
.widget_archive li,
.widget_nav_menu li {
    padding: 0.375rem 0;
}

.widget_pages a,
.widget_meta a,
.widget_archive a,
.widget_nav_menu a {
    color: var(--color-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-base);
}

.widget_pages a:hover,
.widget_meta a:hover,
.widget_archive a:hover,
.widget_nav_menu a:hover {
    color: var(--color-primary);
}

/* Search widget in sidebar */
.widget_search .search-form {
    position: relative;
}

.widget_search .search-submit {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-muted);
    cursor: pointer;
    transition: color var(--transition-base);
}

.widget_search .search-submit:hover {
    color: var(--color-primary);
}

/* ============================================
   JPEG QUALITY OPTIMIZATION
   ============================================ */
/* (Applied via PHP in functions.php) */

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 12pt;
        line-height: 1.5;
    }

    /* Hide non-essential elements */
    #three-canvas,
    .navbar,
    .back-to-top,
    .reading-progress,
    .page-loader,
    #cookie-banner,
    .theme-toggle-btn,
    .mobile-menu,
    .menu-toggle,
    footer,
    .sidebar,
    aside,
    .wp-block-button.btn-primary,
    .wp-block-button.btn-outline,
    .slider-dots,
    .partners-track,
    .skip-link,
    .floating-drawer,
    .sinematik-lightbox {
        display: none !important;
    }

    /* Links — show URL */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        font-weight: normal;
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    /* Headings */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
        color: #000 !important;
    }

    h1 { font-size: 24pt; }
    h2 { font-size: 18pt; }
    h3 { font-size: 14pt; }

    /* Images */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Articles */
    article {
        page-break-inside: avoid;
    }

    /* Glass cards become simple bordered boxes */
    .glass-card {
        border: 1px solid #ccc !important;
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        border-radius: 0 !important;
        background: #fff !important;
    }

    /* Section titles */
    .section-title {
        border-bottom: 2px solid #000 !important;
        padding-bottom: 0.25rem !important;
    }

    /* Main content full width */
    main {
        padding-top: 0 !important;
    }

    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Page break before new sections */
    section {
        page-break-inside: avoid;
    }

    /* Pagination */
    .nav-links,
    .back-to-top {
        display: none !important;
    }
}

/* ============================================
   PASSWORD-PROTECTED POST FORM
   ============================================ */
.post-password-form {
    max-width: 480px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    text-align: center;
}

.post-password-form p {
    color: var(--color-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.post-password-form label {
    display: block;
    color: var(--color-text);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.post-password-form input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: rgba(10, 22, 40, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--color-text);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color var(--transition-base);
}

.post-password-form input[type="password"]:focus {
    border-color: var(--color-primary);
    outline: 2px solid rgba(0, 212, 255, 0.2);
}

.post-password-form input[type="submit"] {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.post-password-form input[type="submit"]:hover {
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
    transform: translateY(-1px);
}

/* ============================================
   POST PAGE-LINKS (MULTI-PAGE PAGINATION)
   ============================================ */
.page-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.page-links::before {
    content: "Pages:";
    color: var(--color-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.page-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--color-muted);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: all var(--transition-base);
}

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

.page-links > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
}

/* ============================================
   EMBED BLOCKS (YouTube, Vimeo, Spotify, etc.)
   ============================================ */
.wp-block-embed {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin: 2rem 0;
}

.wp-block-embed iframe {
    display: block;
    border-radius: 1rem;
}

.wp-block-embed figcaption {
    text-align: center;
    color: var(--color-muted);
    font-size: 0.8125rem;
    padding: 0.75rem 1rem;
    margin-top: 0 !important;
}

.wp-block-embed-twitter .wp-block-embed__wrapper,
.wp-block-embed-instagram .wp-block-embed__wrapper {
    padding: 1.5rem;
    background: var(--glass-bg);
    border-radius: 1rem;
}

/* ============================================
   CODE BLOCK (FRONTEND)
   ============================================ */
.wp-block-code {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin: 2rem 0;
}

.wp-block-code code {
    display: block;
    padding: 1.5rem;
    background: var(--color-surface);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    overflow-x: auto;
    color: var(--color-text);
}

/* ============================================
   VERSE BLOCK
   ============================================ */
.wp-block-verse {
    font-style: italic;
    color: var(--color-muted);
    padding: 1.5rem 2rem;
    border-left: 3px solid var(--color-primary);
    background: var(--glass-bg);
    border-radius: 0 0.75rem 0.75rem 0;
    margin: 2rem 0;
    line-height: 1.8;
}

/* ============================================
   HTML CORE BLOCKS (FRONTEND)
   ============================================ */
.wp-block-details {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

.wp-block-details summary {
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0;
}

.wp-block-details summary:hover {
    color: var(--color-primary);
}

.wp-block-group.has-border-color {
    border-radius: 1rem;
    overflow: hidden;
}

/* Light mode overrides */
html.light-mode .wp-block-code code {
    background: #f8fafc;
    color: #1e293b;
}

html.light-mode .wp-block-verse {
    background: rgba(255, 255, 255, 0.8);
    color: #475569;
}

html.light-mode .wp-block-details {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

/* ============================================
   BLOCK STYLES — Gutenberg Editor Variants
   ============================================ */

/* Button — Glass */
.is-style-glass.wp-block-button__link,
.is-style-glass .wp-block-button__link {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.is-style-glass.wp-block-button__link:hover,
.is-style-glass .wp-block-button__link:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--color-primary, #00d4ff);
    color: #fff;
}

/* Quote — Glass Card */
.is-style-glass.wp-block-quote,
.is-style-glass .wp-block-quote {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 0.75rem;
    padding: 2rem;
    border-left: 3px solid var(--color-primary, #00d4ff);
}

/* Separator — Gradient */
.is-style-gradient.wp-block-separator {
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary, #00d4ff), var(--color-secondary, #7b61ff), var(--color-accent, #f59e0b));
    border: none;
}

/* Pullquote — Glass */
.is-style-glass.wp-block-pullquote {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    padding: 2rem;
}

.is-style-glass.wp-block-pullquote blockquote {
    border: none;
}

/* Image — Glass Frame */
.is-style-glass-frame .wp-block-image__placeholder,
.is-style-glass-frame img {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
}

/* Group — Glass Card */
.is-style-glass.wp-block-group {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    padding: 2rem;
}

/* ============================================
   ACCESSIBILITY — WCAG Focus Styles
   ============================================ */

/* Remove default outline, add visible focus ring for keyboard users */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--color-primary, #00d4ff);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Links */
a:focus-visible {
    outline-offset: 3px;
}

/* Buttons & inputs */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary, #00d4ff);
    outline-offset: 2px;
}

/* Nav menu items */
.nav-menu a:focus-visible,
.main-navigation a:focus-visible {
    outline-offset: 4px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 4px;
}

/* Skip link — always visible when focused */
.skip-link:focus-visible {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100001;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary, #00d4ff);
    color: #0a1628;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 0.5rem 0;
}

/* Card hover focus */
.glass-card:focus-within {
    border-color: var(--color-primary, #00d4ff);
    box-shadow: 0 0 0 1px var(--color-primary, #00d4ff);
}

/* Dropdown / toggle focus */
.mobile-menu-toggle:focus-visible {
    outline: 2px solid var(--color-primary, #00d4ff);
    outline-offset: 2px;
    background: rgba(0, 212, 255, 0.15);
}

/* ============================================
   IMAGE LIGHTBOX
   ============================================ */
.sinematik-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sinematik-lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.sinematik-lightbox__img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sinematik-lightbox.is-active .sinematik-lightbox__img {
    transform: scale(1);
}

.sinematik-lightbox__close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 1;
}

.sinematik-lightbox__close:hover {
    opacity: 1;
}

html.light-mode .sinematik-lightbox {
    background: rgba(0, 0, 0, 0.75);
}

/* ============================================
   REDUCED MOTION — Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .glass-card:hover {
        transform: none;
    }

    .reading-progress {
        transition: none;
    }

    #three-canvas {
        display: none;
    }

    .page-transition {
        display: none;
    }
}
