* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    /* Enhanced Dark Mode Palette */
    --nav-height: 84px;
    --primary-bg: #0f1419;
    --secondary-bg: #1a1f2e;
    --card-bg: #242938;
    --elevated-bg: #2d3748;

    /* Blue Accent System */
    --primary-blue: #4a9eff;
    --accent-blue: #64b5f6;
    --light-blue: #90caf9;
    --blue-glow: rgba(74, 158, 255, 0.15);

    /* Muted Green Palette */
    --sage-green: #9caf88;
    --olive-green: #8b956d;
    --moss-green: #7a8471;
    --muted-mint: #a8c09a;
    --eucalyptus: #87a96b;
    --forest-green: #5d6e52;

    /* Professional Accent Colors */
    --success-green: #4caf50;
    --warning-amber: #ff9800;
    --error-red: #f44336;
    --info-cyan: #00bcd4;

    /* Text Colors */
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #5f6368;
    --text-inverse: #202124;

    /* Borders and Effects */
    --border-subtle: #3c4043;
    --border-emphasis: #5f6368;
    --divider: rgba(255, 255, 255, 0.12);

    /* Shadows and Glows */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.5);
    --glow-blue: 0 0 20px rgba(74, 158, 255, 0.3);
    --glow-subtle: 0 0 10px rgba(74, 158, 255, 0.15);
    --glow-green: 0 0 15px rgba(156, 175, 136, 0.2);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-bg);
    overflow-x: hidden;
    padding-top: var(--nav-height);
}

