/* ============ RESET & VARIABLES - STUDIO DARK THEME ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    background: #0B0D10;
    color: #E9EEF5;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(64,224,255,0.03) 0%, transparent 45%),
                radial-gradient(circle at 80% 70%, rgba(64,224,255,0.03) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

body.light-mode {
    background: #F5F5F5;
    color: #1e1e1e;
}

body.light-mode .article-card,
body.light-mode .header,
body.light-mode .story-card,
body.light-mode .tool-card,
body.light-mode .simulation-card,
body.light-mode .contrast-card,
body.light-mode .checklist,
body.light-mode .color-simulator,
body.light-mode .author-bio,
body.light-mode .related-card {
    background: #FFFFFF;
    color: #1e1e1e;
    border-color: #e0e0e0;
}

body.light-mode h2, body.light-mode h3, body.light-mode .meta-item, body.light-mode p, body.light-mode li {
    color: #1e1e1e;
}

body.light-mode h2 i, body.light-mode .meta-item i {
    color: #2563eb;
}

body.light-mode .back-link,
body.light-mode .jump-dropdown select {
    background: #FFFFFF;
}

main {
    flex: 1;
    position: relative;
    z-index: 1;
    width: 100%;
}

:root {
    --primary: #40E0FF;
    --primary-dark: #00B8D4;
    --primary-light: rgba(64,224,255,0.15);
    --primary-glow: rgba(64,224,255,0.25);
    --secondary: #40E0FF;
    --accent: #00B8D4;
    --warning: #FFB74D;
    --danger: #FF5252;
    --success: #4CAF50;
    --info: #40E0FF;
    --surface-0: #0B0D10;
    --surface-1: #151A21;
    --surface-2: #1E2630;
    --surface-3: #273140;
    --text-primary: #E9EEF5;
    --text-secondary: #C0C8D2;
    --text-tertiary: #9AA5B5;
    --text-muted: #6B7A8F;
    --border: #273140;
    --border-strong: #3A4A60;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.6);
    --shadow-lg: 0 16px 32px rgba(0,0,0,0.7);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    --cyan-gradient: linear-gradient(135deg, #40E0FF, #00B8D4);
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--cyan-gradient);
    z-index: 2000;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(64,224,255,0.5);
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--cyan-gradient);
    color: #0B0D10;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 8px 0;
    font-weight: 600;
    z-index: 1001;
    transition: top 0.3s;
}

.skip-to-content:focus { top: 0; }

#toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--cyan-gradient);
    color: #0B0D10;
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    transition: transform 0.3s ease;
    max-width: 90%;
    white-space: nowrap;
}

#toast.show { transform: translateX(-50%) translateY(0); }

.container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 16px;
}

@media (min-width: 768px) { .container { margin: 40px auto; padding: 0 20px; } }

/* ===== HEADER STYLES ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11,13,16,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    width: 100%;
    transition: background-color 0.3s ease;
}

body.light-mode .header {
    background: rgba(255,255,255,0.98);
    border-bottom-color: #e0e0e0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--cyan-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0D10;
    font-size: 1.1rem;
    box-shadow: 0 0 15px rgba(64,224,255,0.3);
    transition: var(--transition);
}

.logo-link:hover .logo-icon {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 0 25px rgba(64,224,255,0.5);
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #E9EEF5;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

body.light-mode .brand-name { color: #1e1e1e; }

.brand-name span { color: #40E0FF; position: relative; }

.slogan-badge {
    display: none;
    background: rgba(64,224,255,0.1);
    color: #40E0FF;
    font-size: 0.6rem;
    padding: 4px 8px;
    border-radius: 30px;
    border: 1px solid var(--border);
    align-items: center;
    gap: 4px;
}

@media (min-width:480px) { .slogan-badge { display: inline-flex; } }

.nav-desktop { display: none; }

@media (min-width: 1024px) {
    .nav-desktop {
        display: flex;
        align-items: center;
        gap: 2px;
        margin: 0 auto;
        padding: 4px;
        background: rgba(21,26,33,0.6);
        border-radius: 60px;
        border: 1px solid var(--border);
        backdrop-filter: blur(8px);
    }
    .nav-link {
        color: #9AA5B5;
        text-decoration: none;
        font-size: 0.8rem;
        font-weight: 500;
        padding: 6px 12px;
        border-radius: 40px;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        border: 1px solid transparent;
        transition: var(--transition);
    }
    .nav-link i { font-size: 0.75rem; color: #6B7A8F; }
    .nav-link:hover {
        color: #40E0FF;
        background: rgba(64,224,255,0.1);
        border-color: rgba(64,224,255,0.2);
        transform: translateY(-1px);
    }
    .nav-link:hover i { color: #40E0FF; }
    .nav-link.active {
        background: var(--cyan-gradient);
        color: #0B0D10;
        border-color: transparent;
        box-shadow: 0 4px 12px rgba(64,224,255,0.3);
    }
    .nav-link.active i { color: #0B0D10; }
    .nav-dropdown { position: relative; }
    .dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        background: #151A21;
        border-radius: 16px;
        padding: 8px;
        min-width: 200px;
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border);
        opacity: 0;
        visibility: hidden;
        transition: all 0.2s;
        backdrop-filter: blur(12px);
    }
    .nav-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    .dropdown-menu a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 16px;
        color: #9AA5B5;
        text-decoration: none;
        font-size: 0.8rem;
        border-radius: 10px;
    }
    .dropdown-menu a i { width: 16px; color: #40E0FF; }
    .dropdown-menu a:hover {
        background: rgba(64,224,255,0.1);
        color: #40E0FF;
        transform: translateX(4px);
    }
    .dropdown-menu a.active {
        background: rgba(64,224,255,0.15);
        color: #40E0FF;
        font-weight: 600;
    }
    .new-badge {
        margin-left: auto;
        font-size: 0.55rem;
        background: #40E0FF;
        color: #0B0D10;
        padding: 2px 6px;
        border-radius: 10px;
    }
    .dropdown-group-title {
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: 700;
        color: #40E0FF;
        padding: 8px 12px 4px;
        margin-top: 4px;
        border-bottom: 1px solid var(--border);
    }
    .dropdown-group-title:first-of-type { margin-top: 0; }
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.guides-link {
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--cyan-gradient);
    color: #0B0D10;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    min-height: 40px;
    box-shadow: 0 4px 12px rgba(64,224,255,0.3);
    text-decoration: none;
}

.guides-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(64,224,255,0.4);
}

.guides-link .link-text { display: none; }

@media (min-width:768px) { .guides-link .link-text { display: inline; } }

/* Theme toggle removed */