section {
    scroll-margin-top: calc(var(--nav-height) + 20px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Pixel Art Icon Styles */
.pixel-art-icon {
    width: 32px;
    height: 32px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.pixel {
    position: absolute;
    width: 4px;
    height: 4px;
    left: calc(var(--x) * 4px);
    top: calc(var(--y) * 4px);
}

.pixel.sky {
    background-color: transparent;
}

.pixel.cloud {
    background-color: rgba(232, 234, 237, 0.8);
}

.pixel.star {
    background-color: rgba(144, 202, 249, 0.9);
}

.pixel.hill {
    background-color: var(--sage-green);
}

.pixel.person {
    background-color: #8b4513;
}

.pixel.laptop {
    background-color: #5f6368;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    /* Ensure consistent header height */
}

.nav-logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-blue), var(--sage-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    order: 1;
    /* Text first */
}

.logo-icon {
    position: relative;
    width: 32px;
    height: 32px;
    order: 2;
    /* Icon after text */
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo-image {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    object-fit: contain;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--sage-green));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:focus {
    outline: none;
    color: var(--text-primary);
}

.nav-link:focus::after {
    width: 0;
}

/* Hero Section with Anime Background and Grid */
.hero {
    min-height: 100vh;
    background: url('anime_hero_final.png') center center / cover no-repeat;
    display: flex;
    align-items: flex-start;
    position: relative;
    overflow: visible;
    padding-top: 80px;
    padding-bottom: 60px;
}

/* Grid overlay with soft gradient */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        /* Grid pattern */
        linear-gradient(rgba(74, 158, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 158, 255, 0.04) 1px, transparent 1px),
        /* Soft color gradient */
        radial-gradient(ellipse at 20% 30%, rgba(74, 158, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(156, 175, 136, 0.06) 0%, transparent 50%);
    background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
    pointer-events: none;
    z-index: 2;
}

/* Lighter dark overlay to show anime background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(15, 20, 25, 0.5) 0%,
        rgba(26, 31, 46, 0.35) 50%,
        rgba(15, 20, 25, 0.5) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Hero text panel - dark transparent container, left-aligned */
.hero-text {
    background: rgba(15, 20, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin-top: 8vh;
    justify-self: start;
}

.hero-content {
    width: 100%;
    padding: 0 2% 0 40px;
    display: grid;
    grid-template-columns: minmax(480px, 600px) 1fr;
    gap: 2rem;
    align-items: start;
    justify-content: start;
    position: relative;
    z-index: 3;
    min-height: calc(100vh - 140px);
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title-main {
    display: block;
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(74, 158, 255, 0.3);
}

.title-accent {
    display: block;
    background: linear-gradient(135deg, var(--sage-green), var(--muted-mint));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.8rem;
}

.title-sub {
    display: block;
    color: var(--text-primary);
    font-size: 2.2rem;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    justify-content: space-between;
    align-items: flex-start;
}

.stat {
    text-align: center;
    flex: 1;
    min-width: 0;
}

.stat-number {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-blue), var(--sage-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cta-button {
    background: linear-gradient(135deg, var(--sage-green), var(--muted-mint));
    color: var(--text-primary);
    border: 1px solid rgba(156, 175, 136, 0.3);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glow-green);
    position: relative;
    overflow: hidden;
}


.cta-button:hover {
    box-shadow: 0 0 25px rgba(156, 175, 136, 0.4);
    transform: translateY(-2px);
}

/* Tech grid container - positioned on the right under the boy/screens */
.hero-visual {
    background: transparent;
    padding: 1rem;
    align-self: end;
    justify-self: end;
    margin-bottom: 8%;
    margin-right: 2%;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.tech-item {
    padding: 0.9rem 0.5rem;
    background: rgba(15, 20, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 12px;
    color: var(--primary-blue);
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    width: 165px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Alternating blue/green colors for skill pills */
.tech-item:nth-child(even) {
    border-color: rgba(156, 175, 136, 0.2);
    color: var(--sage-green);
}

.tech-item:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(74, 158, 255, 0.25);
    border-color: rgba(74, 158, 255, 0.4);
}

.tech-item:nth-child(even):hover {
    box-shadow: 0 8px 24px rgba(156, 175, 136, 0.25);
    border-color: rgba(156, 175, 136, 0.4);
}

/* Floating Wave Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-18px);
    }
}

/* Apply wave animation with staggered delays */
.floating-element {
    animation: float 4s ease-in-out infinite;
}

.floating-element:nth-child(2) { animation-delay: -1s; }
.floating-element:nth-child(3) { animation-delay: -2s; }
.floating-element:nth-child(4) { animation-delay: -0.5s; }
.floating-element:nth-child(5) { animation-delay: -1.5s; }
.floating-element:nth-child(6) { animation-delay: -2.5s; }
.floating-element:nth-child(7) { animation-delay: -0.3s; }
.floating-element:nth-child(8) { animation-delay: -1.3s; }
.floating-element:nth-child(9) { animation-delay: -2.3s; }
.floating-element:nth-child(10) { animation-delay: -0.8s; }
.floating-element:nth-child(11) { animation-delay: -1.8s; }
.floating-element:nth-child(12) { animation-delay: -2.8s; }

/* Services Section with grid background */
.services {
    padding: 6rem 0;
    background: var(--secondary-bg);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(rgba(156, 175, 136, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(156, 175, 136, 0.02) 1px, transparent 1px),
        radial-gradient(ellipse at 30% 20%, rgba(156, 175, 136, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(74, 158, 255, 0.06) 0%, transparent 50%);
    background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
    pointer-events: none;
    z-index: 0;
}

.services .container {
    position: relative;
    z-index: 1;
}

/* Services grid - no wrapper panel */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Modal panel style for individual cards */
.modal-panel {
    background: rgba(15, 20, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.modal-panel:hover {
    border-color: rgba(74, 158, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(74, 158, 255, 0.15);
    transform: translateY(-4px);
}

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--text-primary), var(--sage-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sage-green), transparent);
}

/* Additional services-grid layout properties */

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--sage-green), var(--muted-mint));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    background: var(--elevated-bg);
    border-color: var(--sage-green);
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
}

.service-card:hover::before {
    opacity: 1;
}

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

.service-card h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--sage-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    position: relative;
}

.service-card h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--sage-green);
    transition: width 0.3s ease;
}

.service-card:hover h3::after {
    width: 100%;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.service-features {
    list-style: none;
}

.service-features li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--sage-green);
    font-size: 0.8rem;
}

/* Artifacts Section - Reddit-style list */
.artifacts {
    padding: 6rem 0;
    background: var(--primary-bg);
    position: relative;
}

.artifacts::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(rgba(74, 158, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 158, 255, 0.02) 1px, transparent 1px),
        radial-gradient(ellipse at 70% 30%, rgba(74, 158, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(156, 175, 136, 0.06) 0%, transparent 50%);
    background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
    pointer-events: none;
    z-index: 0;
}

.artifacts .container {
    position: relative;
    z-index: 1;
}

.artifacts .section-title {
    background: linear-gradient(135deg, var(--text-primary), var(--muted-mint));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Artifacts list - 2-column grid on desktop, 1 on mobile */
.artifacts-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.artifact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    background: rgba(15, 20, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.artifact-item:hover {
    background: rgba(74, 158, 255, 0.08);
    border-color: rgba(74, 158, 255, 0.4);
    transform: translateY(-2px);
}

.artifact-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    flex: 1;
    line-height: 1.4;
}

.artifact-item:hover .artifact-title {
    color: var(--primary-blue);
}

.artifact-meta {
    color: var(--sage-green);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    background: rgba(156, 175, 136, 0.1);
    border: 1px solid rgba(156, 175, 136, 0.3);
    border-radius: 20px;
    margin-left: 1rem;
    white-space: nowrap;
}

/* Mobile: single column */
@media (max-width: 768px) {
    .artifacts-list {
        grid-template-columns: 1fr;
    }
}

/* Tag cloud panel */
#tag-cloud-wrapper {
    background: rgba(15, 20, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Article cards use modal panel style */
.article-card {
    background: rgba(15, 20, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 158, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(74, 158, 255, 0.15);
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.article-category {
    background: var(--sage-green);
    color: var(--text-primary);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-card h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.read-more {
    background: linear-gradient(135deg, var(--primary-blue), var(--sage-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    filter: brightness(1.2);
}

/* Footer */
.footer {
    background: var(--secondary-bg);
    color: var(--text-primary);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, var(--primary-blue), var(--sage-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: var(--sage-green);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
    text-align: center;
    color: var(--text-muted);
}

/* Focus States for Accessibility */
*:focus {
    outline: 2px solid var(--sage-green);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        padding: 0 20px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .title-accent {
        font-size: 2rem;
    }

    .title-sub {
        font-size: 1.8rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .nav-menu {
        display: none;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .pixel-art-icon {
        width: 24px;
        height: 24px;
    }

    .pixel {
        width: 3px;
        height: 3px;
        left: calc(var(--x) * 3px);
        top: calc(var(--y) * 3px);
    }

    .hero::after {
        background-size: 40px 40px;
        animation: none;
    }

    .hero-visual {
        margin-bottom: 0;
        margin-right: 0;
        justify-self: center;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .tech-item {
        width: 100px;
        height: 45px;
        font-size: 0.65rem;
        padding: 0.5rem 0.25rem;
        animation: none;
    }

    .floating-element {
        animation: none !important;
    }
}

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

    .section-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .tech-item {
        width: 90px;
        height: 40px;
        font-size: 0.6rem;
        padding: 0.4rem 0.2rem;
        animation: none;
    }
}

/* === LOGIN MODAL === */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    overflow: auto;
}

.login-modal[style*="display: block"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
}

.login-modal-content {
    position: relative;
    z-index: 10002;
    background: rgba(36, 41, 56, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    margin: auto;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.login-modal-close:hover {
    color: var(--text-primary);
}

.login-modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-modal-header h2 {
    color: var(--primary-blue);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.login-modal-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-modal-body {
    width: 100%;
}

.login-form-group {
    margin-bottom: 1.5rem;
}

.login-form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.login-form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

.login-form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

.login-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--error-red);
    color: var(--error-red);
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.login-submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-blue);
    color: var(--text-inverse);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-submit-btn:hover:not(:disabled) {
    background: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: var(--glow-blue);
}

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

.login-submit-btn.loading {
    position: relative;
}

.login-submit-btn.loading::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Nav login link - matches other nav items */
.nav-login {
    /* Inherits standard nav-link styles */
}

@media (max-width: 640px) {
    .login-modal-content {
        padding: 2rem 1.5rem;
    }

    .login-modal-header h2 {
        font-size: 1.5rem;
    }
}

/* ========================================
   FULL-PAGE READER SYSTEM (AWS Docs Style)
   ======================================== */

/* Light theme variables for reader */
.cyberpunk-modal {
    --reader-bg: #ffffff;
    --reader-sidebar-bg: #f8f9fa;
    --reader-border: #d5dbdb;
    --reader-text: #16191f;
    --reader-text-secondary: #545b64;
    --reader-text-muted: #687078;
    --reader-heading: #16191f;
    --reader-link: #0073bb;
    --reader-link-hover: #004b7c;
    --reader-accent: #0073bb;
    --reader-accent-light: #e6f3fb;
    --reader-code-bg: #f2f3f3;
    --reader-code-border: #d5dbdb;
    --reader-toc-active: #ec7211;
    --reader-toc-hover: #f2f3f3;
    --reader-shadow: 0 1px 1px 0 rgba(0, 28, 36, 0.04), 0 1px 3px 0 rgba(0, 28, 36, 0.12);
}

/* Dark theme variables for reader */
.cyberpunk-modal.theme-dark {
    --reader-bg: #1a1f2e;
    --reader-sidebar-bg: #141824;
    --reader-border: #2d3748;
    --reader-text: #e2e8f0;
    --reader-text-secondary: #a0aec0;
    --reader-text-muted: #718096;
    --reader-heading: #f7fafc;
    --reader-link: #63b3ed;
    --reader-link-hover: #90cdf4;
    --reader-accent: #63b3ed;
    --reader-accent-light: rgba(99, 179, 237, 0.15);
    --reader-code-bg: #2d3748;
    --reader-code-border: #4a5568;
    --reader-toc-active: #ed8936;
    --reader-toc-hover: rgba(255, 255, 255, 0.05);
    --reader-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
}

.cyberpunk-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: var(--reader-bg);
}

.cyberpunk-modal.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

.modal-backdrop {
    display: none;
}

.modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--reader-bg);
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Reader Toolbar */
.reader-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    background: var(--reader-bg);
    border-bottom: 1px solid var(--reader-border);
    flex-shrink: 0;
    gap: 1rem;
}

.reader-toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.reader-back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--reader-border);
    border-radius: 6px;
    color: var(--reader-text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.reader-back-btn:hover {
    border-color: var(--reader-accent);
    color: var(--reader-accent);
    background: var(--reader-accent-light);
}

.reader-back-btn svg {
    width: 16px;
    height: 16px;
}

.reader-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--reader-text-muted);
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reader-breadcrumb-category {
    color: var(--reader-accent);
    font-weight: 500;
}

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

.reader-breadcrumb-title {
    color: var(--reader-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
}

.reader-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.reader-control-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--reader-sidebar-bg);
    border-radius: 6px;
    border: 1px solid var(--reader-border);
}

.reader-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--reader-text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reader-control-btn:hover {
    background: var(--reader-accent-light);
    color: var(--reader-accent);
}

.reader-control-btn:active {
    transform: scale(0.95);
}

.reader-control-label {
    padding: 0 0.5rem;
    color: var(--reader-text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Theme toggle button */
.reader-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--reader-sidebar-bg);
    border: 1px solid var(--reader-border);
    border-radius: 6px;
    color: var(--reader-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.reader-theme-toggle:hover {
    background: var(--reader-accent-light);
    color: var(--reader-accent);
    border-color: var(--reader-accent);
}

.reader-theme-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.reader-theme-toggle:hover svg {
    transform: rotate(15deg);
}

/* Hide inactive icon */
.reader-theme-toggle .icon-sun,
.reader-theme-toggle .icon-moon {
    display: none;
}

/* Show sun icon in dark mode (to switch to light) */
.cyberpunk-modal.theme-dark .reader-theme-toggle .icon-sun {
    display: block;
}

/* Show moon icon in light mode (to switch to dark) */
.cyberpunk-modal:not(.theme-dark) .reader-theme-toggle .icon-moon {
    display: block;
}

/* Hide old close button */
.modal-close {
    display: none;
}

/* Content layout with sidebar */
.modal-body-wrapper {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Left sidebar for table of contents */
.reader-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--reader-sidebar-bg);
    border-right: 1px solid var(--reader-border);
    overflow-y: auto;
    padding: 1.5rem 0;
}

.reader-sidebar::-webkit-scrollbar {
    width: 4px;
}

.reader-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.reader-sidebar::-webkit-scrollbar-thumb {
    background: var(--reader-border);
    border-radius: 2px;
}

.reader-sidebar-header {
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid var(--reader-border);
    margin-bottom: 1rem;
}

.reader-sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--reader-text-muted);
}

.reader-toc {
    list-style: none;
    margin: 0;
    padding: 0;
}

.reader-toc-item {
    margin: 0;
}

.reader-toc-link {
    display: block;
    padding: 0.5rem 1.25rem;
    color: var(--reader-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.reader-toc-link:hover {
    background: var(--reader-toc-hover);
    color: var(--reader-text);
}

.reader-toc-link.active {
    border-left-color: var(--reader-toc-active);
    background: var(--reader-accent-light);
    color: var(--reader-text);
    font-weight: 500;
}

.reader-toc-item.level-3 .reader-toc-link {
    padding-left: 2rem;
    font-size: 0.8125rem;
}

/* Content wrapper - full height scrollable */
.modal-content-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2.5rem 3rem;
    transition: padding 0.2s ease;
    background: var(--reader-bg);
}

.modal-content-wrapper::-webkit-scrollbar {
    width: 6px;
}

.modal-content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content-wrapper::-webkit-scrollbar-thumb {
    background: var(--reader-border);
    border-radius: 3px;
}

.modal-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--reader-text-muted);
}

/* Reader content container */
.reader-content {
    max-width: 800px;
    margin: 0 auto;
    transition: max-width 0.2s ease, font-size 0.2s ease;
}

/* Margin presets */
.modal-content-wrapper.margin-narrow { padding-left: 1%; padding-right: 1%; }
.modal-content-wrapper.margin-normal { padding-left: 4%; padding-right: 4%; }
.modal-content-wrapper.margin-wide { padding-left: 8%; padding-right: 8%; }
.modal-content-wrapper.margin-ultra { padding-left: 15%; padding-right: 15%; }

/* Font size presets */
.reader-content.font-small { font-size: 0.9rem; }
.reader-content.font-normal { font-size: 1rem; }
.reader-content.font-large { font-size: 1.15rem; }
.reader-content.font-xlarge { font-size: 1.3rem; }

.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    color: var(--reader-accent);
}

.cyber-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid var(--reader-border);
    border-top-color: var(--reader-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

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

.modal-loading p {
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
    font-size: 0.875rem;
    color: var(--reader-text-muted);
}

.modal-content {
    display: none;
}

/* Reader Header - AWS docs style */
.modal-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--reader-border);
}

.modal-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--reader-accent-light);
    border: none;
    border-radius: 3px;
    color: var(--reader-accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--reader-heading);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.modal-summary {
    font-size: 1.125rem;
    color: var(--reader-text-secondary);
    line-height: 1.7;
}

/* Article-specific header */
.article-header .article-meta-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

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

.article-author {
    color: var(--reader-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

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

.article-tags .tag {
    padding: 0.35rem 0.75rem;
    background: var(--reader-sidebar-bg);
    border: 1px solid var(--reader-border);
    border-radius: 4px;
    color: var(--reader-text-secondary);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.article-tags .tag:hover {
    background: var(--reader-accent-light);
    border-color: var(--reader-accent);
    color: var(--reader-accent);
}

/* Modal Body */
.modal-body {
    color: var(--reader-text);
    line-height: 1.8;
}

.modal-body p {
    margin-bottom: 1.5rem;
    color: var(--reader-text-secondary);
}

.modal-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--reader-heading);
    margin: 2.5rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--reader-border);
}

.modal-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--reader-heading);
    margin: 2rem 0 0.75rem;
}