/* Auth Button Styles */
.auth-btn {
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #1E2630;
    border: 1px solid #273140;
    color: #E9EEF5;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: var(--transition);
    height: 44px;
}

.auth-btn i { font-size: 0.8rem; color: #40E0FF; }

.auth-btn:hover {
    background: var(--cyan-gradient);
    border-color: transparent;
    color: #0B0D10;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64,224,255,0.3);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #1E2630;
    border: 1px solid #273140;
    border-radius: 60px;
    padding: 3px 3px 3px 10px;
    transition: var(--transition);
    height: 44px;
}

.user-profile:hover {
    border-color: #40E0FF;
    background: rgba(64,224,255,0.1);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cyan-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0D10;
    font-weight: 600;
    font-size: 0.9rem;
}

.sign-out-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #9AA5B5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.sign-out-btn:hover {
    color: #FF5252;
    transform: scale(1.1);
    background: rgba(255,82,82,0.1);
}

@media (max-width: 768px) {
    .auth-btn { padding: 6px 12px; height: 40px; font-size: 0.75rem; }
    .user-profile { padding: 2px 2px 2px 8px; height: 40px; }
    .user-avatar { width: 32px; height: 32px; font-size: 0.8rem; }
    .sign-out-btn { width: 32px; height: 32px; }
}

@media (max-width: 480px) {
    .auth-btn { padding: 6px 10px; height: 36px; font-size: 0.7rem; }
    .auth-btn span { display: none; }
    .auth-btn i { font-size: 0.9rem; margin: 0; }
    .user-profile { padding: 2px; height: 36px; }
    .user-avatar { width: 28px; height: 28px; font-size: 0.7rem; }
    .sign-out-btn { width: 28px; height: 28px; }
}

@keyframes profileSlideIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.user-profile { animation: profileSlideIn 0.3s ease-out; }

/* Ko-fi Button */
.kofi-link {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1E2630;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
    text-decoration: none;
    flex-shrink: 0;
}

.kofi-link:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: #40E0FF;
    background: var(--cyan-gradient);
    box-shadow: 0 5px 20px rgba(64,224,255,0.4);
}

.coffee-cup { position: relative; width: 20px; height: 20px; display: flex; justify-content: center; align-items: center; }
.cup-body { position: relative; width: 16px; height: 14px; background: linear-gradient(135deg, #FFD700, #FFA500); border-radius: 0 0 8px 8px; animation: cupFill 2s infinite alternate; }
.cup-body::before { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 10px; background: linear-gradient(135deg, #FFE55C, #FFB347); border-radius: 0 0 6px 6px; opacity: 0.8; }
.cup-handle { position: absolute; top: 2px; right: -4px; width: 4px; height: 7px; border: 2px solid #FFD700; border-left: none; border-radius: 0 4px 4px 0; opacity: 0.8; }
.coffee-liquid { position: absolute; top: -2px; left: 2px; width: 12px; height: 3px; background: linear-gradient(90deg, #8B4513, #A0522D); border-radius: 2px; animation: liquidWave 2s infinite; }
.coffee-steam { position: absolute; top: -8px; left: 4px; display: flex; gap: 2px; opacity: 0; transition: opacity 0.3s; }
.kofi-link:hover .coffee-steam { opacity: 1; }
.coffee-steam span { width: 2px; height: 8px; background: linear-gradient(to top, rgba(255,255,255,0.8), transparent); border-radius: 1px; animation: steam 1.5s infinite; }
.coffee-steam span:nth-child(1) { animation-delay: 0s; }
.coffee-steam span:nth-child(2) { animation-delay: 0.3s; }
.coffee-steam span:nth-child(3) { animation-delay: 0.6s; }

.kofi-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    background: var(--cyan-gradient);
    color: #0B0D10;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
}

.kofi-link:hover .kofi-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -40px;
    transform: translateX(-50%) scale(1);
}

.kofi-link::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: var(--cyan-gradient);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
    filter: blur(10px);
}

.kofi-link:hover::after { opacity: 0.5; }

@keyframes cupFill { 0% { transform: scaleY(1); } 100% { transform: scaleY(1.05); } }
@keyframes liquidWave { 0%,100% { transform: translateX(0) scaleX(1); } 25% { transform: translateX(1px) scaleX(1.05); } 75% { transform: translateX(-1px) scaleX(0.95); } }
@keyframes steam { 0% { transform: translateY(0) scaleX(1); opacity:0.8; } 50% { transform: translateY(-5px) scaleX(1.5); opacity:0.4; } 100% { transform: translateY(-10px) scaleX(2); opacity:0; } }

.mobile-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1E2630;
    border: 1px solid var(--border);
    display: none;
    align-items: center;
    justify-content: center;
    color: #40E0FF;
    transition: var(--transition);
    flex-shrink: 0;
    cursor: pointer;
}

.mobile-menu-btn i { font-size: 1rem; }

.mobile-menu-btn:hover {
    background: var(--cyan-gradient);
    color: #0B0D10;
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(64,224,255,0.3);
}

@media (max-width: 1024px) { .mobile-menu-btn { display: flex; } }

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: #151A21;
    z-index: 1001;
    transition: right 0.3s;
    padding: 80px 20px 20px;
    border-left: 1px solid var(--border);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

body.light-mode .mobile-menu { background: #FFFFFF; }

.mobile-menu.active { right: 0; }

.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }

.mobile-menu-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1E2630;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #40E0FF;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: var(--cyan-gradient);
    color: #0B0D10;
    transform: rotate(90deg);
}

.mobile-nav-links { display: flex; flex-direction: column; gap: 4px; }

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: #9AA5B5;
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: var(--transition);
    min-height: 48px;
}

body.light-mode .mobile-nav-link { color: #1e1e1e; }

.mobile-nav-link i { width: 20px; color: #40E0FF; }

.mobile-nav-link:hover {
    background: rgba(64,224,255,0.1);
    color: #40E0FF;
    transform: translateX(5px);
}

.mobile-nav-link.active {
    background: rgba(64,224,255,0.15);
    color: #40E0FF;
    font-weight: 600;
}

.mobile-menu-overlay {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    z-index:1000;
    opacity:0;
    visibility:hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.active { opacity:1; visibility:visible; }

@media (min-width: 768px) {
    .header-container { padding: 10px 20px; }
    .logo-icon { width: 38px; height: 38px; font-size: 1.2rem; }
    .brand-name { font-size: 1.3rem; }
    .kofi-link, .mobile-menu-btn { width: 42px; height: 42px; }
}

@media (min-width: 1024px) { .mobile-menu-btn { display: none; } }

@media (max-width: 768px) {
    .header-container { padding: 10px 14px; }
    .brand-name { font-size: 1.1rem; }
    .logo-icon { width: 34px; height: 34px; font-size: 1rem; }
    .kofi-link, .mobile-menu-btn { width: 38px; height: 38px; }
}

@media (max-width: 480px) {
    .header-container { padding: 6px 10px; gap: 4px; }
    .logo-icon { width: 30px; height: 30px; font-size: 0.9rem; }
    .brand-name { font-size: 0.95rem; }
    .slogan-badge { display: none; }
    .kofi-link, .mobile-menu-btn { width: 34px; height: 34px; }
}

@supports (padding: max(0px)) {
    .header-container, .container, .footer-container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #40E0FF;
    text-decoration: none;
    margin-bottom: 20px;
    padding: 8px 16px;
    background: #151A21;
    border-radius: 40px;
    border: 1px solid var(--border);
    transition: var(--transition);
    font-size: 0.85rem;
    width: fit-content;
    min-height: 44px;
}

@media (max-width: 480px) { .back-link { width: 100%; justify-content: center; } }

.back-link:hover {
    background: rgba(64,224,255,0.1);
    transform: translateX(-4px);
    border-color: #40E0FF;
}

.jump-dropdown-container {
    max-width: 800px;
    margin: 0 auto 20px;
    padding: 0 16px;
}

.jump-dropdown { width: 100%; }

.jump-dropdown select {
    width: 100%;
    padding: 14px 18px;
    background: #1E2630;
    border: 1px solid var(--border);
    border-radius: 40px;
    color: #E9EEF5;
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2340E0FF' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    font-family: 'Inter', sans-serif;
}

body.light-mode .jump-dropdown select {
    background: #FFFFFF;
    color: #1e1e1e;
    border-color: #e0e0e0;
}

.jump-dropdown select:focus {
    outline: none;
    border-color: #40E0FF;
    box-shadow: 0 0 0 3px rgba(64,224,255,0.2);
}

.jump-dropdown select option {
    background: #151A21;
    color: #E9EEF5;
    padding: 10px;
}

body.light-mode .jump-dropdown select option {
    background: #FFFFFF;
    color: #1e1e1e;
}

.article-card {
    background: #151A21;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: 32px 24px;
    margin: 0 0 40px;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width:768px) { .article-card { padding: 48px; } }

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(64,224,255,0.1);
    padding: 8px 16px;
    border-radius: 40px;
    border: 1px solid var(--border);
    font-size: 0.7rem;
    font-weight: 600;
    color: #40E0FF;
    margin-bottom: 24px;
}

@media (min-width:768px) { .trust-badge { padding: 8px 18px; font-size:0.75rem; margin-bottom:32px; } }

.article-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    color: #E9EEF5;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body.light-mode .article-title { color: #1e1e1e; }

@media (min-width:768px) { .article-title { font-size:2.5rem; letter-spacing:-1px; margin-bottom:24px; } }

.title-highlight {
    background: var(--cyan-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-meta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

@media (min-width:640px) { .article-meta { flex-direction: row; align-items: center; gap:24px; } }

.author { display: flex; align-items: center; gap: 12px; }

.author-avatar {
    width: 44px;
    height: 44px;
    background: var(--cyan-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0D10;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.author-info { display: flex; flex-direction: column; }

.author-name { font-weight: 700; color: #E9EEF5; font-size:0.95rem; }

body.light-mode .author-name { color: #1e1e1e; }

.author-title { font-size:0.8rem; color: #9AA5B5; }

.meta-item { display: flex; align-items: center; gap: 8px; color: #9AA5B5; font-size:0.85rem; }

.meta-item i { color: #40E0FF; width:16px; }

.last-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1E2630;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.7rem;
    color: #9AA5B5;
    border: 1px solid var(--border);
}

body.light-mode .last-updated { background: #f0f0f0; }

.last-updated i { color: #40E0FF; }

.article-subtitle {
    font-size:1rem;
    line-height:1.7;
    color: #C0C8D2;
    margin-bottom:30px;
    border-left:4px solid #40E0FF;
    padding:20px 24px;
    background: #1E2630;
    border-radius: var(--radius-lg);
    font-style:italic;
}

body.light-mode .article-subtitle {
    color: #1e1e1e;
    background: #f9f9f9;
}

.story-card {
    background: #1E2630;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
    border: 1px solid var(--border);
    border-left: 4px solid #40E0FF;
}

.story-card i { color: #40E0FF; font-size: 1.8rem; margin-bottom: 12px; }

.story-card h3 { margin-top: 0; color: #E9EEF5; }

body.light-mode .story-card h3 { color: #1e1e1e; }

h2 {
    font-size:1.6rem;
    font-weight:700;
    margin:48px 0 20px;
    color:#40E0FF;
    letter-spacing:-0.3px;
    display:flex;
    align-items:center;
    gap:12px;
    font-family:'Plus Jakarta Sans',sans-serif;
}

h2 i { color:#40E0FF; font-size:1.5rem; }

h3 {
    font-size:1.2rem;
    font-weight:600;
    margin:32px 0 16px;
    color:#E9EEF5;
}

body.light-mode h3 { color: #1e1e1e; }

p {
    margin-bottom:1.2rem;
    color:#C0C8D2;
    font-size:0.95rem;
    line-height:1.7;
}

body.light-mode p { color: #1e1e1e; }

p strong { color:#40E0FF; }

ul, ol {
    margin:20px 0 28px 24px;
    color:#C0C8D2;
}

body.light-mode ul, body.light-mode ol { color: #1e1e1e; }

li { margin-bottom:8px; }

.info-box, .tip-box, .warning-box, .success-box {
    padding:20px;
    border-radius:var(--radius-lg);
    margin:24px 0;
    border:1px solid var(--border);
}

.info-box { background: rgba(64,224,255,0.1); border-left:4px solid #40E0FF; }
.tip-box { background: #1E2630; border-left:4px solid #40E0FF; }
.warning-box { background: rgba(255,82,82,0.1); border-left:4px solid #FF5252; }
.success-box { background: rgba(76,175,80,0.1); border-left:4px solid #4CAF50; }

.info-box i, .tip-box i { color:#40E0FF; margin-right:8px; }
.warning-box i { color:#FF5252; margin-right:8px; }
.success-box i { color:#4CAF50; margin-right:8px; }

.info-box a, .tip-box a, .warning-box a, .success-box a { color:#40E0FF; font-weight:600; text-decoration:none; }

.contrast-demo {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

@media (min-width: 640px) { .contrast-demo { flex-direction: row; gap: 20px; } }

.contrast-card {
    flex: 1;
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
}

.contrast-card.bad { background: #2A2A2A; color: #7C7C7C; border: 2px solid #FF5252; }
.contrast-card.good { background: #1e1e1e; color: white; border: 2px solid #4CAF50; }
.contrast-card.warning { background: #2A281E; color: #FFD966; border: 2px solid #FFB74D; }

body.light-mode .contrast-card.bad { background: #f0f0f0; color: #7c7c7c; }
body.light-mode .contrast-card.good { background: #1e1e1e; color: white; }
body.light-mode .contrast-card.warning { background: #fff3cd; color: #856404; }

.contrast-label { font-size: 0.8rem; margin-top: 16px; padding: 6px 12px; border-radius: 30px; display: inline-block; font-weight: 600; }

.contrast-toggle {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.toggle-btn {
    padding: 10px 20px;
    background: #1E2630;
    border: 1px solid var(--border);
    border-radius: 40px;
    color: #9AA5B5;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

body.light-mode .toggle-btn { background: #f0f0f0; color: #1e1e1e; }

.toggle-btn:hover { border-color: #40E0FF; color: #40E0FF; }

.toggle-btn.active {
    background: var(--cyan-gradient);
    color: #0B0D10;
    border-color: transparent;
}

.color-simulator {
    background: #1E2630;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
    border: 1px solid var(--border);
}

body.light-mode .color-simulator { background: #f9f9f9; }

.simulator-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

@media (min-width: 640px) { .simulator-controls { flex-direction: row; align-items: flex-end; gap: 20px; } }

.color-input-group { flex: 1; }

.color-input-group label { display: block; font-size: 0.85rem; color: #9AA5B5; margin-bottom: 6px; }

.color-input-wrapper { display: flex; align-items: center; gap: 10px; }

.color-input { width: 80px; height: 40px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }

.color-text {
    flex: 1;
    padding: 10px 14px;
    background: #151A21;
    border: 1px solid var(--border);
    border-radius: 40px;
    color: #E9EEF5;
    font-size: 0.9rem;
    font-family: monospace;
}

body.light-mode .color-text { background: #FFFFFF; color: #1e1e1e; }

.simulator-result {
    background: #151A21;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

body.light-mode .simulator-result { background: #FFFFFF; }

.ratio-result { font-size: 2rem; font-weight: 700; color: #40E0FF; margin: 8px 0; }

.pass-badge { display: inline-block; padding: 6px 16px; border-radius: 40px; font-size: 0.9rem; font-weight: 600; margin-top: 8px; }
.pass-aaa { background: rgba(76,175,80,0.2); color: #4CAF50; border: 1px solid #4CAF50; }
.pass-aa { background: rgba(76,175,80,0.2); color: #4CAF50; border: 1px solid #4CAF50; }
.fail { background: rgba(255,82,82,0.2); color: #FF5252; border: 1px solid #FF5252; }

.simulation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
}

@media (min-width: 640px) { .simulation-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.simulation-card {
    background: #1E2630;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-align: center;
}

.color-box {
    width: 100%;
    height: 50px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
}

@media (min-width: 640px) { .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }

.tool-card {
    background: #1E2630;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.tool-card h4 { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: #E9EEF5; }
.tool-card i { color: #40E0FF; }
.tool-card p { font-size: 0.9rem; margin-bottom: 8px; }
.tool-card a { color: #40E0FF; font-weight: 600; text-decoration: none; }

.checklist {
    background: #1E2630;
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    margin: 32px 0;
    border: 1px solid var(--border);
}

@media (min-width:768px) { .checklist { padding: 40px; margin: 48px 0; } }

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.checklist-item:last-child { border-bottom: none; }

.checklist-item i { color: #4CAF50; font-size: 1.1rem; flex-shrink:0; }

.checklist-item span { font-size: 0.9rem; color: #C0C8D2; }

.checklist-item span strong { color: #40E0FF; }

body.light-mode .checklist-item span { color: #1e1e1e; }

.author-bio {
    background: #1E2630;
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    border: 1px solid var(--border);
}

@media (min-width:640px) { .author-bio { flex-direction: row; gap: 32px; padding: 40px; } }

.author-avatar-large {
    width: 100px;
    height: 100px;
    background: var(--cyan-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0D10;
    font-size: 2.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.author-bio h3 { margin: 0 0 8px; color: #E9EEF5; }
body.light-mode .author-bio h3 { color: #1e1e1e; }

.author-bio p { margin-bottom: 12px; color: #C0C8D2; }
body.light-mode .author-bio p { color: #1e1e1e; }

.author-bio a { color: #40E0FF; text-decoration: none; font-weight: 600; }

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
}

@media (min-width:640px) { .related-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width:1024px) { .related-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.related-card {
    background: #1E2630;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-decoration: none;
    transition: var(--transition);
    display: block;
}

.related-card:hover {
    border-color: #40E0FF;
    transform: translateY(-4px);
}

.related-card h4 { color: #E9EEF5; margin-bottom: 8px; font-size: 1rem; font-weight: 700; }
.related-card p { color: #9AA5B5; font-size: 0.85rem; margin-bottom: 12px; }
.related-card span { color: #40E0FF; font-size: 0.85rem; font-weight: 600; }

body.light-mode .related-card { background: #f9f9f9; }
body.light-mode .related-card h4 { color: #1e1e1e; }
body.light-mode .related-card p { color: #1e1e1e; }

/* ============ NEWSLETTER SECTION - STUDIO DARK THEME ============ */
.newsletter-section {
    max-width: 800px;
    margin: 40px auto;
    background: var(--surface-1);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: 40px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .newsletter-section {
        margin: 30px 16px;
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .newsletter-section {
        padding: 28px 20px;
        margin: 30px 16px;
    }
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(64, 224, 255, 0.08), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.newsletter-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(64, 224, 255, 0.05), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.newsletter-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--cyan-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .newsletter-title {
        font-size: 1.2rem;
    }
}

.newsletter-title i {
    -webkit-text-fill-color: #40E0FF;
    color: #40E0FF;
    background: none;
}

.newsletter-description {
    color: var(--text-tertiary);
    font-size: 0.95rem;
    margin-bottom: 28px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .newsletter-description {
        font-size: 0.85rem;
        margin-bottom: 24px;
    }
}

.newsletter-description strong {
    color: var(--primary);
    font-weight: 600;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 600px) {
    .newsletter-form {
        flex-direction: row;
        gap: 12px;
    }
}

.newsletter-input {
    flex: 1;
    max-width: 320px;
    padding: 14px 20px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 60px;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
    min-width: 240px;
}

@media (max-width: 600px) {
    .newsletter-input {
        width: 100%;
        max-width: 100%;
        padding: 12px 18px;
        font-size: 0.9rem;
    }
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(64, 224, 255, 0.2);
}

.newsletter-input::placeholder {
    color: var(--text-muted);
}

.newsletter-button {
    padding: 14px 28px;
    background: var(--cyan-gradient);
    border: none;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #0B0D10;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    min-width: 140px;
    justify-content: center;
}

@media (max-width: 600px) {
    .newsletter-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

.newsletter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(64, 224, 255, 0.3);
    gap: 12px;
}

.newsletter-button:active {
    transform: translateY(0);
}

/* Light mode styles for newsletter */
body.light-mode .newsletter-section {
    background: #FFFFFF;
    border-color: #e0e0e0;
}

body.light-mode .newsletter-input {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #1e1e1e;
}

body.light-mode .newsletter-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

body.light-mode .newsletter-description {
    color: #4a4a4a;
}

body.light-mode .newsletter-title {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
}

/* ============ FOOTER STYLES ============ */
#footer-container footer,
.modern-footer {
    background: var(--surface-0);
    padding: 60px 20px 40px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
}

#footer-container .footer-bottom,
.modern-footer .footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

@media (min-width: 768px) {
    #footer-container .footer-bottom,
    .modern-footer .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

#footer-container .footer-copyright,
.modern-footer .footer-copyright {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

@media (min-width: 768px) {
    #footer-container .footer-copyright,
    .modern-footer .footer-copyright {
        flex-direction: row;
        gap: 20px;
    }
}

#footer-container .footer-copyright span,
.modern-footer .footer-copyright span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

#footer-container .free-badge,
.modern-footer .free-badge {
    background: var(--cyan-gradient);
    color: #0B0D10;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

#footer-container .footer-bottom-links,
.modern-footer .footer-bottom-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

#footer-container .footer-bottom-links a,
.modern-footer .footer-bottom-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
}

#footer-container .footer-bottom-links a:hover,
.modern-footer .footer-bottom-links a:hover {
    color: var(--primary);
}

body.light-mode #footer-container footer,
body.light-mode .modern-footer {
    background: #f5f5f5;
    border-top-color: #e0e0e0;
}

body.light-mode #footer-container .footer-copyright span,
body.light-mode .modern-footer .footer-copyright span {
    color: #6b7280;
}

body.light-mode #footer-container .footer-bottom-links a,
body.light-mode .modern-footer .footer-bottom-links a {
    color: #6b7280;
}

body.light-mode #footer-container .footer-bottom-links a:hover,
body.light-mode .modern-footer .footer-bottom-links a:hover {
    color: #2563eb;
}

/* ============ TOUCH OPTIMIZATIONS ============ */
@media (max-width: 767px) {
    .mobile-nav-link, .kofi-link, .mobile-menu-btn, .guides-link,
    .toggle-btn, .back-link {
        min-height: 48px;
    }
    .simulator-controls {
        flex-direction: column;
    }
}

a:focus-visible, button:focus-visible {
    outline: 3px solid #40E0FF;
    outline-offset: 2px;
}

.seo-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}