.modal-body ul, .modal-body ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--reader-text-secondary);
}

.modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.modal-body pre {
    background: var(--reader-code-bg);
    border: 1px solid var(--reader-code-border);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--reader-text);
}

.modal-body code {
    background: var(--reader-code-bg);
    border: 1px solid var(--reader-code-border);
    border-radius: 3px;
    padding: 0.15rem 0.4rem;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875em;
    color: var(--reader-text);
}

.modal-body pre code {
    background: none;
    border: none;
    padding: 0;
}

.modal-body a {
    color: var(--reader-link);
    text-decoration: none;
}

.modal-body a:hover {
    color: var(--reader-link-hover);
    text-decoration: underline;
}

.modal-body strong {
    font-weight: 600;
    color: var(--reader-text);
}

.section-heading {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--reader-heading);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--reader-border);
}

/* Features List - vertical compact layout */
.features-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0.5rem;
}

.feature-item {
    padding: 0.75rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--reader-border);
    border-radius: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 1.25rem;
    color: var(--reader-accent);
}

.feature-item h3 {
    color: var(--reader-text);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-item p {
    color: var(--reader-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Benefits List - minimal bullets */
.benefits-list {
    list-style: none;
    margin-top: 0.5rem;
}

.benefits-list li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    color: var(--reader-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.benefits-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--reader-accent);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Process Timeline - compact inline */
.process-timeline {
    margin-top: 0.5rem;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0;
    padding: 0.75rem 0;
    background: transparent;
    border-left: none;
    border-bottom: 1px solid var(--reader-border);
    border-radius: 0;
}

.process-step:last-child {
    border-bottom: none;
}

.step-number {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--reader-accent);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: #ffffff;
    margin-top: 0.1rem;
}

.step-details {
    flex: 1;
}

.step-details h3 {
    color: var(--reader-text);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
    display: inline;
}

.step-duration {
    display: inline;
    padding: 0.15rem 0.5rem;
    background: var(--reader-sidebar-bg);
    border-radius: 3px;
    color: var(--reader-text-muted);
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.step-duration::before {
    content: '';
}

.step-details p {
    color: var(--reader-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0.5rem 0 0;
}

/* Tech Tags - inline subtle */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tech-tag {
    padding: 0.35rem 0.75rem;
    background: var(--reader-sidebar-bg);
    border: 1px solid var(--reader-border);
    border-radius: 4px;
    color: var(--reader-text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
}

/* Pricing Section - subtle */
.service-pricing .pricing-info {
    padding: 1rem;
    background: var(--reader-accent-light);
    border-radius: 6px;
    margin-top: 0.5rem;
}

.service-pricing .pricing-model {
    color: var(--reader-text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.service-pricing .pricing-amount {
    color: var(--reader-accent);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.service-pricing .pricing-description {
    color: var(--reader-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* CTA Section - hidden (no CRM links) */
.service-cta {
    display: none;
}

/* Modal Footer */
.modal-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--reader-border);
}

.share-button {
    padding: 0.75rem 1.5rem;
    background: var(--reader-accent-light);
    border: 1px solid var(--reader-accent);
    border-radius: 6px;
    color: var(--reader-accent);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-button:hover {
    background: var(--reader-accent);
    color: #ffffff;
}

/* Modal Error */
.modal-error {
    text-align: center;
    padding: 3rem;
}

.modal-error h2 {
    color: #d13212;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

.error-close-btn {
    margin-top: 2rem;
    padding: 0.75rem 2rem;
    background: var(--reader-accent);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* ========================================
   CYBERPUNK TAG CLOUD
   ======================================== */

.tag-cloud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tag-cloud-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    color: var(--primary-blue);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.tag-clear-all {
    padding: 0.5rem 1.25rem;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--error-red);
    border-radius: 6px;
    color: var(--error-red);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tag-clear-all:hover {
    background: var(--error-red);
    color: var(--text-inverse);
    box-shadow: 0 0 15px rgba(244, 67, 54, 0.5);
}

.tag-cloud-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 2rem;
    background: rgba(36, 41, 56, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    min-height: 120px;
    align-items: center;
    justify-content: center;
}

.cyber-tag {
    position: relative;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.1), rgba(100, 181, 246, 0.05));
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 8px;
    color: var(--primary-blue);
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cyber-tag:hover {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.2), rgba(100, 181, 246, 0.1));
    box-shadow:
        0 0 20px rgba(74, 158, 255, 0.4),
        inset 0 0 10px rgba(74, 158, 255, 0.1);
    transform: translateY(-3px) scale(1.05);
}

.cyber-tag.active {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    border-color: var(--light-blue);
    color: var(--text-inverse);
    box-shadow:
        0 0 30px rgba(74, 158, 255, 0.6),
        0 5px 15px rgba(74, 158, 255, 0.3);
    transform: translateY(-3px);
}

.cyber-tag.active:hover {
    box-shadow:
        0 0 40px rgba(74, 158, 255, 0.8),
        0 7px 20px rgba(74, 158, 255, 0.4);
}

.tag-count {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
}

.cyber-tag.active .tag-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Tag Size Variations */
.cyber-tag.size-small {
    font-size: 0.75rem;
    padding: 0.4rem 0.9rem;
}

.cyber-tag.size-medium {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
}

.cyber-tag.size-large {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
}

.tag-filter-status {
    text-align: center;
    padding: 1rem;
    color: var(--text-muted);
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Articles Grid with Tag Cloud - override with panel */

.article-card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.article-card.clickable:hover {
    transform: translateY(-8px);
    border-color: var(--primary-blue);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(74, 158, 255, 0.3);
}

.article-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin: 1rem 0;
    line-height: 1.4;
}

.article-summary {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.article-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag-inline {
    padding: 0.3rem 0.6rem;
    background: rgba(156, 175, 136, 0.1);
    border: 1px solid var(--sage-green);
    border-radius: 4px;
    color: var(--sage-green);
    font-size: 0.75rem;
}

.tag-more {
    padding: 0.3rem 0.6rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.article-read-more {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.article-card.clickable:hover .article-read-more {
    text-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

/* No Articles State */
.no-articles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.no-articles-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-articles h3 {
    font-family: 'Orbitron', monospace;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

/* Service Card Clickable Enhancement */
.service-card.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-card.clickable:hover {
    transform: translateY(-8px);
    border-color: var(--primary-blue);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(74, 158, 255, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .reader-sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .reader-toolbar {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .reader-toolbar-left {
        order: 1;
        width: 100%;
    }

    .reader-toolbar-right {
        order: 2;
        width: 100%;
        justify-content: center;
    }

    .reader-breadcrumb {
        display: none;
    }

    /* Hide sidebar on mobile */
    .reader-sidebar {
        display: none;
    }

    .modal-body-wrapper {
        flex-direction: column;
    }

    .modal-content-wrapper {
        padding: 1.5rem 1rem;
    }

    .modal-content-wrapper.margin-narrow,
    .modal-content-wrapper.margin-normal,
    .modal-content-wrapper.margin-wide,
    .modal-content-wrapper.margin-ultra {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .tag-cloud-container {
        padding: 1rem;
        gap: 0.5rem;
    }

    .cyber-tag {
        font-size: 0.75rem;
        padding: 0.5rem 0.9rem;
    }

    .cyber-tag.size-large {
        font-size: 0.85rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .reader-control-label {
        display: none;
    }

    .reader-control-btn {
        width: 36px;
        height: 36px;
    }

    .tag-cloud-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ========================================
   ANIME BORDER ART SYSTEM (Ghibli Style)
   ======================================== */

/* Cloud Border Panel - light sky with fluffy clouds */
.border-art-cloud {
    position: relative;
    background: transparent;
    border: none;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
}

.border-art-cloud::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('anime_cloud_border_panel.png') no-repeat center/cover;
    pointer-events: none;
    z-index: 0;
    border-radius: 16px;
}

.border-art-cloud > * {
    position: relative;
    z-index: 1;
}

.border-art-cloud .service-card-content {
    padding: 4rem 2.5rem;
    background: rgba(15, 20, 25, 0.92);
    margin: 30px 25px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

/* Earth Border Panel - forest tree frame */
.border-art-earth {
    position: relative;
    background: transparent;
    border: none;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
}

.border-art-earth::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('anime_earth_border_panel.png') no-repeat center/cover;
    pointer-events: none;
    z-index: 0;
    border-radius: 16px;
}

.border-art-earth > * {
    position: relative;
    z-index: 1;
}

.border-art-earth .service-card-content {
    padding: 4rem 2.5rem;
    background: rgba(15, 20, 25, 0.92);
    margin: 35px 30px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

/* Cloud Border Pill - for buttons/tags */
.border-art-pill-cloud {
    position: relative;
    background: transparent;
    border: none;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.border-art-pill-cloud::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('anime_cloud_border_pill.png') no-repeat center/cover;
    pointer-events: none;
    z-index: 0;
}

.border-art-pill-cloud > * {
    position: relative;
    z-index: 1;
}

/* Earth Border Pill - for buttons/tags */
.border-art-pill-earth {
    position: relative;
    background: transparent;
    border: none;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
}

.border-art-pill-earth::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('anime_earth_border_pill.png') no-repeat center/cover;
    pointer-events: none;
    z-index: 0;
}

.border-art-pill-earth > * {
    position: relative;
    z-index: 1;
}

/* Service card with border art adjustments */
.service-card.border-art-cloud,
.service-card.border-art-earth {
    background: transparent;
    border: none;
    min-height: 480px;
}

.service-card.border-art-cloud:hover,
.service-card.border-art-earth:hover {
    background: transparent;
    border: none;
    box-shadow: 0 12px 48px rgba(74, 158, 255, 0.25);
    transform: translateY(-8px);
}

.service-card.border-art-cloud:hover::before,
.service-card.border-art-earth:hover::before {
    filter: brightness(1.08) saturate(1.1);
}

/* Responsive adjustments for border art */
@media (max-width: 768px) {
    .border-art-cloud .service-card-content,
    .border-art-earth .service-card-content {
        padding: 2.5rem 1.5rem;
        margin: 20px 15px;
    }

    .service-card.border-art-cloud,
    .service-card.border-art-earth {
        min-height: 420px;
    }
}