/* ===== CSS VARIABLES & RESET (LIGHT THEME) ===== */
:root,
html[data-theme="light"] {
    --bg-primary: #f8f9fb;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --cyan: #0284c7; /* Vibrant accessible Sky Cyan, WCAG AA 4.5:1+ */
    --purple: #6d28d9; /* Deep accessible Royal Purple, WCAG AA 4.5:1+ */
    --green: #16a34a; /* Success accent */
    --gradient-main: linear-gradient(135deg, #0284c7, #6d28d9);
    --radius: 16px;
    --font-main: 'Outfit', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    --transition: 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-snap: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    --section-gap: 140px;
}

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

html {
    font-size: 16px;
    scroll-padding-top: 90px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    overflow-y: scroll; /* Ensures native desktop mouse wheel and trackpad scroll always function */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: visible;
    line-height: 1.65;
    min-height: 100vh;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

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

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.section {
    padding: var(--section-gap) 0;
    position: relative;
    z-index: 2;
}

.section,
#hero,
#services,
#authority,
#projects,
#certificates,
#testimonials,
#faq,
#contact,
#process,
#ai-automation,
#full-stack,
#backend,
#growth {
    scroll-margin-top: clamp(72px, 10vh, 95px);
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glassmorphism {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
}

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

/* Backgrounds & Overlays */
.noise-overlay {
    position: fixed;
    inset: 0;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.015;
    pointer-events: none;
    z-index: 10;
}

.ai-grid-bg {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(2, 132, 199, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(2, 132, 199, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

#particlesCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    will-change: contents;
    transform: translateZ(0);
}

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.animated-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}

.logo-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: draw 2s ease forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

.preloader-text {
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.dots::after {
    content: '';
    animation: dots 1.5s infinite steps(4);
}

@keyframes dots {
    0% {
        content: '';
    }

    25% {
        content: '.';
    }

    50% {
        content: '..';
    }

    75% {
        content: '...';
    }
}

.preloader-bar {
    width: 200px;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 4px;
}

.preloader-bar-fill {
    height: 100%;
    background: var(--gradient-main);
    width: 0;
    animation: fill 2s ease forwards;
}

@keyframes fill {
    to {
        width: 100%;
    }
}

/* Floating Social Dock */
.social-dock {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 990;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 12px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.social-dock-btn {
    color: var(--text-secondary);
    font-size: 20px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.social-dock-btn:hover {
    color: var(--cyan);
    filter: drop-shadow(0 0 8px var(--cyan));
    transform: scale(1.1);
}

@media(max-width: 768px) {
    .social-dock {
        display: none;
    }
}

/* Nav - Modern Floating Capsule/Pill Navbar */
#navbar {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    max-width: min(92%, 820px);
    height: 56px;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 0 32px;
}

#navbar.scrolled {
    top: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(2, 132, 199, 0.25);
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-snap);
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

@media(max-width: 768px) {
    #navbar {
        height: 48px;
        padding: 0 4px;
        min-width: 48px;
        width: fit-content;
        left: auto;
        right: max(14px, env(safe-area-inset-right, 14px));
        transform: none;
        top: max(12px, env(safe-area-inset-top, 12px));
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-handle {
        display: none;
    }
}

/* Hero */
#hero {
    padding-top: 85px !important; /* Proper clearance under fixed navbar */
    padding-bottom: 24px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.hero-content {
    max-width: 1240px;
    width: 100%;
    padding: 0 24px 0 115px;
    z-index: 3;
    margin: 0 auto;
}

/* Two-Column Hero Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 36px;
    align-items: center;
    margin-bottom: 28px;
    width: 100%;
}

.hero-text-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.review-form-container.is-collapsed {
    display: none !important;
}

.review-form-container.is-revealed {
    display: block !important;
    animation: reviewFormFadeIn 0.35s ease-out;
}

@keyframes reviewFormFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-grid .hero-title {
    font-size: clamp(2rem, 3.2vw, 2.9rem) !important;
    line-height: 1.18 !important;
    margin-bottom: 16px !important;
    text-align: left;
    min-height: auto !important;
    height: auto !important;
}

.hero-grid .hero-subtitle {
    font-size: clamp(0.92rem, 1.05vw, 1.02rem) !important;
    line-height: 1.55 !important;
    margin: 0 0 22px 0 !important;
    text-align: left;
    max-width: 100%;
}

.hero-grid .hero-buttons {
    justify-content: flex-start;
    margin-bottom: 0 !important;
    gap: 16px;
}

.hero-photo-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-photo-wrapper {
    position: relative;
    display: inline-block;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* FIX A: Organic Asymmetric Blob Glow (proportionate relative scaling) */
.hero-photo-wrapper::before {
    content: '';
    position: absolute;
    width: 95%;
    height: 95%;
    max-width: 290px;
    max-height: 290px;
    top: 10%;
    left: 50%;
    transform: translate(-46%, -14%);
    border-radius: 64% 36% 68% 32% / 36% 64% 36% 64%;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.22) 0%, rgba(109, 40, 217, 0.12) 52%, transparent 72%);
    filter: blur(28px);
    z-index: -1;
    pointer-events: none;
}

/* FIX B: Contact Shadow removed - photo melts smoothly into background via alpha gradient fade */
.hero-photo-wrapper::after {
    display: none;
}

.hero-photo-wrapper:hover {
    transform: translateY(-4px);
}

.hero-profile-photo {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 0;
    object-fit: cover;
    aspect-ratio: 480 / 436;
    filter: none;
}

/* Hero Spoken Introduction Control (Desktop Hidden, Mobile-Only) */
.hero-audio-intro-wrapper {
    display: none !important;
}

@media (min-width: 993px) {
    .hero-audio-intro-wrapper {
        display: none !important;
    }
    #hero .hero-subtitle,
    .hero-grid .hero-subtitle,
    .hero-subtitle {
        position: static !important;
        width: auto !important;
        height: auto !important;
        clip: auto !important;
        clip-path: none !important;
        display: block !important;
        overflow: visible !important;
    }
}

.hero-audio-intro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 8px 18px;
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.28);
    border-radius: 28px;
    color: #0369a1;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

[data-theme="dark"] .hero-audio-intro-btn {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.hero-audio-intro-btn:active {
    transform: scale(0.97);
}

.hero-audio-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.16);
    color: var(--cyan);
    font-size: 0.74rem;
    transition: background 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] .hero-audio-icon-wrap {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.hero-audio-intro-btn.is-playing {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.16) 0%, rgba(109, 40, 217, 0.16) 100%);
    border-color: var(--cyan);
    color: #0284c7;
    box-shadow: 0 0 16px rgba(2, 132, 199, 0.22);
}

[data-theme="dark"] .hero-audio-intro-btn.is-playing {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    border-color: #38bdf8;
    color: #f0f9ff;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.28);
}

.hero-audio-intro-btn.is-playing .hero-audio-icon-wrap {
    background: #ef4444;
    color: #ffffff;
}

/* Restrained audio waveform */
.hero-audio-waveform {
    display: none;
    align-items: center;
    gap: 3px;
    height: 14px;
    margin-left: 2px;
}

.hero-audio-intro-btn.is-playing .hero-audio-waveform {
    display: inline-flex;
}

.waveform-bar {
    width: 2.5px;
    height: 12px;
    background: currentColor;
    border-radius: 2px;
    transform-origin: bottom center;
}

.hero-audio-intro-btn.is-playing .bar-1 {
    animation: heroWaveBar 0.9s ease-in-out infinite 0.1s;
}
.hero-audio-intro-btn.is-playing .bar-2 {
    animation: heroWaveBar 0.8s ease-in-out infinite 0.25s;
}
.hero-audio-intro-btn.is-playing .bar-3 {
    animation: heroWaveBar 0.95s ease-in-out infinite 0.15s;
}
.hero-audio-intro-btn.is-playing .bar-4 {
    animation: heroWaveBar 0.85s ease-in-out infinite 0.3s;
}

@keyframes heroWaveBar {
    0%, 100% {
        transform: scaleY(0.25);
    }
    50% {
        transform: scaleY(1);
    }
}

/* Reduced Motion: Disable waveform animation & stats hover lift */
@media (prefers-reduced-motion: reduce) {
    .waveform-bar {
        animation: none !important;
        transform: scaleY(0.6) !important;
    }
    .hero-stats .stat-item,
    .hero-stats .stat-item:hover {
        transform: none !important;
        transition: none !important;
    }
}

@media screen and (max-width: 992px) {
    .ai-grid-bg {
        opacity: 0.55 !important;
    }

    #hero {
        min-height: auto !important;
        box-sizing: border-box !important;
        padding-top: calc(max(14px, env(safe-area-inset-top, 14px)) + 54px) !important;
        padding-bottom: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
    }

    .hero-content {
        padding: 0 16px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .hero-grid {
        display: contents !important;
    }

    .hero-text-col {
        display: contents !important;
    }

    /* Mobile Hero Order:
       1. Availability Badge
       2. Portrait immediately below badge
       3. Heading
       4. Spoken Intro Control / Subtitle
       5. CTA Buttons
       6. Four Stats 2x2 Grid
    */

    /* 1. Availability Badge (Reserved Space Below Mobile Header) */
    .hero-badge {
        order: 1 !important;
        font-size: 9.8px !important;
        padding: 3px 10px !important;
        margin: 0 auto 5px !important;
        display: inline-flex !important;
        align-items: center !important;
        width: fit-content !important;
        max-width: calc(100% - 16px) !important;
        white-space: normal !important;
        text-align: center !important;
        line-height: 1.25 !important;
    }

    /* 2. Portrait immediately below badge (Enlarged & Prominent) */
    .hero-photo-col {
        order: 2 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin: 2px auto 6px !important;
    }

    .hero-profile-photo {
        max-width: 145px !important;
        width: 145px !important;
        height: auto !important;
        aspect-ratio: 417 / 397;
    }

    .hero-photo-wrapper {
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .hero-photo-wrapper::before {
        width: 88%;
        height: 88%;
        filter: blur(14px);
    }

    .hero-photo-wrapper .hero-profile-photo {
        border-radius: 0;
    }

    /* 3. Heading */
    .hero-grid .hero-title,
    .hero-title {
        order: 3 !important;
        font-size: clamp(1.28rem, 4.8vw, 1.55rem) !important;
        line-height: 1.15 !important;
        margin: 0 auto 5px !important;
        text-align: center !important;
        width: 100% !important;
    }

    /* 4. Spoken Intro Control & Subtitle */
    html.speech-ready .hero-audio-intro-wrapper {
        display: flex !important;
        order: 4 !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 2px auto 7px !important;
    }

    html.speech-ready #hero .hero-subtitle,
    html.speech-ready .hero-grid .hero-subtitle,
    html.speech-ready .hero-subtitle {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        clip-path: inset(50%) !important;
        white-space: normal !important;
        border: 0 !important;
    }

    /* Fallback if speech is not supported: keep written subtitle visible */
    html:not(.speech-ready) .hero-grid .hero-subtitle,
    html:not(.speech-ready) .hero-subtitle {
        order: 4 !important;
        font-size: 11px !important;
        line-height: 1.35 !important;
        margin: 0 auto 7px !important;
        text-align: center !important;
        max-width: 320px !important;
        width: 100% !important;
    }

    /* 5. Buttons (Min 44px Touch Target Height) */
    .hero-grid .hero-buttons,
    .hero-buttons {
        order: 5 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 8px !important;
        margin: 0 auto 8px !important;
    }

    .hero-buttons .btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 1 auto !important;
        width: auto !important;
        max-width: 140px !important;
        min-height: 44px !important;
        padding: 8px 16px !important;
        font-size: 12.5px !important;
        font-weight: 600 !important;
        border-radius: 9px !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
    }

    /* 6. Refined Unified 2x2 Stats Panel (Compact 90-95px height on mobile) */
    .hero-stats {
        order: 6 !important;
        width: 100% !important;
        max-width: 326px !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0 !important;
        margin: 0 auto 10px !important;
        background: rgba(255, 255, 255, 0.88) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(15, 23, 42, 0.08) !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.04) !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    [data-theme="dark"] .hero-stats {
        background: rgba(30, 41, 59, 0.7) !important;
        border-color: rgba(255, 255, 255, 0.09) !important;
        box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.2) !important;
    }

    .stat-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 2px 4px !important;
        box-sizing: border-box !important;
        cursor: default !important;
        transition: background 0.15s ease !important;
    }

    /* Hairline internal cross-dividers */
    .stat-item:nth-child(1),
    .stat-item:nth-child(3) {
        border-right: 1px solid rgba(15, 23, 42, 0.08) !important;
    }
    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
    }

    [data-theme="dark"] .stat-item:nth-child(1),
    [data-theme="dark"] .stat-item:nth-child(3) {
        border-right-color: rgba(255, 255, 255, 0.09) !important;
    }
    [data-theme="dark"] .stat-item:nth-child(1),
    [data-theme="dark"] .stat-item:nth-child(2) {
        border-bottom-color: rgba(255, 255, 255, 0.09) !important;
    }

    .stat-number-wrapper {
        font-size: 1.15rem !important;
        line-height: 1.05 !important;
        font-weight: 800 !important;
        display: inline-flex !important;
        align-items: baseline !important;
        justify-content: center !important;
    }

    .stat-label {
        font-size: 9.8px !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        margin: 1px 0 0 !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
    }

    [data-theme="dark"] .stat-label {
        color: #f8fafc !important;
    }

    .stat-badge {
        font-size: 8.5px !important;
        font-weight: 500 !important;
        color: #64748b !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 1.15 !important;
        white-space: nowrap !important;
    }

    [data-theme="dark"] .stat-badge {
        color: #94a3b8 !important;
        background: none !important;
    }
}

@media screen and (max-width: 480px) {
    .hero-content {
        padding: 0 16px;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 32px;
    letter-spacing: -1px;
    transition: var(--transition);
    cursor: default;
    will-change: transform;
    transform: translateZ(0);
}

.hero-title:hover {
    text-shadow: 0 4px 25px rgba(2, 132, 199, 0.25), 0 8px 40px rgba(109, 40, 217, 0.2);
    transform: scale(1.02) translateY(-5px) translateZ(0);
}

.cursor-blink {
    font-weight: bold;
    color: var(--cyan);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 48px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 72px;
}

.btn {
    padding: 14px 32px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    transform: translateZ(0);
}

.btn-primary {
    background: var(--gradient-main);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover {
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 8px 30px rgba(2, 132, 199, 0.45);
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: #ffffff;
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.15);
}

#neuralCanvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    will-change: contents;
    transform: translateZ(0);
}

.hero-title,
.hero-subtitle,
.hero-buttons,
.code-typing-widget,
.hero-stats {
    will-change: transform, opacity;
}

/* Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number-wrapper {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-code);
}

.glow-text {
    color: var(--text-primary);
    text-shadow: none;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0;
}

.stat-badge {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.2);
    border-radius: 4px;
    color: var(--cyan);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto;
}

/* Services Section (#services) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    width: 100%;
    max-width: 1140px;
    margin: 44px auto 0;
    box-sizing: border-box;
}

.service-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg, 16px);
    padding: 32px 26px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    box-sizing: border-box;
    height: 100%;
    cursor: default;
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: perspective(1000px) translateZ(0);
    transform-style: preserve-3d;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.26s ease, border-color 0.26s ease, background 0.26s ease;
    will-change: transform;
}

[data-theme="dark"] .service-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.service-card:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 3px !important;
}

.service-icon-medallion {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08) 0%, rgba(109, 40, 217, 0.08) 100%);
    border: 1px solid rgba(2, 132, 199, 0.2);
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-shrink: 0;
    transform: translateZ(0);
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.26s ease, box-shadow 0.26s ease;
}

[data-theme="dark"] .service-icon-medallion {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.16) 0%, rgba(109, 40, 217, 0.16) 100%);
    border-color: rgba(56, 189, 248, 0.25);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.service-orbit-ring {
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    border: 1.5px dashed rgba(2, 132, 199, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.26s ease;
    animation: serviceOrbitSpin 8s linear infinite;
    animation-play-state: paused;
}

@keyframes serviceOrbitSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.service-icon {
    font-size: 22px;
    color: var(--cyan);
    display: inline-block;
    transition: transform 0.26s ease;
}

.service-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

[data-theme="dark"] .service-title {
    color: #f8fafc !important;
}

.service-desc,
.service-card p {
    font-size: 0.92rem;
    font-weight: 400;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

[data-theme="dark"] .service-desc,
[data-theme="dark"] .service-card p {
    color: #94a3b8 !important;
}

@media (hover: hover) and (pointer: fine) {
    .service-card:hover,
    .service-card:focus-within {
        transform: perspective(1000px) translateY(-5px) rotateX(1.5deg) rotateY(-1deg);
        border-color: rgba(2, 132, 199, 0.45);
        box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(2, 132, 199, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    [data-theme="dark"] .service-card:hover,
    [data-theme="dark"] .service-card:focus-within {
        border-color: rgba(56, 189, 248, 0.45);
        box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .service-card:hover .service-icon-medallion,
    .service-card:focus-within .service-icon-medallion {
        transform: translateZ(14px) translateY(-1px);
        border-color: rgba(2, 132, 199, 0.45);
        box-shadow: 0 6px 16px rgba(2, 132, 199, 0.2), inset 0 1px 1px rgba(255, 255, 255, 1);
    }

    .service-card:hover .service-orbit-ring,
    .service-card:focus-within .service-orbit-ring {
        opacity: 1;
        animation-play-state: running;
    }
}

.service-card:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px -3px rgba(15, 23, 42, 0.08);
    border-color: rgba(2, 132, 199, 0.35);
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        margin-top: 36px;
    }
}

@media (max-width: 520px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 28px;
    }

    .service-card {
        padding: 22px 18px;
    }

    .service-icon-medallion {
        width: 48px;
        height: 48px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .service-icon {
        font-size: 20px;
    }

    .service-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .service-desc,
    .service-card p {
        font-size: 0.88rem;
        line-height: 1.55;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-card,
    .service-card:hover,
    .service-card:focus-within,
    .service-card:active,
    .service-icon-medallion,
    .service-orbit-ring {
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    .service-orbit-ring {
        display: none !important;
    }
}

/* ========================================================== */
/* HOW I BUILD (#authority) — LIVING 3D DIGITAL ARTIFACT     */
/* ========================================================== */
#authority {
    scroll-margin-top: 76px;
    position: relative;
    padding: clamp(38px, 5vh, 60px) 0 clamp(44px, 5.5vh, 68px);
    background: transparent;
}

#authority .container {
    position: relative;
}

/* Master Wrapper */
.build-experience {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    position: relative;
}

/* 1. Section Header */
.build-header {
    margin-bottom: clamp(20px, 2.8vh, 30px);
    position: relative;
}

.build-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.build-kicker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    display: inline-block;
}

.build-kicker-text {
    font-family: var(--font-code);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--cyan);
    text-transform: uppercase;
}

.build-header-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 48px;
    align-items: baseline;
}

.build-title {
    font-family: var(--font-main);
    font-size: clamp(2.4rem, 4.8vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.05;
    margin: 0;
    white-space: nowrap;
}

.build-subtitle {
    font-size: clamp(15.5px, 1.25vw, 17.5px);
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0;
    font-weight: 400;
}

/* 2. Main Stage Row: Disciplines (Left) + 3D Centerpiece (Right) */
.build-stage-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(36px, 4vw, 56px);
    align-items: start;
    margin-bottom: 0;
}

.build-col-label {
    font-family: var(--font-code);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
}

/* Left Column: 4 Disciplines */
.build-disciplines-col {
    display: flex;
    flex-direction: column;
}

.build-disciplines-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.build-discipline-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-left: 3px solid rgba(2, 132, 199, 0.35);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
    position: relative;
    cursor: default;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .build-discipline-item:hover {
        background: #ffffff;
        border-color: rgba(2, 132, 199, 0.24);
        border-left-color: var(--cyan);
        transform: translateX(4px);
        box-shadow: 0 8px 24px rgba(2, 132, 199, 0.08), 0 2px 6px rgba(15, 23, 42, 0.03);
    }
    .build-discipline-item:hover .build-disc-num {
        background: var(--cyan);
        color: #ffffff;
        border-color: var(--cyan);
        box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
    }
    .build-discipline-item:hover .build-disc-title {
        color: var(--cyan);
    }
}

.build-discipline-item:active {
    background: rgba(2, 132, 199, 0.08);
    border-left-color: var(--cyan);
    transform: scale(0.995);
}

.build-discipline-item:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 3px;
    border-radius: 12px;
}

.build-discipline-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.build-disc-num {
    font-family: var(--font-code);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--cyan);
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.18);
    border-radius: 6px;
    padding: 2.5px 8.5px;
    letter-spacing: 0.04em;
    line-height: 1.35;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.build-disc-title {
    font-family: var(--font-main);
    font-size: 17.5px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    margin: 0;
    line-height: 1.3;
    transition: color 0.18s ease;
}

.build-disc-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* Dark theme adaptation */
[data-theme="dark"] .build-discipline-item {
    background: rgba(30, 41, 59, 0.45);
    border-color: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (hover: hover) and (pointer: fine) {
    [data-theme="dark"] .build-discipline-item:hover {
        background: rgba(30, 41, 59, 0.75);
        border-color: rgba(56, 189, 248, 0.3);
        border-left-color: #38bdf8;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }
}

[data-theme="dark"] .build-disc-num {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
}

@media (hover: hover) and (pointer: fine) {
    [data-theme="dark"] .build-discipline-item:hover .build-disc-num {
        background: #0284c7;
        color: #ffffff;
        border-color: #0284c7;
    }
}

/* Right Column: The Living 3D Digital Artifact Centerpiece */
.build-artifact-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.build-artifact-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-code);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.artifact-badge-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0284c7;
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.8);
    display: inline-block;
}

/* The 3D Stage */
.artifact-stage {
    perspective: 1100px;
    perspective-origin: 50% 50%;
    width: 100%;
    max-width: min(410px, 44vh);
    height: clamp(330px, 42vh, 395px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: default;
    touch-action: pan-y;
}

/* Outer Tilt Wrapper: Receives smooth pointer tilt independently */
.artifact-tilt-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transition: transform 0.22s cubic-bezier(0.2, 0, 0.2, 1);
    will-change: transform;
}

/* Inner 3D Scene: Holds continuous ambient floating motion */
.artifact-scene {
    position: relative;
    width: 320px;
    height: 320px;
    transform-style: preserve-3d;
    animation: artifactFloat 12s ease-in-out infinite alternate;
    will-change: transform;
}

/* Ambient 3D floating animation */
@keyframes artifactFloat {
    0% {
        transform: rotateX(6deg) rotateY(-8deg) translateY(0px);
    }
    50% {
        transform: rotateX(-5deg) rotateY(9deg) translateY(-8px);
    }
    100% {
        transform: rotateX(7deg) rotateY(-5deg) translateY(4px);
    }
}

/* Layer: Contact shadow plane on floor (Z: -110px) with subtle ambient breathing */
.artifact-shadow-plane {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 240px;
    height: 150px;
    margin-left: -120px;
    margin-top: -75px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(2, 132, 199, 0.24) 0%, rgba(109, 40, 217, 0.14) 45%, transparent 70%);
    transform: rotateX(82deg) translateZ(-110px);
    filter: blur(14px);
    animation: shadowPulse 12s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes shadowPulse {
    0% {
        transform: rotateX(82deg) translateZ(-110px) scale(0.95);
        opacity: 0.82;
    }
    100% {
        transform: rotateX(82deg) translateZ(-110px) scale(1.06);
        opacity: 1;
    }
}

/* Layer 1: Coordinate Reticle Grid Plane (Z: -60px) */
.artifact-layer-coords {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(-60px);
    pointer-events: none;
}

.artifact-svg-grid {
    width: 100%;
    height: 100%;
    display: block;
}

/* Layer 2: Interlocking Kinetic Rings with gentle micro-motion */
.artifact-ring {
    pointer-events: none;
    transform-style: preserve-3d;
}

.artifact-ring-primary {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 270px;
    height: 270px;
    margin-left: -135px;
    margin-top: -135px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.85), rgba(109, 40, 217, 0.7)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    transform: rotateX(65deg) rotateY(20deg) translateZ(10px);
    box-shadow: 0 0 24px rgba(2, 132, 199, 0.25);
    animation: ringDrift1 22s ease-in-out infinite alternate;
}

@keyframes ringDrift1 {
    0% {
        transform: rotateX(65deg) rotateY(20deg) rotateZ(0deg) translateZ(10px);
    }
    100% {
        transform: rotateX(60deg) rotateY(26deg) rotateZ(6deg) translateZ(14px);
    }
}

.artifact-ring-secondary {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 220px;
    height: 220px;
    margin-left: -110px;
    margin-top: -110px;
    border-radius: 50%;
    border: 1.5px dashed rgba(2, 132, 199, 0.6);
    transform: rotateX(-50deg) rotateY(35deg) translateZ(-20px);
    animation: ringDrift2 18s ease-in-out infinite alternate;
}

@keyframes ringDrift2 {
    0% {
        transform: rotateX(-50deg) rotateY(35deg) rotateZ(0deg) translateZ(-20px);
    }
    100% {
        transform: rotateX(-45deg) rotateY(29deg) rotateZ(-7deg) translateZ(-16px);
    }
}

.artifact-ring-tertiary {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 300px;
    height: 300px;
    margin-left: -150px;
    margin-top: -150px;
    border-radius: 50%;
    border: 1px solid rgba(109, 40, 217, 0.35);
    transform: rotateY(70deg) rotateZ(20deg) translateZ(25px);
}

/* Layer 3: Central Polyhedral Prism Cluster with floating pulse */
.artifact-prism-cluster {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 130px;
    height: 130px;
    margin-left: -65px;
    margin-top: -65px;
    transform-style: preserve-3d;
    transform: translateZ(20px);
    animation: prismFloat 9s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes prismFloat {
    0% {
        transform: translateZ(18px) rotateZ(0deg);
    }
    100% {
        transform: translateZ(26px) rotateZ(2.5deg);
    }
}

.prism-glow {
    position: absolute;
    inset: -25px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.42) 0%, rgba(109, 40, 217, 0.28) 45%, transparent 75%);
    filter: blur(18px);
    transform: translateZ(-5px);
}

.prism-facet {
    pointer-events: none;
    backface-visibility: visible;
}

.prism-facet-top {
    position: absolute;
    width: 86px;
    height: 86px;
    left: 22px;
    top: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(2, 132, 199, 0.45) 50%, rgba(109, 40, 217, 0.35) 100%);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    transform: rotateX(60deg) rotateZ(45deg) translateZ(35px);
    box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.7), 0 8px 24px rgba(2, 132, 199, 0.25);
}

.prism-facet-left {
    position: absolute;
    width: 86px;
    height: 76px;
    left: 22px;
    top: 27px;
    background: linear-gradient(180deg, rgba(2, 132, 199, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-left: 1px solid rgba(2, 132, 199, 0.9);
    border-bottom: 1px solid rgba(2, 132, 199, 0.4);
    transform: rotateY(-35deg) rotateX(20deg) translateZ(30px);
    clip-path: polygon(50% 0%, 100% 70%, 50% 100%, 0% 70%);
}

.prism-facet-right {
    position: absolute;
    width: 86px;
    height: 76px;
    left: 22px;
    top: 27px;
    background: linear-gradient(180deg, rgba(109, 40, 217, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
    border-right: 1px solid rgba(109, 40, 217, 0.9);
    border-bottom: 1px solid rgba(109, 40, 217, 0.4);
    transform: rotateY(35deg) rotateX(20deg) translateZ(30px);
    clip-path: polygon(50% 0%, 100% 70%, 50% 100%, 0% 70%);
}

.prism-facet-front {
    position: absolute;
    width: 70px;
    height: 70px;
    left: 30px;
    top: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(2, 132, 199, 0.25) 100%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    transform: translateZ(52px);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.prism-specular-accent {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 2px;
    margin-left: -22px;
    margin-top: -1px;
    background: #ffffff;
    box-shadow: 0 0 10px #ffffff;
    transform: rotate(45deg) translateZ(62px);
    opacity: 0.85;
}

/* Layer 4: Satellite Telemetry Nodes (Z: +85px to +110px) */
.artifact-satellite {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    transform-style: preserve-3d;
    pointer-events: none;
}

.sat-node-1 {
    left: 12px;
    top: 52px;
    transform: translateZ(90px);
}

.sat-node-2 {
    right: 18px;
    top: 96px;
    transform: translateZ(85px);
}

.sat-node-3 {
    left: 45px;
    bottom: 42px;
    transform: translateZ(105px);
}

.sat-beacon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0284c7;
    box-shadow: 0 0 8px #0284c7;
    display: inline-block;
}

.sat-label {
    font-family: var(--font-code);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #0284c7;
    background: rgba(2, 132, 199, 0.08);
    padding: 2px 7px;
    border-radius: 3px;
    border: 1px solid rgba(2, 132, 199, 0.28);
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sat-node-highlighted .sat-label {
    border-color: #38bdf8 !important;
    background: rgba(2, 132, 199, 0.3) !important;
    color: #0284c7 !important;
    box-shadow: 0 0 14px rgba(2, 132, 199, 0.45) !important;
}

.sat-node-highlighted .sat-beacon {
    background: #38bdf8 !important;
    box-shadow: 0 0 12px #38bdf8 !important;
}

.artifact-scene-soft-glow {
    filter: drop-shadow(0 0 24px rgba(2, 132, 199, 0.3));
    transition: filter 0.3s ease;
}

/* Layer 5: Luminous Energy Core Spark (Z: +120px) */
.artifact-apex-spark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    margin-top: -4px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 14px 4px #0284c7, 0 0 26px 6px #6d28d9;
    transform: translateZ(118px);
    pointer-events: none;
}

/* Artifact Stage Caption */
.artifact-caption {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-code);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 10px;
}

.artifact-caption-icon {
    color: var(--cyan);
    font-size: 10px;
}

/* Short Desktop Viewports (e.g. 1366x654 or laptops with browser UI) */
@media (min-width: 1024px) and (max-height: 740px) {
    #authority {
        padding: 26px 0 38px;
        scroll-margin-top: 72px;
    }

    .build-header {
        margin-bottom: 14px;
    }

    .build-kicker {
        margin-bottom: 5px;
    }

    .build-title {
        font-size: clamp(2.1rem, 3.4vw, 2.7rem);
    }

    .build-subtitle {
        font-size: 14.5px;
        line-height: 1.5;
    }

    .build-stage-row {
        gap: 32px;
    }

    .artifact-stage {
        height: 290px;
        max-width: 290px;
    }

    .artifact-scene {
        transform: scale(0.78);
        transform-origin: center center;
    }

    .build-artifact-badge {
        font-size: 9px;
        margin-bottom: 6px;
    }

    .artifact-caption {
        font-size: 10px;
        margin-top: 6px;
    }

    .build-disciplines-list {
        gap: 10px;
    }

    .build-discipline-item {
        padding: 12px 16px;
        gap: 6px;
    }

    .build-disc-title {
        font-size: 16.5px;
    }

    .build-disc-desc {
        font-size: 13.5px;
        line-height: 1.5;
    }
}

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    #authority {
        padding: 52px 0 48px;
        scroll-margin-top: 72px;
    }

    .build-header {
        margin-bottom: 22px;
    }

    .build-header-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .build-stage-row {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .build-artifact-col {
        order: -1;
        align-items: center;
        text-align: center;
    }

    .artifact-stage {
        height: 300px;
        max-width: 300px;
        margin: 0 auto;
    }

    .artifact-scene {
        transform: scale(0.82);
        transform-origin: center center;
    }

    .artifact-caption {
        justify-content: center;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    #authority {
        padding: 34px 0 58px !important;
        scroll-margin-top: 68px;
    }

    .build-header {
        margin-bottom: 16px;
    }

    .build-header-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .build-title {
        font-size: clamp(1.95rem, 8vw, 2.35rem);
        line-height: 1.15;
    }

    .build-subtitle {
        font-size: 14px;
        line-height: 1.55;
    }

    /* 3D Artifact Centerpiece: Compact, Centered & Contained */
    .build-stage-row {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-bottom: 0;
    }

    .build-artifact-col {
        order: -1;
        align-items: center;
        text-align: center;
        margin-bottom: 4px;
    }

    .build-artifact-badge {
        font-size: 9px;
        letter-spacing: 0.1em;
        margin-bottom: 8px;
        justify-content: center;
    }

    /* Compact stage: ~195-205px height, centered */
    .artifact-stage {
        height: 200px !important;
        max-width: 270px !important;
        margin: 0 auto !important;
        overflow: visible;
        perspective: 900px !important;
    }

    .artifact-scene {
        width: 200px !important;
        height: 200px !important;
        margin: 0 auto !important;
        transform: none !important;
    }

    /* Enlarge Central 3D Object (145-170px wide) with Slow 3D Rotation Oscillation */
    .artifact-prism-cluster {
        width: 130px !important;
        height: 130px !important;
        margin-left: -65px !important;
        margin-top: -65px !important;
        animation: mobilePrism3D 14s ease-in-out infinite !important;
        transform-origin: center center;
    }

    /* Refined 3D Facets: balanced cyan/blue/purple depth, crisp bevels, inner shadow */
    .prism-facet-top {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(56, 189, 248, 0.55) 45%, rgba(109, 40, 217, 0.4) 100%) !important;
        border: 1px solid rgba(255, 255, 255, 0.9) !important;
        box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.75), 0 6px 20px rgba(2, 132, 199, 0.3) !important;
    }

    .prism-facet-left {
        background: linear-gradient(180deg, rgba(2, 132, 199, 0.82) 0%, rgba(15, 23, 42, 0.88) 100%) !important;
        border-left: 1.5px solid rgba(56, 189, 248, 0.95) !important;
        border-bottom: 1px solid rgba(2, 132, 199, 0.5) !important;
        box-shadow: inset 2px 2px 8px rgba(56, 189, 248, 0.3) !important;
    }

    .prism-facet-right {
        background: linear-gradient(180deg, rgba(124, 58, 237, 0.82) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
        border-right: 1.5px solid rgba(167, 139, 250, 0.95) !important;
        border-bottom: 1px solid rgba(124, 58, 237, 0.5) !important;
        box-shadow: inset -2px 2px 8px rgba(167, 139, 250, 0.3) !important;
    }

    .prism-facet-front {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(56, 189, 248, 0.3) 60%, rgba(124, 58, 237, 0.2) 100%) !important;
        border: 1.2px solid rgba(255, 255, 255, 0.85) !important;
        box-shadow: 0 0 12px rgba(56, 189, 248, 0.35) !important;
    }

    .prism-glow {
        background: radial-gradient(circle, rgba(2, 132, 199, 0.48) 0%, rgba(124, 58, 237, 0.32) 48%, transparent 72%) !important;
        filter: blur(16px) !important;
    }

    .prism-specular-accent {
        background: #ffffff !important;
        box-shadow: 0 0 12px #38bdf8, 0 0 4px #ffffff !important;
    }

    /* Hide cluttered floating technical text badges on mobile; keep satellite beacon dots */
    .sat-label {
        display: none !important;
    }

    .sat-beacon {
        width: 7px;
        height: 7px;
        box-shadow: 0 0 10px #0284c7;
    }

    .sat-node-1 {
        left: 20px;
        top: 42px;
        transform: translateZ(50px);
    }

    .sat-node-2 {
        right: 15px;
        top: 72px;
        transform: translateZ(45px);
    }

    .sat-node-3 {
        left: 36px;
        bottom: 34px;
        transform: translateZ(55px);
    }

    /* Counter-rotating decorative orbit */
    .artifact-ring-tertiary {
        display: none !important;
    }

    .artifact-ring-secondary {
        width: 175px !important;
        height: 175px !important;
        margin-left: -87.5px !important;
        margin-top: -87.5px !important;
        opacity: 0.45 !important;
    }

    .artifact-ring-primary {
        width: 220px !important;
        height: 220px !important;
        margin-left: -110px !important;
        margin-top: -110px !important;
        animation: mobileOrbit3D 58s linear infinite !important;
    }

    .artifact-layer-coords {
        width: 190px !important;
        height: 190px !important;
        left: 50% !important;
        top: 50% !important;
        margin-left: -95px !important;
        margin-top: -95px !important;
        opacity: 0.28 !important;
        transform: translateZ(-30px) !important;
    }

    .artifact-shadow-plane {
        width: 180px !important;
        height: 90px !important;
        margin-left: -90px !important;
        margin-top: -45px !important;
    }

    .artifact-caption {
        font-size: 10px;
        margin-top: 8px;
        justify-content: center;
        color: var(--text-muted);
    }

    /* Clear visual gap before Capabilities & Methods */
    .build-col-label {
        margin-top: 6px;
        margin-bottom: 16px;
        font-size: 11px;
        letter-spacing: 0.16em;
        display: block;
    }

    /* Capability items in normal document flow */
    .build-disciplines-col {
        padding-right: 0;
    }

    .build-disciplines-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-right: 0 !important;
    }

    .build-discipline-item {
        padding: 13px 15px;
        background: rgba(255, 255, 255, 0.72);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: 1px solid rgba(15, 23, 42, 0.06);
        border-left: 3px solid rgba(2, 132, 199, 0.4);
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.02);
        height: auto !important;
        min-height: 0 !important;
        overflow: visible;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    }

    .build-discipline-item:last-child {
        padding-right: 48px;
        margin-bottom: 6px;
    }

    .build-discipline-item:active {
        background: rgba(2, 132, 199, 0.08);
        border-left-color: var(--cyan);
        transform: scale(0.99);
    }

    .build-discipline-header {
        gap: 10px;
    }

    .build-disc-num {
        font-size: 11px;
        padding: 2px 7px;
    }

    .build-disc-title {
        font-size: 16px;
        line-height: 1.25;
        word-break: break-word;
    }

    .build-disc-desc {
        font-size: 13.5px;
        line-height: 1.52;
        word-break: break-word;
    }
}

/* Narrow mobile (<= 340px) */
@media (max-width: 340px) {
    #authority {
        padding: 28px 0 52px !important;
        scroll-margin-top: 64px;
    }

    .build-header {
        margin-bottom: 12px;
    }

    .build-kicker {
        margin-bottom: 4px;
    }

    .build-kicker-text {
        font-size: 9.5px;
        letter-spacing: 0.12em;
    }

    .build-title {
        font-size: 1.85rem;
        line-height: 1.15;
    }

    .build-subtitle {
        font-size: 13px;
        line-height: 1.48;
    }

    .build-stage-row {
        gap: 24px;
    }

    .build-artifact-badge {
        font-size: 8px;
        letter-spacing: 0.08em;
        max-width: 250px;
        margin-bottom: 6px;
    }

    .artifact-stage {
        height: 190px !important;
        max-width: 240px !important;
        margin: 0 auto !important;
    }

    .artifact-scene {
        width: 180px !important;
        height: 180px !important;
        transform: none !important;
    }

    .artifact-prism-cluster {
        animation: mobilePrism3DNarrow 14s ease-in-out infinite !important;
    }

    .artifact-ring-primary {
        width: 195px !important;
        height: 195px !important;
        margin-left: -97.5px !important;
        margin-top: -97.5px !important;
    }

    .artifact-caption {
        font-size: 9px;
        max-width: 250px;
        line-height: 1.35;
        margin-top: 6px;
    }

    .build-col-label {
        font-size: 10px;
        margin-top: 4px;
        margin-bottom: 14px;
    }

    .build-disciplines-list {
        gap: 10px;
        padding-right: 0 !important;
    }

    .build-discipline-item {
        padding: 11px 13px;
        border-radius: 9px;
    }

    .build-discipline-item:last-child {
        padding-right: 44px;
        margin-bottom: 4px;
    }

    .build-disc-title {
        font-size: 15px;
    }

    .build-disc-desc {
        font-size: 12.5px;
        line-height: 1.48;
    }
}

/* Mobile 3D Artifact Movement Keyframes */
@keyframes mobilePrism3D {
    0% {
        transform: scale(1.24) translateZ(24px) rotateX(5deg) rotateY(-14deg) rotateZ(-1.5deg);
    }
    50% {
        transform: scale(1.24) translateZ(28px) rotateX(-5deg) rotateY(14deg) rotateZ(1.5deg);
    }
    100% {
        transform: scale(1.24) translateZ(24px) rotateX(5deg) rotateY(-14deg) rotateZ(-1.5deg);
    }
}

@keyframes mobilePrism3DNarrow {
    0% {
        transform: scale(1.12) translateZ(22px) rotateX(5deg) rotateY(-13deg) rotateZ(-1.5deg);
    }
    50% {
        transform: scale(1.12) translateZ(26px) rotateX(-5deg) rotateY(13deg) rotateZ(1.5deg);
    }
    100% {
        transform: scale(1.12) translateZ(22px) rotateX(5deg) rotateY(-13deg) rotateZ(-1.5deg);
    }
}

@keyframes mobileOrbit3D {
    0% {
        transform: rotateX(65deg) rotateY(20deg) rotateZ(0deg) translateZ(10px);
    }
    100% {
        transform: rotateX(65deg) rotateY(20deg) rotateZ(-360deg) translateZ(10px);
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .artifact-scene,
    .artifact-tilt-wrap,
    .artifact-ring-primary,
    .artifact-ring-secondary,
    .artifact-prism-cluster,
    .artifact-shadow-plane {
        animation: none !important;
        transition: none !important;
    }

    .artifact-scene {
        transform: rotateX(8deg) rotateY(-10deg) !important;
    }
}

/* Accessibility: JavaScript Disabled Fallback */
@media (scripting: none) {
    #authority [data-animate] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Projects Carousel */
.project-carousel-container {
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
}

.project-carousel-track {
    display: flex;
    align-items: center;
    gap: 20px;
    width: max-content;
    animation: scroll-projects 40s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

.project-carousel-track:hover,
.project-carousel-track:active {
    animation-play-state: paused !important;
}

@keyframes scroll-projects {
    to {
        transform: translateX(calc(-50% - 10px));
    }
}

.project-card {
    width: 280px;
    max-width: 280px;
    max-height: 240px;
    flex-shrink: 0;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: var(--transition);
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-4px) scale(1.02) translateZ(0);
    border-color: var(--cyan);
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.15);
}

.project-image {
    width: 100%;
    height: 150px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.project-image picture {
    width: 100%;
    height: 100%;
    display: block;
}

.project-image i {
    font-size: 36px;
    color: var(--cyan);
    opacity: 0.6;
}

.project-image img.p-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    transition: var(--transition);
}

.project-card:hover .project-image img.p-img {
    transform: scale(1.03);
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
    line-height: 1.3;
    color: var(--text-primary);
    transition: var(--transition-snap);
}

.project-card:hover .project-title {
    color: var(--cyan);
}

@media (max-width: 768px) {
    .project-carousel-container {
        overflow: hidden !important;
        padding: 0 0 8px;
    }

    .project-carousel-track {
        width: max-content;
        gap: 14px;
        padding: 0 7.5vw;
    }

    .project-card {
        width: 75vw;
        max-width: 280px;
        max-height: 240px;
        scroll-snap-align: center;
    }

    .project-card:hover {
        transform: scale(1.01) translateZ(0);
    }
}

/* Workflow */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline-line {
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0, 0, 0, 0.08);
}

.timeline-line-fill {
    width: 100%;
    background: var(--gradient-main);
    height: 0;
    will-change: height;
    transform: translateZ(0);
}

.timeline-item {
    position: relative;
    padding-left: 100px;
    margin-bottom: 56px;
    will-change: transform, opacity;
    transform: translateZ(0);
}

.timeline-icon {
    position: absolute;
    left: 34px;
    top: 0;
    width: 34px;
    height: 34px;
    background: var(--bg-primary);
    border: 2px solid var(--cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 14px;
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.2);
    will-change: transform;
    transform: translateZ(0);
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========================================================== */
/* CLIENT REVIEWS (#testimonials) & LEAVE A REVIEW FLOW       */
/* ========================================================== */
#testimonials {
    scroll-margin-top: 90px;
    padding: clamp(56px, 7vh, 88px) 0 clamp(80px, 10vh, 116px);
    position: relative;
}

.reviews-display-area {
    width: 100%;
    margin-bottom: clamp(36px, 5vh, 52px);
}

/* Professional Empty State */
.reviews-empty-state {
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-lg, 16px);
    padding: clamp(32px, 5vw, 44px) clamp(20px, 4vw, 36px);
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.empty-state-badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.08);
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: clamp(1.2rem, 2.2vw, 1.4rem);
    font-weight: 700;
    color: #111827; /* WCAG AA: 16.8:1 */
    margin: 0 0 10px 0;
}

.empty-state-text {
    font-size: 1rem;
    line-height: 1.65;
    color: #334155; /* WCAG AA: 9.8:1 */
    margin: 0 auto 22px;
    max-width: 540px;
}

.empty-state-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.review-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 8px;
    background-color: #0369a1;
    background-image: linear-gradient(135deg, #0369a1, #5b21b6);
    color: #ffffff;
    min-height: 44px;
    min-width: 44px;
    text-decoration: none;
    box-sizing: border-box;
}

.copy-review-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 11px 20px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0369a1; /* WCAG AA: 5.6:1 */
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

.copy-review-link-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0284c7;
}

.copy-review-link-btn:focus-visible {
    outline: 2px solid #0284c7 !important;
    outline-offset: 2px !important;
}

.copy-link-feedback {
    font-size: 0.85rem;
    color: #0369a1;
    font-weight: 600;
    min-height: 20px;
    display: inline-flex;
    align-items: center;
}

/* Verified Reviews Grid (When verified reviews exist) */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1080px;
    margin: 0 auto;
    perspective: 1000px;
}

.review-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.3s ease;
    text-align: left;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.review-form-container.is-collapsed {
    display: none !important;
}

.review-form-container.is-revealed {
    display: block !important;
    animation: reviewFormFadeIn 0.35s ease-out;
}

@keyframes reviewFormFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-card:hover {
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.12);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0284c7;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.review-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.review-author {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.review-project-name {
    font-size: 0.82rem;
    color: #475569;
    font-weight: 500;
}

.review-stars {
    color: #b45309; /* WCAG AA: 4.64:1 on white */
    font-size: 0.92rem;
    letter-spacing: 2px;
}

.review-text {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #334155;
    margin: 0;
}

/* Leave a Review Form Container */
.review-form-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: clamp(28px, 4vw, 40px);
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
    scroll-margin-top: 90px;
    text-align: left;
    box-sizing: border-box;
}

.review-form-container.is-collapsed {
    display: none !important;
}

.review-form-container.is-revealed {
    display: block !important;
    animation: reviewFormFadeIn 0.35s ease-out;
}

@keyframes reviewFormFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-form-header {
    margin-bottom: 24px;
}

.review-form-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0369a1;
    margin-bottom: 6px;
}

.review-form-title {
    font-size: clamp(1.3rem, 2.4vw, 1.6rem);
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px 0;
}

.review-disclaimer {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0 0 14px 0;
}

.external-inline-link {
    color: #0369a1;
    text-decoration: underline;
    font-weight: 600;
    text-underline-offset: 3px;
}

.external-inline-link:hover {
    color: #0284c7;
}

.external-inline-link:focus-visible {
    outline: 2px solid #0284c7 !important;
    outline-offset: 2px !important;
}

.form-share-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    flex-wrap: wrap;
}

#reviewForm {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    display: block;
}

.required-indicator {
    color: #b91c1c;
    font-weight: 700;
}

.optional-label {
    font-size: 0.82rem;
    font-weight: 400;
    color: #64748b;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    color: #0f172a;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    min-height: 44px;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18);
}

.form-textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.55;
}

.star-rating-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.star-rating-group {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
    flex-wrap: wrap;
}

.star-radio-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.star-radio-label:hover {
    background: rgba(2, 132, 199, 0.08);
}

.star-radio-input {
    position: absolute;
    opacity: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    cursor: pointer;
}

.star-radio-input:focus-visible + .star-icon {
    outline: 2px solid #0284c7;
    outline-offset: 3px;
    border-radius: 4px;
}

.star-icon {
    font-size: 1.65rem;
    color: #cbd5e1;
    transition: color 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.star-radio-label.is-active .star-icon,
.star-radio-label.is-hover .star-icon {
    color: #b45309; /* WCAG AA: 4.64:1 */
}

.rating-display-text {
    font-size: 0.84rem;
    color: #475569;
    font-weight: 500;
    margin-top: 6px;
}

.char-counter {
    font-size: 0.8rem;
    color: #64748b;
    text-align: right;
    margin-top: 4px;
}

.form-checkbox-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 4px;
}

.form-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #0284c7;
    cursor: pointer;
    flex-shrink: 0;
    min-height: 20px;
    min-width: 20px;
}

.form-checkbox:focus-visible {
    outline: 2px solid #0284c7 !important;
    outline-offset: 2px !important;
}

.checkbox-label {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #334155;
    cursor: pointer;
}

.form-field-error {
    font-size: 0.82rem;
    color: #b91c1c;
    font-weight: 600;
    min-height: 18px;
    margin-top: 4px;
}

.form-submit-row {
    margin-top: 8px;
}

.review-submit-btn {
    min-height: 48px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    background-color: #0369a1;
    background-image: linear-gradient(135deg, #0369a1, #5b21b6);
    color: #ffffff;
    cursor: pointer;
    width: fit-content;
    box-sizing: border-box;
}

.review-submit-btn:focus-visible {
    outline: 2px solid #0284c7 !important;
    outline-offset: 3px !important;
}

.review-status-notice {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.55;
    display: none;
    margin-top: 16px;
    border: 1px solid transparent;
}

.review-status-notice.is-info {
    display: block;
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
}

.review-status-notice.is-error {
    display: block;
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Reviews Responsive Adaptations */
@media screen and (max-width: 768px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media screen and (max-width: 639px) {
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .empty-state-actions {
        flex-direction: column;
        width: 100%;
    }
    .review-cta-btn,
    .copy-review-link-btn {
        width: 100%;
        justify-content: center;
    }
    .review-form-container {
        padding: 22px 16px;
    }
    .review-submit-btn {
        width: 100%;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .review-card {
        transform: none !important;
        transition: none !important;
    }
    .star-icon {
        transition: none !important;
    }
}

/* ========================================== */
/* REAL CHATBOT WIDGET UI                     */
/* ========================================== */
.chat-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    /* Absolute highest priority - guarantees clickability */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-main);
}

/* The Professional Button */
.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-main);
    color: #ffffff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(2, 132, 199, 0.5);
}

/* The Chat Panel */
.chat-window {
    width: 350px;
    height: 450px;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: bottom right;
}

.chat-window.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chat-header {
    background: rgba(2, 132, 199, 0.05);
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.close-chat-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s;
}

.close-chat-btn:hover {
    color: var(--cyan);
}

/* Messages Container */
.chat-messages {
    position: relative;
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Global Light Theme Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Chat Scrollbar formatting */
#chat-messages::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 5px;
}
#chat-messages::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
#chat-messages::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
#chat-messages::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Message Bubbles */
.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: fadeInMsg 0.3s ease;
}

@keyframes fadeInMsg {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.message.user {
    align-self: flex-end;
}

.message.bot {
    align-self: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.user .message-content,
.user-msg span {
    background: var(--gradient-main);
    color: #ffffff !important;
    border-bottom-right-radius: 2px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    font-weight: 500;
}

.message.bot .message-content,
.ai-msg span {
    background: #f1f5f9;
    color: #0f172a !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* Input Area */
.chat-input-area {
    padding: 15px;
    background: var(--bg-primary);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-area input {
    flex: 1;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 12px 15px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
    font-family: var(--font-main);
}

.chat-input-area input:focus {
    border-color: var(--cyan);
}

.chat-input-area button {
    background: var(--gradient-main);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
    flex-shrink: 0;
    font-size: 16px;
}

.chat-input-area button:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 400px;
        right: 20px;
        bottom: 80px;
        position: fixed;
        margin: 0;
    }

    .chat-toggle-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .chat-widget-container {
        right: 20px;
        bottom: 20px;
    }
}

/* ============================================================ */
/* CONTACT SECTION: BALANCED REDESIGN & RESTRAINED 3D           */
/* ============================================================ */
#contact {
    position: relative;
    padding-bottom: 80px;
}

#contact .container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.contact-hub-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 36px;
    width: 100%;
}

/* Featured Primary Card (Email Me) */
.contact-card-featured {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 24px 28px;
    background: #ffffff;
    border: 1px solid rgba(2, 132, 199, 0.22);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.contact-card-featured-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.08), transparent 70%);
    pointer-events: none;
    opacity: 0.8;
}

.contact-featured-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-featured-main {
    display: flex;
    align-items: center;
    gap: 18px;
}

.contact-featured-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--cyan);
    background: rgba(2, 132, 199, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.contact-icon-box {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 14px;
    background: rgba(2, 132, 199, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--cyan);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.contact-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.25;
}

.contact-card-detail {
    font-size: 0.95rem;
    color: var(--cyan);
    font-weight: 500;
    margin: 0;
    line-height: 1.35;
}

.contact-featured-description {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

.contact-card-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cyan);
    margin-top: 4px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.contact-card-action i {
    transition: transform 0.2s ease;
}

/* Secondary 2x2 Balanced Grid */
.contact-secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
}

.contact-card-secondary {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    text-decoration: none;
    gap: 16px;
    position: relative;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-card-arrow {
    margin-left: auto;
    font-size: 14px;
    color: #94a3b8;
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Desktop Hover & 3D Tilt */
@media (hover: hover) and (pointer: fine) {
    .contact-card-featured:hover {
        border-color: var(--cyan);
        box-shadow: 0 16px 36px rgba(2, 132, 199, 0.14);
    }
    .contact-card-featured:hover .contact-icon-box {
        background: var(--cyan);
        color: #ffffff;
        transform: scale(1.05);
    }
    .contact-card-featured:hover .contact-card-action i {
        transform: translateX(4px);
    }

    .contact-card-secondary:hover {
        transform: translateY(-2px);
        border-color: var(--cyan);
        box-shadow: 0 8px 24px rgba(2, 132, 199, 0.12);
    }
    .contact-card-secondary:hover .contact-icon-box {
        background: var(--cyan);
        color: #ffffff;
    }
    .contact-card-secondary:hover .contact-card-arrow {
        color: var(--cyan);
        transform: translate(2px, -2px);
    }
}

/* Focus Visibility */
.contact-card:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 3px !important;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .contact-card,
    .contact-card-featured,
    .contact-card-secondary,
    .contact-card-arrow,
    .contact-card-action i,
    .contact-icon-box {
        transform: none !important;
        transition: none !important;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #contact,
    #contact.section {
        padding-bottom: 96px !important; /* Clearance for fixed chat launcher */
    }
    .contact-secondary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .contact-card-featured {
        padding: 18px 20px;
    }
    .contact-card-secondary {
        padding: 14px 16px;
        min-height: 56px;
    }
}
@media (max-width: 480px) {
    #contact,
    #contact.section {
        padding-bottom: 104px !important;
    }
    .contact-card-featured {
        padding: 16px;
    }
    .contact-card-title {
        font-size: 1.05rem;
    }
    .contact-card-detail {
        font-size: 0.88rem;
    }
    .contact-featured-description {
        font-size: 0.84rem;
    }
}

/* Footer */
footer {
    padding: 56px 0;
    border-top: 1px solid var(--glass-border);
    background: #ffffff;
    margin-top: var(--section-gap);
}

footer h2 {
    margin-bottom: 8px;
}

footer p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Utilities */
.magnetic {
    display: inline-block;
}

[data-animate] {
    opacity: 0;
}

.animated {
    opacity: 1;
}

/* ========================================== */
/* INFINITE LOGO MARQUEE                      */
/* ========================================== */
.marquee-section {
    padding: clamp(28px, 4vh, 44px) 0;
    background: transparent;
    border: none;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 80px;
    padding-left: 80px;
    animation: scrollMarquee 30s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

.marquee-container:hover .marquee-track,
.marquee-track:hover,
.marquee-container:focus-within .marquee-track {
    animation-play-state: paused !important;
}

.marquee-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marquee-item img {
    height: 36px;
    width: auto;
    max-width: none;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: filter 0.25s ease, transform 0.25s ease;
    cursor: default;
}

@media (hover: hover) and (pointer: fine) {
    .marquee-item img:hover,
    .marquee-item:focus-within img {
        filter: grayscale(0%) opacity(1) drop-shadow(0 0 10px rgba(2, 132, 199, 0.45));
        transform: scale(1.08);
    }
}

@keyframes scrollMarquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Mobile Responsiveness Updates */
@media (max-width: 768px) {
    .marquee-section {
        padding: 4px 0 8px !important;
        margin: 0 auto !important;
        position: relative !important;
        clear: both !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .marquee-container {
        overflow: hidden !important;
        position: relative !important;
        width: 100% !important;
        /* Reserved clearance ensures ticker never touches or passes under floating chat button (right: 14px, w: 48px) */
        max-width: calc(100% - 72px) !important;
        margin-left: 10px !important;
        margin-right: auto !important;
        padding: 4px 0 !important;
        box-sizing: border-box !important;
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 18px, black calc(100% - 18px), transparent 100%) !important;
        mask-image: linear-gradient(to right, transparent 0%, black 18px, black calc(100% - 18px), transparent 100%) !important;
    }

    .marquee-track {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: max-content !important;
        gap: 24px !important;
        padding-left: 0 !important;
        padding-right: 24px !important; /* matches gap for seamless -50% loop */
        margin: 0 !important;
        animation: scrollMarquee 22s linear infinite !important;
        will-change: transform;
    }

    .marquee-item {
        flex: 0 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Keep decorative duplicates active for seamless loop on mobile animation */
    .marquee-item[aria-hidden="true"] {
        display: inline-flex !important;
    }

    .marquee-item img {
        height: 22px !important;
        width: auto !important;
        max-width: none !important;
        object-fit: contain !important;
        filter: grayscale(100%) opacity(0.65) !important;
        transition: filter 0.2s ease, opacity 0.2s ease;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .marquee-container {
        -webkit-mask-image: none !important;
        mask-image: none !important;
        overflow-x: auto !important;
        scrollbar-width: none;
    }
    .marquee-container::-webkit-scrollbar {
        display: none;
    }

    .marquee-track {
        animation: none !important;
        transform: none !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 28px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        width: max-content !important;
        margin: 0 auto !important;
    }

    .marquee-item[aria-hidden="true"] {
        display: none !important;
    }
}

/* ========================================== */
/* EXACT ORBIT RADAR UI — SCALABLE & RESPONSIVE */
/* ========================================== */
#process {
    --orbit-size: clamp(320px, calc(100vh - 265px), 425px);
    --orbit-size: clamp(320px, calc(100svh - 265px), 425px);
    scroll-margin-top: 105px;
    position: relative;
    z-index: 10;
    padding: 20px 0 20px 0;
}

#process .section-title {
    margin-bottom: 20px;
}

.radar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    gap: 48px;
    padding: 0 24px;
}

/* Left Menu (Staggered Pill Design) */
.radar-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.radar-btn {
    background: transparent;
    border: 2px solid var(--text-secondary);
    padding: 10px 28px;
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.radar-btn.staggered-1 {
    margin-left: 36px;
}

.radar-btn.staggered-2 {
    margin-left: 72px;
}

.radar-btn:hover {
    border-color: var(--cyan);
    color: var(--text-primary);
}

.radar-btn.active {
    background: var(--cyan);
    border-color: var(--cyan);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
}

/* Right Radar Visual: Exactly 1:1, driven by --orbit-size */
.radar-visual {
    width: var(--orbit-size);
    height: var(--orbit-size);
    max-width: calc(100vw - 32px);
    max-height: calc(100vw - 32px);
    aspect-ratio: 1 / 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    flex-shrink: 0;
}

/* Concentric Rings with Flawless Rotation */
.radar-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ring-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(2, 132, 199, 0.15);
}

.ring-outer {
    border-top: 3px solid var(--cyan);
    border-right: 1px solid var(--cyan);
    animation: spinRadar 15s linear infinite;
    will-change: transform;
}

.ring-middle {
    border-bottom: 3px solid var(--cyan);
    border-left: 1px solid var(--cyan);
    animation: spinRadarReverse 20s linear infinite;
    will-change: transform;
}

.ring-inner {
    background: radial-gradient(circle, rgba(2, 132, 199, 0.08) 0%, transparent 70%);
    box-shadow: inset 0 0 40px rgba(2, 132, 199, 0.05);
}

@keyframes spinRadar {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinRadarReverse {
    100% {
        transform: rotate(-360deg);
    }
}

/* Orbit Nodes: Centered on the Outer Ring (Radius = 50%) */
.radar-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.r-node {
    position: absolute;
    width: clamp(38px, 11%, 48px);
    height: clamp(38px, 11%, 48px);
    background: var(--bg-primary);
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 2.8%, 1.15rem);
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    z-index: 10;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

/* Accessible Tap Target (>= 44px) */
.r-node::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 44px;
    min-height: 44px;
    width: 100%;
    height: 100%;
}

.r-node:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    transform: translate(-50%, -50%) scale(1.1);
}

.r-node.active {
    background: var(--cyan);
    border-color: var(--cyan);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
    transform: translate(-50%, -50%) scale(1.15);
    z-index: 12;
}

/* 5 exact geometric coordinates on outer ring circumference */
.r-node:nth-child(1) { top: 0%; left: 50%; }
.r-node:nth-child(2) { top: 34.55%; left: 97.55%; }
.r-node:nth-child(3) { top: 90.45%; left: 79.39%; }
.r-node:nth-child(4) { top: 90.45%; left: 20.61%; }
.r-node:nth-child(5) { top: 34.55%; left: 2.45%; }

/* Locked Center Dynamic Text */
.radar-center-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38%;
    height: 38%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
    padding: 8px;
}

#radar-desc {
    font-size: clamp(12px, 1.2vw, 13.5px);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 0;
    max-width: 90%;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    transition: opacity 0.25s ease;
}

/* Breakpoint: <= 991px Stacked Mobile Layout */
@media (max-width: 991px) {
    #process {
        --orbit-size: clamp(250px, min(82vw, calc(100vh - 260px)), 320px);
        --orbit-size: clamp(250px, min(82vw, calc(100svh - 260px)), 320px);
        padding: 56px 0 48px 0;
    }

    #process .section-title {
        margin-bottom: 20px;
    }

    .radar-container {
        flex-direction: column;
        align-items: center;
        gap: 24px;
        padding: 0 16px;
        max-width: 100%;
    }

    /* Orbit Diagram centered first */
    .radar-visual {
        order: 1;
        margin: 0 auto;
    }

    /* 5 Process Pills as wrapped chips second */
    .radar-menu {
        order: 2;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px 10px;
        width: 100%;
        max-width: 440px;
        margin: 0 auto;
        padding: 0;
        overflow: visible;
    }

    .radar-btn {
        margin-left: 0 !important;
        padding: 10px 18px !important;
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.84rem;
        letter-spacing: 0.5px;
        border-width: 1.5px;
    }

    .radar-btn.staggered-1,
    .radar-btn.staggered-2 {
        margin-left: 0 !important;
    }

    .r-node {
        width: clamp(36px, 11%, 42px);
        height: clamp(36px, 11%, 42px);
        font-size: 0.95rem;
    }

    #radar-desc {
        font-size: 12px;
        line-height: 1.3;
    }
}

@media (min-width: 992px) {
    #radar-desc {
        font-size: 13.5px;
        line-height: 1.4;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .ring-outer,
    .ring-middle {
        animation: none !important;
    }
}

/* ========================================== */
/* GLOWING ACCORDION FAQ SECTION              */
/* ========================================== */
.faq-container {
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

.faq-card {
    background: var(--bg-glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.faq-card:hover {
    border-color: rgba(2, 132, 199, 0.4);
    box-shadow: 0 5px 20px rgba(2, 132, 199, 0.05);
}

.faq-header {
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.faq-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.3s ease;
}

.faq-card:hover .faq-header h3 {
    color: var(--text-primary);
}

.faq-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.05);
    border: 1px solid rgba(2, 132, 199, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 0.9rem;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.faq-card.active .faq-icon {
    background: var(--cyan);
    color: #ffffff;
    transform: rotate(135deg);
    /* Plus turns into custom close cross */
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.faq-card.active {
    border-color: var(--cyan);
    background: rgba(2, 132, 199, 0.02);
}

/* Advanced GSAP Max-Height Hidden Setup */
.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.faq-content {
    padding: 0 30px 24px 30px;
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Responsive Scaling */
@media (max-width: 768px) {
    .faq-header {
        padding: 20px;
    }

    .faq-header h3 {
        font-size: 1rem;
    }

    .faq-content {
        padding: 0 20px 20px 20px;
        font-size: 0.9rem;
    }
}

/* Add this at the very bottom of style.css to kill mobile scroll lag */
/* Fix: Fixed backgrounds and heavy filters cause massive FPS drops on mobile scrolling */
@media screen and (max-width: 768px) {
    * {
        background-attachment: scroll !important;
    }

    /* Optimize any glassmorphism/blur effects during scroll */
    .glass-panel,
    .header,
    .modal {
        will-change: transform, opacity;
    }
}

/* ========================================== */
/* UNIVERSAL MOBILE SCROLLING OPTIMIZATIONS   */
/* Targets Android (Chromium) & iOS (Webkit)  */
/* ========================================== */

/* 1. Chromium Superpower: Skip rendering off-screen elements */
section,
.section-container,
.card,
.portfolio-item {
    content-visibility: auto;
    contain-intrinsic-size: 1px 1000px;
    /* Gives browser a height estimate */
    contain: content;
    /* Isolates layout/paint to prevent global layout thrashing */
}

/* 2. Universal Mobile Paint Overrides */
@media screen and (max-width: 768px) {

    /* Kill Fixed Backgrounds (The #1 FPS killer on Android) */
    *,
    *::before,
    *::after {
        background-attachment: scroll !important;
    }

    /* Optimize Expensive Glassmorphism & Shadows on Mobile without layer explosion */
    .glass-panel,
    .glassmorphism,
    .header,
    .modal,
    .card,
    .service-card,
    .project-card,
    .review-card,
    .contact-card,
    #navbar {
        /* Reduce blur intensity from 16px to 4px for smooth 60fps mobile scrolling */
        -webkit-backdrop-filter: blur(4px) !important;
        backdrop-filter: blur(4px) !important;
    }

    /* Disable Desktop Visual Flourishes on Mobile */
    #neuralCanvas {
        display: none !important;
    }

    /* Smooth Image Rendering */
    img {
        /* Prevents image decoding from blocking the main scroll thread */
        decoding: async;
    }
}

/* ========================================== */
/* DESKTOP & GLOBAL SCROLL PERFORMANCE        */
/* ========================================== */

/* 1. Prevent fixed background repaints without killing layout */
*,
*::before,
*::after {
    background-attachment: scroll !important;
}

/* 2. Optimize Layout Recalculation on Desktop */
section {
    contain: layout style;
}

/* 3. Smooth media decoding */
img {
    decoding: async;
}

/* 4. Optimize expensive effects on mobile screens */
@media screen and (max-width: 768px) {

    /* Reduce blur intensity for mobile GPUs */
    .glass-panel,
    .header,
    .modal,
    .card {
        -webkit-backdrop-filter: blur(4px) !important;
        backdrop-filter: blur(4px) !important;
    }

    /* Stop heavy image decoding from blocking the scroll */
    img {
        decoding: async;
    }
}

/* ========================================== */
/* PRELOADER EXIT OPTIMIZATION                */
/* ========================================== */
/* Ensure hidden preloaders stop consuming GPU power */
#preloader.hide,
.preloader.hide,
#loader.hide,
.loader.hide,
#preloader.loaded,
.preloader.loaded,
#loader.loaded,
.loader.loaded,
.preloader[style*="opacity: 0"] {
    pointer-events: none !important;
    visibility: hidden !important;
    animation: none !important;
    transition: none !important;
}

/* ========================================== */
/* HOW I WORK BUTTONS - MOBILE OVERFLOW FIX   */
/* ========================================== */

@media screen and (max-width: 768px) {

    /* 1. Prevent the section from allowing horizontal scrolling */
    [class*="work"],
    section[id*="work"] {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    /* 2. Reset staggered positions (margins/transforms) for the buttons on mobile */
    [class*="work"] [class*="step"],
    [class*="work"] [class*="item"],
    [class*="work"] [class*="btn"],
    [class*="work"] li {
        margin-left: auto !important;
        margin-right: auto !important;
        left: auto !important;
        /* Removes absolute positioning pushing it out */
        right: auto !important;
        transform: none !important;
        /* Kills any translate/stagger offsets */

        /* Constrain size to fit mobile screens perfectly */
        width: 90% !important;
        max-width: 320px !important;

        /* Center content beautifully */
        justify-content: center !important;
        text-align: center !important;
        margin-bottom: 15px !important;
    }

    /* 3. Force the parent container to stack them in the middle */
    [class*="work"] ul,
    [class*="work"] [class*="list"],
    [class*="work"] [class*="steps"] {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
}

/* ========================================== */
/* TYPEWRITER LAYOUT JUMP (CLS) FIX           */
/* ========================================== */

/* Target the hero heading and typewriter wrappers blindly & safely */
[class*="hero"] h1,
[id*="hero"] h1,
[class*="typewriter"],
[class*="typing"],
.hero-title,
.typewrite {
    display: block !important;
    min-height: 180px !important;
    /* Locks desktop height */
    box-sizing: border-box !important;
}

/* Tablet screens */
@media screen and (max-width: 992px) {

    [class*="hero"] h1,
    [id*="hero"] h1,
    [class*="typewriter"],
    [class*="typing"],
    .hero-title,
    .typewrite {
        min-height: 220px !important;
    }
}

/* Mobile screens */
@media screen and (max-width: 768px) {

    [class*="hero"] h1,
    [id*="hero"] h1,
    [class*="typewriter"],
    [class*="typing"],
    .hero-title,
    .typewrite {
        min-height: 280px !important;
    }
}

/* ========================================== */
/* TYPEWRITER HEIGHT FIX (UPDATED VALUES)     */
/* ========================================== */

/* Increased heights to fully contain 3+ lines of massive text */
[class*="hero"] h1,
[id*="hero"] h1,
[class*="typewriter"],
[class*="typing"],
.hero-title,
.typewrite {
    min-height: 280px !important;
    /* Fixed 3rd line jump on desktop */
}

@media screen and (max-width: 992px) {

    [class*="hero"] h1,
    [id*="hero"] h1,
    [class*="typewriter"],
    [class*="typing"],
    .hero-title,
    .typewrite {
        min-height: 350px !important;
    }
}

@media screen and (max-width: 768px) {

    [class*="hero"] h1,
    [id*="hero"] h1,
    [class*="typewriter"],
    [class*="typing"],
    .hero-title,
    .typewrite {
        min-height: 450px !important;
    }
}

/* ========================================== */
/* NAVBAR FLUID SIZING, HOVERS & DROPDOWN     */
/* ========================================== */

header a, nav a, .nav-link {
    font-size: clamp(0.95rem, 1.1vw, 1.1rem) !important;
    font-weight: 500 !important;
    padding: 10px 15px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    text-decoration: none;
    color: var(--text-primary) !important;
}

header a:hover, nav a:hover, .nav-link:hover {
    color: var(--cyan) !important;
    transform: translateY(-2px) !important;
}

.nav-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.nav-link {
    white-space: nowrap !important;
}

.dropdown-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.dropdown-arrow {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.65em !important;
    margin-left: 0 !important;
    vertical-align: middle !important;
    transition: transform 0.3s ease !important;
    line-height: 1 !important;
}

.nav-dropdown-wrapper:hover .dropdown-arrow,
.nav-dropdown-wrapper.open .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: #ffffff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 12px 0;
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    list-style: none;
    text-align: center;
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-wrapper.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu li {
    margin: 0;
    padding: 0;
}

.nav-dropdown-menu a {
    display: block !important;
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    color: var(--text-primary) !important;
}

.nav-dropdown-menu a:hover {
    background: rgba(2, 132, 199, 0.08);
    color: var(--cyan) !important;
}

@media screen and (max-width: 992px) {
    .nav-dropdown-menu {
        position: static;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        padding: 5px 0 !important;
        background: transparent !important;
        min-width: unset !important;
        display: none;
    }

    .nav-dropdown-wrapper.open .nav-dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-dropdown-menu a {
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
        color: var(--text-secondary) !important;
    }
}

/* ========================================== */
/* AI CHATBOT WIDGET (PRODUCTION READY)       */
/* ========================================== */
#chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 28px;
    background: var(--gradient-main);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
#chat-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 30px rgba(2, 132, 199, 0.5);
}
#chat-toggle-btn:focus-visible {
    outline: 3px solid #0284c7;
    outline-offset: 3px;
}

#ai-chat-widget {
    position: fixed;
    bottom: 95px;
    right: 28px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    max-height: calc(100dvh - 120px);
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    z-index: 10000;
    overflow: hidden;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.14);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.chat-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px) scale(0.98);
    visibility: hidden;
}
.chat-visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
    visibility: visible;
}

#chat-header {
    background: #ffffff;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.chat-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.96rem;
    font-weight: 700;
    color: #0284c7;
    margin: 0;
    line-height: 1.2;
}
/* Screen Reader Only Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#close-chat {
    background: transparent;
    border: none;
    font-size: 1.15rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    transition: color 0.15s ease, background 0.15s ease;
}
#close-chat:hover, #close-chat:focus-visible {
    color: #0f172a;
    background: #f1f5f9;
    outline: none;
}

#chat-messages {
    flex: 1;
    min-height: 0;
    padding: 14px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
    font-size: 0.92rem;
    position: relative;
}

/* Chat Message Bubbles */
.user-msg {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}
.ai-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}
.chat-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 86%;
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-word;
}
.user-bubble {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(3, 105, 161, 0.25);
}
.ai-bubble {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.error-bubble {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-bottom-left-radius: 4px;
    font-size: 0.88rem;
}

/* AI Message Formatted Elements */
.chat-paragraph {
    margin: 0 0 8px 0;
}
.chat-paragraph:last-child {
    margin-bottom: 0;
}
.chat-bold {
    font-weight: 700;
    color: inherit;
}
.chat-link {
    color: #0369a1;
    text-decoration: underline;
    font-weight: 600;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}
.chat-link:hover, .chat-link:focus-visible {
    color: #075985;
}
.unverified-url {
    word-break: break-all;
    color: inherit;
    font-style: italic;
    opacity: 0.9;
}
.chat-list {
    margin: 4px 0 8px 18px;
    padding: 0;
    list-style-type: disc;
}
.chat-list-item {
    margin-bottom: 4px;
    line-height: 1.45;
}
.chat-list-item:last-child {
    margin-bottom: 0;
}

/* Typing Indicator Animation */
.typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #0284c7;
    animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Chat Retry Button */
.chat-retry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
    padding: 8px 14px;
    min-height: 36px;
    background: #fee2e2;
    border: 1px solid #f87171;
    border-radius: 6px;
    color: #991b1b;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.chat-retry-btn:hover, .chat-retry-btn:focus-visible {
    background: #fca5a5;
    outline: none;
}

/* Chatbot Quick Questions */
#quick-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    margin-bottom: 6px;
}
.quick-btn {
    background: #ffffff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.quick-btn:hover, .quick-btn:focus-visible {
    background: #f0f9ff;
    border-color: #0369a1;
    transform: translateY(-1px);
    outline: none;
}

/* Follow-up suggestions */
.chat-followup-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 4px;
    width: 100%;
}

.chat-followup-chip {
    background: #ffffff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 8px 14px;
    border-radius: 18px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    text-align: left;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    font-family: inherit;
    line-height: 1.35;
}

.chat-followup-chip:hover,
.chat-followup-chip:focus-visible {
    background: #f0f9ff;
    border-color: #0284c7;
    color: #075985;
    transform: translateY(-1px);
    outline: 2px solid #0284c7;
    outline-offset: 1px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.15);
}

.chat-followup-chip:active {
    transform: translateY(0);
    background: #e0f2fe;
}

/* Chat Truncation Note */
.chat-truncated-note {
    font-size: 0.78rem;
    color: #64748b;
    font-style: italic;
    margin-top: 6px;
    padding: 3px 8px;
    background: #f1f5f9;
    border-radius: 4px;
    border-left: 3px solid #94a3b8;
    display: inline-block;
}

/* Cloudflare Turnstile Container */
.turnstile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6px 12px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.turnstile-container.hidden {
    display: none !important;
}


/* Chat Input Area */
#chat-input-area {
    display: flex;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 6px 8px;
    flex-shrink: 0;
}
#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 12px;
    color: #0f172a;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    min-height: 44px;
}
#chat-input:disabled {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}
#chat-input::placeholder {
    color: #94a3b8;
}
#send-chat {
    background: #0369a1;
    border: none;
    color: #ffffff;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
    margin-right: 2px;
}
#send-chat:hover:not(:disabled) {
    background: #075985;
    transform: scale(1.05);
}
#send-chat:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}
#send-chat:focus-visible {
    outline: 2px solid #0284c7;
    outline-offset: 2px;
}

/* Streaming Stop Button */
.stop-chat-btn {
    background: #ef4444;
    border: none;
    color: #ffffff;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
    margin-right: 2px;
}
.stop-chat-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}
.stop-chat-btn:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}
#send-chat.hidden,
.stop-chat-btn.hidden,
.chat-jump-btn.hidden {
    display: none !important;
}

/* Jump to Latest Floating Button */
.chat-jump-btn {
    position: absolute;
    bottom: 96px;
    left: 50%;
    transform: translateX(-50%);
    background: #0369a1;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(3, 105, 161, 0.35);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease;
}
.chat-jump-btn:hover {
    background: #075985;
}
.chat-jump-btn:focus-visible {
    outline: 2px solid #0284c7;
    outline-offset: 2px;
}

/* Thinking Indicator in Bubble */
.chat-thinking-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-style: italic;
    font-size: 0.88rem;
}
.chat-thinking-indicator::after {
    content: '...';
    animation: thinkingDots 1.5s infinite steps(4, end);
    width: 14px;
    text-align: left;
    display: inline-block;
}
@keyframes thinkingDots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}
.chat-interrupted-tag {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    padding: 2px 6px;
    font-weight: 500;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    #ai-chat-widget,
    #chat-toggle-btn,
    .typing-dot,
    #send-chat,
    .stop-chat-btn,
    .chat-jump-btn,
    .quick-btn,
    .chat-followup-chip {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    .chat-thinking-indicator::after {
        animation: none !important;
        content: '...';
    }
}

/* Mobile Navigation Separate Backdrop */
.mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 1004;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.mobile-nav-backdrop.is-active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

body.nav-menu-open {
    overflow: hidden !important;
}

/* Mobile Optimization Fixes */
@media (max-width: 768px) {
    /* Capsule Navbar Mobile Adaptation - Right Aligned */
    #navbar {
        width: fit-content !important;
        min-width: 52px !important;
        height: 52px !important;
        top: max(14px, env(safe-area-inset-top, 14px)) !important;
        left: auto !important;
        right: max(16px, env(safe-area-inset-right, 16px)) !important;
        transform: none !important;
        border-radius: 40px !important;
        padding: 0 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    #navbar.scrolled {
        top: max(10px, env(safe-area-inset-top, 10px)) !important;
        left: auto !important;
        right: max(16px, env(safe-area-inset-right, 16px)) !important;
        transform: none !important;
    }

    .nav-container {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .nav-content .btn {
        padding: 6px 14px !important;
        font-size: 0.82rem !important;
        min-height: auto !important;
        white-space: nowrap !important;
    }

    /* 1. Mobile Hamburger Icon - centered cleanly inside the capsule (WCAG 44x44px target) */
    .mobile-menu-btn {
        display: flex !important;
        position: static !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.5rem !important;
        color: var(--text-primary) !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 1006 !important;
    }

    /* 2. Sleek Floating Dropdown Menu - Fully Opaque Solid Surface & Anchored Right */
    .nav-links {
        display: none !important; /* HIDDEN BY DEFAULT */
        position: fixed !important;
        top: calc(max(14px, env(safe-area-inset-top, 14px)) + 58px) !important;
        right: max(16px, env(safe-area-inset-right, 16px)) !important;
        left: auto !important;
        transform: none !important;
        width: min(88vw, 320px) !important;
        max-height: calc(100dvh - 86px) !important;
        overflow-y: auto !important;
        background: #ffffff !important; /* 100% FULLY OPAQUE SOLID WHITE - ZERO BLEEDTHROUGH */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 16px 0 !important;
        border-radius: 20px !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: 0 20px 48px -10px rgba(15, 23, 42, 0.45), 0 10px 24px -5px rgba(15, 23, 42, 0.25) !important;
        gap: 2px !important;
        z-index: 1005 !important;
    }

    .nav-links.active {
        display: flex !important;
        z-index: 1005 !important;
    }

    .nav-links li {
        width: 100% !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .nav-links .nav-link {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 12px 24px !important;
        color: #0f172a !important; /* High-contrast dark crisp text */
        font-weight: 600 !important;
        font-size: 1.02rem !important;
        min-height: 48px !important;
        box-sizing: border-box !important;
        border-radius: 0 !important;
        text-decoration: none !important;
        transition: background 0.15s ease, color 0.15s ease !important;
    }

    .nav-links .nav-link:hover,
    .nav-links .nav-link:focus-visible {
        background: rgba(2, 132, 199, 0.08) !important;
        color: var(--cyan) !important;
        outline: none !important;
    }

    /* 1. Fix Hero Container Spacing */
    #hero {
        padding-top: calc(max(14px, env(safe-area-inset-top, 14px)) + 54px) !important;
        padding-bottom: 12px !important;
        min-height: auto !important;
        gap: 0 !important;
    }

    /* 2. Stop Text Jumping & Compact Mobile Header */
    #hero h1,
    .hero-title,
    .typing-container,
    .typewriter-wrapper {
        min-height: auto !important;
        font-size: clamp(1.4rem, 5.5vw, 1.8rem) !important;
        line-height: 1.18 !important;
        margin-bottom: 6px !important;
        text-align: center;
    }

    /* 3. Pull up the Paragraph and CTA Buttons */
    #hero p,
    .hero-subtitle {
        margin-top: 0 !important;
        margin-bottom: 10px !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
        max-width: 330px !important;
    }

    .cta-buttons,
    .hero-buttons {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }

    .cta-buttons a,
    .hero-buttons a,
    .hero-buttons .btn,
    .cta-buttons button {
        width: auto !important;
        flex: 0 1 auto !important;
        max-width: 140px !important;
        padding: 7px 14px !important;
        font-size: 12.5px !important;
        border-radius: 9px !important;
        min-height: 36px !important;
        text-align: center;
        justify-content: center;
    }
}





/* ========================================= */
/* ACCESSIBILITY: WCAG CONTRAST & TOUCH FIX  */
/* ========================================= */

/* Fix 1: Improve contrast for Service Cards */
.service-card .service-title,
.service-card h3 {
    color: #111827 !important; /* High contrast dark title */
}
.service-card p {
    color: #4b5563 !important; /* Accessible text secondary */
}

/* Fix 2: Accessible Touch Target & Non-Obstructing Mobile Position */
@media (max-width: 767px) {
    #chat-toggle-btn {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        font-size: 1.25rem !important;
        bottom: 14px !important;
        right: 14px !important;
        margin: 0 !important;
        box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35) !important;
    }
}

/* ========================================= */
/* TASK 2: FULL MOBILE RESPONSIVENESS FIXES  */
/* (Screen sizes: 320px, 375px, 414px, 768px) */
/* ========================================= */

/* 1. Global Viewport & Horizontal Overflow Lock */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
}

img, picture, svg, canvas {
    max-width: 100%;
    height: auto;
}

/* 2. Responsive Chat Widget on Small Screens & Landscape Mobile */
body.chat-modal-open {
    overflow: hidden !important;
    touch-action: none;
}

body.chat-modal-open {
    overflow: hidden !important;
}

@media (max-width: 820px) {
    #ai-chat-widget {
        position: fixed !important;
        inset: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        width: 100vw !important;
        max-width: 100% !important;
        max-width: 100vw !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100% !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
        margin: 0 !important;
        z-index: 10010 !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column !important;
    }

    #chat-header {
        flex-shrink: 0 !important;
        padding: max(14px, env(safe-area-inset-top, 14px)) 16px 12px 16px !important;
        border-radius: 0 !important;
    }

    #chat-messages {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        padding: 16px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    #chat-input-area {
        flex-shrink: 0 !important;
        padding: 8px 12px max(12px, env(safe-area-inset-bottom, 12px)) 12px !important;
        background: #ffffff !important;
        border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    }

    #chat-input {
        font-size: 1rem !important;
        min-height: 44px !important;
    }

    /* Hide the floating toggle launcher when chat is open on mobile to eliminate overlap */
    body.chat-modal-open #chat-toggle-btn,
    #ai-chat-widget.chat-visible ~ #chat-toggle-btn {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

@media (max-height: 550px) and (orientation: landscape) {
    #ai-chat-widget {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        margin: 0 !important;
        z-index: 10001 !important;
    }

    #chat-header {
        padding: max(8px, env(safe-area-inset-top, 8px)) 14px 8px 14px !important;
    }

    #chat-messages {
        padding: 8px 14px !important;
        gap: 8px !important;
    }

    .chat-bubble {
        padding: 8px 12px !important;
        font-size: 0.88rem !important;
    }

    #quick-questions {
        gap: 6px !important;
        margin-top: 2px !important;
        margin-bottom: 4px !important;
    }

    .quick-btn {
        padding: 6px 10px !important;
        font-size: 0.78rem !important;
        min-height: 36px !important;
    }


    #chat-input-area {
        padding: 4px 8px max(6px, env(safe-area-inset-bottom, 6px)) 8px !important;
    }

    #chat-input {
        font-size: 1rem !important;
        min-height: 40px !important;
        padding: 6px 10px !important;
    }

    #send-chat, .stop-chat-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    body.chat-modal-open #chat-toggle-btn,
    #ai-chat-widget.chat-visible ~ #chat-toggle-btn {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* 3. Deep Mobile Adaptations (320px, 375px, 414px) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px !important;
    }

    .section {
        padding: 60px 0 !important;
    }

    .section-title {
        font-size: clamp(1.8rem, 7vw, 2.4rem) !important;
    }

    .section-subtitle {
        font-size: 0.95rem !important;
        padding: 0 10px;
    }

    .hero-title {
        font-size: clamp(1.45rem, 6.2vw, 1.85rem) !important;
        letter-spacing: -0.5px !important;
        margin-bottom: 8px !important;
    }

    .hero-subtitle {
        font-size: 12.5px !important;
        line-height: 1.45 !important;
        margin: 0 auto 12px !important;
        max-width: 340px !important;
    }

    .hero-buttons {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 10px !important;
        margin-bottom: 0 !important;
    }

    .hero-buttons .btn {
        flex: 0 1 auto !important;
        width: auto !important;
        max-width: 145px !important;
        min-height: 38px !important;
        padding: 8px 14px !important;
        font-size: 12.5px !important;
    }

    .hero-stats {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0 !important;
        margin: 0 auto 10px !important;
        width: 100% !important;
        max-width: 326px !important;
    }

    .stat-item {
        padding: 2px 4px !important;
    }

    .stat-number-wrapper {
        font-size: 1.15rem !important;
        line-height: 1.05 !important;
    }


    /* Services & Contact Cards Grid on Mobile */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Contact Hub Mobile Adjustments */
    .contact-secondary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .contact-card-secondary {
        padding: 12px 14px;
        min-height: 54px;
    }

    /* FAQ text and touch padding */
    .faq-header {
        padding: 18px 16px !important;
    }

    .faq-header h3 {
        font-size: 1rem !important;
    }

    .faq-content {
        padding: 0 16px 20px !important;
        font-size: 0.9rem !important;
    }

    /* Reviews and Form on Small Screens */
    .review-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px 16px !important;
    }

    .review-form-container {
        padding: 24px 16px !important;
        width: 100% !important;
    }

    /* Service subpages */
    .service-hero {
        padding: 100px 16px 40px !important;
    }

    .service-content {
        padding: 0 16px 60px !important;
        font-size: 1rem !important;
    }

    .service-content h2 {
        font-size: 1.5rem !important;
    }
}

/* Narrow mobile hero fine-tuning */
@media (max-width: 340px) {
    #hero {
        padding-top: calc(max(14px, env(safe-area-inset-top, 14px)) + 54px) !important;
        padding-bottom: 2px !important;
        min-height: auto !important;
    }
    .hero-badge {
        order: 1 !important;
        font-size: 9.2px !important;
        padding: 2.5px 8px !important;
        margin: 0 auto 4px !important;
        max-width: calc(100% - 10px) !important;
        white-space: normal !important;
        line-height: 1.25 !important;
    }
    .hero-photo-col {
        order: 2 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin: 1px auto 3px !important;
    }
    .hero-profile-photo {
        max-width: 125px !important;
        width: 125px !important;
        height: auto !important;
        aspect-ratio: 417 / 397;
    }
    .hero-audio-intro-btn {
        min-height: 44px !important;
        padding: 7px 15px !important;
        font-size: 0.78rem !important;
        gap: 7px !important;
    }
    .hero-title,
    .hero-grid .hero-title {
        order: 3 !important;
        font-size: 1.20rem !important;
        line-height: 1.15 !important;
        margin: 0 auto 3px !important;
    }
    html.speech-ready .hero-audio-intro-wrapper {
        order: 4 !important;
        margin: 1px auto 5px !important;
    }
    html.speech-ready #hero .hero-subtitle,
    html.speech-ready .hero-grid .hero-subtitle,
    html.speech-ready .hero-subtitle {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        clip-path: inset(50%) !important;
        white-space: normal !important;
        border: 0 !important;
    }
    html:not(.speech-ready) .hero-subtitle,
    html:not(.speech-ready) .hero-grid .hero-subtitle {
        order: 4 !important;
        font-size: 10.5px !important;
        line-height: 1.32 !important;
        margin: 0 auto 5px !important;
        max-width: 290px !important;
    }
    .hero-buttons,
    .hero-grid .hero-buttons {
        order: 5 !important;
        margin: 0 auto 5px !important;
        gap: 6px !important;
    }
    .hero-buttons .btn {
        max-width: 130px !important;
        padding: 7px 12px !important;
        font-size: 11.5px !important;
        font-weight: 600 !important;
        min-height: 44px !important;
        border-radius: 8px !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
    }
    .hero-stats {
        order: 6 !important;
        gap: 0 !important;
        margin: 0 auto 8px !important;
        max-width: 292px !important;
        border-radius: 12px !important;
    }
    .stat-item {
        padding: 1.5px 3px !important;
        border-radius: 0 !important;
        background: transparent !important;
        border: none !important;
    }
    .stat-item:nth-child(1),
    .stat-item:nth-child(3) {
        border-right: 1px solid rgba(15, 23, 42, 0.08) !important;
    }
    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
    }
    [data-theme="dark"] .stat-item:nth-child(1),
    [data-theme="dark"] .stat-item:nth-child(3) {
        border-right-color: rgba(255, 255, 255, 0.09) !important;
    }
    [data-theme="dark"] .stat-item:nth-child(1),
    [data-theme="dark"] .stat-item:nth-child(2) {
        border-bottom-color: rgba(255, 255, 255, 0.09) !important;
    }
    .stat-number-wrapper {
        font-size: 1.10rem !important;
        line-height: 1.05 !important;
    }
    .stat-label {
        font-size: 9.2px !important;
        font-weight: 700 !important;
        color: #0f172a !important;
        margin: 1px 0 0 !important;
        line-height: 1.15 !important;
    }
    [data-theme="dark"] .stat-label {
        color: #f8fafc !important;
    }
    .stat-badge {
        font-size: 8px !important;
        font-weight: 500 !important;
        color: #64748b !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 1.15 !important;
    }
    [data-theme="dark"] .stat-badge {
        color: #94a3b8 !important;
        background: none !important;
    }
    .marquee-section {
        padding: 2px 0 6px !important;
    }
    .marquee-container {
        max-width: calc(100% - 70px) !important;
        margin-left: 8px !important;
    }
    .marquee-track {
        gap: 20px !important;
        padding-right: 20px !important;
    }
    .marquee-item img {
        height: 20px !important;
    }
}

/* Service Detail Subpages Global Navbar Consistency */
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.navbar .logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    text-decoration: none;
}

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

/* ========================================== */
/* TASK 6: DE-GENERICIZED EDITORIAL STYLING   */
/* ========================================== */

/* Hero Status Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0369a1;
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.2);
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 14px;
}
.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

/* Editorial Project Case Studies (Alternating Layout) */
#projects {
    scroll-margin-top: 90px;
    position: relative;
}

.projects-editorial-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
}

.project-editorial-card {
    display: grid;
    grid-template-columns: 1.32fr 1fr;
    gap: 36px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .project-editorial-card:hover {
        border-color: rgba(2, 132, 199, 0.3);
        box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    }
}

.project-editorial-card.reverse {
    grid-template-columns: 1fr 1.32fr;
}

.project-editorial-card.reverse .project-preview-wrap {
    order: 2;
}

/* Photographic Studio Laptop Project Preview (1.47:1 Reference Match) */
.project-preview-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1.47 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #151921; /* Solid dark charcoal so page grid never bleeds through */
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.12);
    display: block;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease;
}

.project-preview-wrap[data-screenshot] {
    cursor: pointer;
}

.project-preview-wrap[data-screenshot]:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 3px !important;
}

@media (hover: hover) and (pointer: fine) {
    .project-editorial-card:hover .project-preview-wrap {
        /* No transform applied to image container - image lock */
        box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.18);
    }
}

.project-preview-wrap picture,
.project-preview-wrap img,
.project-preview-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 1.47 / 1;
    border-radius: 9px;
}

@media (prefers-reduced-motion: reduce) {
    .project-editorial-card:hover .project-preview-wrap {
        box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.12) !important;
        transition: none !important;
    }
}



.project-editorial-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    position: relative;
    transform: perspective(900px) translateZ(0);
    transform-style: preserve-3d;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .project-editorial-content:hover,
    .project-editorial-content:focus-within {
        transform: perspective(900px) translateY(-2px) rotateX(1deg) rotateY(-0.8deg);
    }

    .project-editorial-card.reverse .project-editorial-content:hover,
    .project-editorial-card.reverse .project-editorial-content:focus-within {
        transform: perspective(900px) translateY(-2px) rotateX(1deg) rotateY(0.8deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-editorial-content,
    .project-editorial-content:hover,
    .project-editorial-content:focus-within,
    .project-editorial-card.reverse .project-editorial-content:hover,
    .project-editorial-card.reverse .project-editorial-content:focus-within {
        transform: none !important;
        transition: none !important;
    }
}

.review-form-container.is-collapsed {
    display: none !important;
}

.review-form-container.is-revealed {
    display: block !important;
    animation: reviewFormFadeIn 0.35s ease-out;
}

@keyframes reviewFormFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-cat-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0369a1;
    background: rgba(3, 105, 161, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
}

.project-editorial-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.project-narrative {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 2px 0 4px 0;
}

.project-lead,
.project-solution {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.55;
    margin: 0;
}

.project-context,
.project-challenge {
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.project-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 2px;
}

.project-tag-item {
    font-size: 0.75rem;
    font-family: var(--font-mono, monospace);
    background: #f1f5f9;
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    line-height: 1.3;
    white-space: nowrap;
}

[data-theme="dark"] .project-tag-item {
    background: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.08);
}

.project-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.project-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--gradient-main);
    padding: 10px 22px;
    border-radius: 30px;
    text-decoration: none;
    width: fit-content;
    min-height: 44px; /* Accessible 44px tap target */
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-launch-btn i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .project-launch-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
    }
    .project-launch-btn:hover i {
        transform: translate(2px, -2px);
    }
}

.project-launch-btn:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 3px !important;
}

.project-enlarge-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-main);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    width: fit-content;
    min-height: 44px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

[data-theme="dark"] .project-enlarge-btn {
    background: rgba(30, 41, 59, 0.6);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    .project-enlarge-btn:hover {
        color: var(--text-primary);
        background: #ffffff;
        border-color: rgba(2, 132, 199, 0.4);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    }
    [data-theme="dark"] .project-enlarge-btn:hover {
        background: rgba(51, 65, 85, 0.8);
        border-color: rgba(56, 189, 248, 0.45);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    }
}

.project-enlarge-btn:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 3px !important;
}

/* Screenshot Modal Overlay */
.screenshot-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.screenshot-modal.is-active {
    opacity: 1;
    visibility: visible;
}

.screenshot-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 26, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.screenshot-modal-dialog {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 95vw;
    max-height: 92vh;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1);
}

.screenshot-modal.is-active .screenshot-modal-dialog {
    transform: scale(1);
}

.screenshot-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.screenshot-modal-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.screenshot-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.screenshot-modal-close:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
}

.screenshot-modal-close:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 2px !important;
}

.screenshot-modal-body {
    flex: 1;
    min-height: 0;
    padding: 16px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b1120;
}

.screenshot-modal-img {
    max-width: 100%;
    max-height: calc(92vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block;
}

body.screenshot-modal-open {
    overflow: hidden !important;
}

.project-status-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-code);
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    width: fit-content;
    min-height: 38px;
    cursor: default;
    user-select: none;
}

.project-disclaimer-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #92400e;
    background: #fef3c7;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    width: fit-content;
}

.project-client-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
}

.project-prototype-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #d97706;
    background: rgba(217, 119, 6, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
}

.project-internal-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
}

.project-preview-tech {
    min-height: 220px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.project-tech-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 2.5rem;
}

.project-tech-visual span {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Secondary More Projects Toggle Container */
#more-projects-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    margin-top: 40px;
}

#more-projects-wrapper.is-collapsed {
    display: none !important;
}

#more-projects-wrapper.is-expanded {
    display: flex !important;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    margin-top: 40px;
}

.toggle-projects-wrap {
    display: none; /* Progressively unhidden by JavaScript upon successful initialization */
    justify-content: center;
    margin-top: 36px;
}

@media (max-width: 900px) {
    .projects-editorial-container {
        gap: 32px;
    }

    .project-editorial-card,
    .project-editorial-card.reverse {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 24px;
    }

    .project-editorial-card.reverse .project-preview-wrap {
        order: 0;
    }

    .project-editorial-title {
        font-size: 1.35rem;
    }

    #more-projects-wrapper,
    #more-projects-wrapper.is-expanded {
        gap: 32px;
        margin-top: 32px;
    }
}

@media (max-width: 480px) {
    .project-editorial-card,
    .project-editorial-card.reverse {
        padding: 18px;
        gap: 16px;
        border-radius: var(--radius-md);
    }

    .project-editorial-title {
        font-size: 1.25rem;
    }

    .project-narrative {
        font-size: 0.88rem;
        gap: 7px;
    }

    .project-lead,
    .project-solution {
        font-size: 0.93rem;
        line-height: 1.5;
    }

    .project-context,
    .project-challenge {
        font-size: 0.84rem;
        line-height: 1.5;
    }

    .project-tag-item {
        font-size: 0.72rem;
        padding: 3px 8px;
    }

    .project-launch-btn {
        width: 100%;
        justify-content: center;
    }

    .project-status-label {
        width: fit-content;
        max-width: 100%;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .laptop-mockup,
    .project-preview-inner {
        transform: none !important;
        transition: none !important;
    }

    .project-launch-btn,
    .project-launch-btn i {
        transform: none !important;
        transition: none !important;
    }
}

/* ========================================== */
/* CERTIFICATES SECTION (#certificates)       */
/* ========================================== */
#certificates {
    scroll-margin-top: 90px;
    position: relative;
    padding: clamp(48px, 6vh, 72px) 0 clamp(76px, 9vh, 104px);
}

.certificates-editorial-container {
    display: flex;
    flex-direction: column;
    gap: 44px;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
}

.certificate-editorial-card {
    display: grid;
    grid-template-columns: 1.32fr 1fr;
    gap: 36px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .certificate-editorial-card:hover {
        border-color: rgba(2, 132, 199, 0.3);
        box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    }
}

.certificate-editorial-card.reverse {
    grid-template-columns: 1fr 1.32fr;
}

.certificate-editorial-card.reverse .certificate-preview-wrap {
    order: 2;
}

/* Photographic Studio Laptop Certificate Preview (1.47:1 Reference Match) */
.certificate-preview-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1.47 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #151921;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.12);
    display: block;
    box-sizing: border-box;
    transition: box-shadow 0.3s ease;
}

.certificate-preview-wrap[data-certificate] {
    cursor: pointer;
}

.certificate-preview-wrap[data-certificate]:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 3px !important;
}

@media (hover: hover) and (pointer: fine) {
    .certificate-editorial-card:hover .certificate-preview-wrap {
        /* Strictly no transform applied to image container - image lock */
        box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.18);
    }
}

.certificate-preview-wrap picture,
.certificate-preview-wrap img,
.certificate-preview-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 1.47 / 1;
    border-radius: 9px;
}

@media (prefers-reduced-motion: reduce) {
    .certificate-editorial-card:hover .certificate-preview-wrap {
        box-shadow: 0 10px 30px -8px rgba(15, 23, 42, 0.12) !important;
        transition: none !important;
    }
}

.certificate-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    position: relative;
    transform: perspective(900px) translateZ(0);
    transform-style: preserve-3d;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
    .certificate-content:hover,
    .certificate-content:focus-within {
        transform: perspective(900px) translateY(-2px) rotateX(1deg) rotateY(-0.8deg);
    }

    .certificate-editorial-card.reverse .certificate-content:hover,
    .certificate-editorial-card.reverse .certificate-content:focus-within {
        transform: perspective(900px) translateY(-2px) rotateX(1deg) rotateY(0.8deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .certificate-content,
    .certificate-content:hover,
    .certificate-content:focus-within,
    .certificate-editorial-card.reverse .certificate-content:hover,
    .certificate-editorial-card.reverse .certificate-content:focus-within {
        transform: none !important;
        transition: none !important;
    }
}

.certificate-issuer-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #0369a1;
    background: rgba(3, 105, 161, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
    line-height: 1.4;
}

.certificate-issuer-badge.cisco {
    color: #0284c7;
    background: rgba(2, 132, 199, 0.1);
}

.certificate-editorial-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.certificate-lead {
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.certificate-notice-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #475569;
    background: rgba(241, 245, 249, 0.9);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 8px;
    padding: 8px 12px;
    line-height: 1.4;
    width: fit-content;
}

.certificate-notice-pill i {
    color: #0284c7;
    font-size: 0.9rem;
    flex-shrink: 0;
}

[data-theme="dark"] .certificate-notice-pill {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.certificate-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.certificate-verify-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--gradient-main);
    padding: 10px 22px;
    border-radius: 30px;
    text-decoration: none;
    width: fit-content;
    min-height: 44px;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.certificate-verify-btn i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .certificate-verify-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
    }
    .certificate-verify-btn:hover i {
        transform: translate(2px, -2px);
    }
}

.certificate-verify-btn:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 3px !important;
}

.certificate-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-main);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    width: fit-content;
    min-height: 44px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

[data-theme="dark"] .certificate-view-btn {
    background: rgba(30, 41, 59, 0.6);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    .certificate-view-btn:hover {
        color: var(--text-primary);
        background: #ffffff;
        border-color: rgba(2, 132, 199, 0.4);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    }
    [data-theme="dark"] .certificate-view-btn:hover {
        background: rgba(51, 65, 85, 0.8);
        border-color: rgba(56, 189, 248, 0.45);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    }
}

.certificate-view-btn:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 3px !important;
}

.certificate-id-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 8px 14px;
    border-radius: 8px;
    line-height: 1.4;
    max-width: 100%;
    box-sizing: border-box;
}

[data-theme="dark"] .certificate-id-badge {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

.certificate-id-badge i {
    color: #0369a1;
    font-size: 1rem;
    flex-shrink: 0;
}

.badge-text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: left;
}

.badge-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.badge-id {
    font-family: var(--font-mono, monospace);
    font-size: 0.74rem;
    font-weight: 600;
    color: #0369a1;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.review-form-container.is-collapsed {
    display: none !important;
}

.review-form-container.is-revealed {
    display: block !important;
    animation: reviewFormFadeIn 0.35s ease-out;
}

@keyframes reviewFormFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Media Queries for Certificates */
@media (max-width: 900px) {
    .certificates-editorial-container {
        gap: 32px;
    }

    .certificate-editorial-card,
    .certificate-editorial-card.reverse {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 24px;
    }

    .certificate-editorial-card.reverse .certificate-preview-wrap {
        order: 0;
    }

    .certificate-editorial-title {
        font-size: 1.35rem;
    }
}

@media (max-width: 480px) {
    .certificate-editorial-card,
    .certificate-editorial-card.reverse {
        padding: 18px;
        gap: 16px;
        border-radius: var(--radius-md);
    }

    .certificate-editorial-title {
        font-size: 1.25rem;
    }

    .certificate-lead {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .certificate-verify-btn,
    .certificate-view-btn {
        width: 100%;
        justify-content: center;
    }

    .certificate-id-badge {
        width: 100%;
    }
}

/* ========================================== */
/* ACCESSIBILITY: WCAG 2.1 AA FOCUS VISIBILITY*/
/* ========================================== */
:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 3px !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--cyan) !important;
    outline-offset: 3px !important;
}

/* Consistent, subtle hover & focus feedback */
@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(2, 132, 199, 0.16);
    }
    .hero-audio-intro-btn:hover {
        background: rgba(2, 132, 199, 0.12) !important;
        border-color: rgba(2, 132, 199, 0.4) !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
    }
    .nav-link:hover {
        color: var(--cyan);
    }
    .social-dock-btn:hover {
        transform: translateY(-2px) scale(1.08);
        color: var(--cyan);
    }
    .hero-stats .stat-item {
        cursor: default !important;
        transition: transform 0.2s ease, background-color 0.2s ease !important;
    }
    .hero-stats .stat-item .stat-badge {
        transition: border-color 0.2s ease, background-color 0.2s ease !important;
    }
    .hero-stats .stat-item:hover {
        transform: translateY(-1.5px) !important;
        background: rgba(2, 132, 199, 0.04) !important;
    }
    .hero-stats .stat-item:hover .stat-badge {
        border-color: rgba(2, 132, 199, 0.35) !important;
        background: rgba(2, 132, 199, 0.12) !important;
    }
    [data-theme="dark"] .hero-stats .stat-item:hover {
        background: rgba(56, 189, 248, 0.06) !important;
    }
    [data-theme="dark"] .hero-stats .stat-item:hover .stat-badge {
        border-color: rgba(56, 189, 248, 0.4) !important;
        background: rgba(56, 189, 248, 0.12) !important;
    }
    .hero-photo-wrapper:hover .hero-profile-photo {
        filter: drop-shadow(0 0 20px rgba(2, 132, 199, 0.2));
        transition: filter 0.3s ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-stats .stat-item,
    .hero-stats .stat-item:hover {
        transform: none !important;
        transition: none !important;
    }
}

.btn:active,
.hero-audio-intro-btn:active,
.contact-card:active,
.social-dock-btn:active {
    transform: scale(0.98);
}

/* ===================================================================
   CURSOR GLOW & TOUCH INTERACTION POLISH
   Disable any cursor/mouse-following glow on touch and mobile devices.
   Prevent sticky hover artifacts on coarse-pointer screens.
   =================================================================== */
@media (hover: none) and (pointer: coarse), (pointer: coarse), (max-width: 992px) {
    .cursor-glow,
    #cursorGlow,
    .mouse-glow,
    #mouseGlow,
    .cursor-follower,
    #cursorFollower,
    .ambient-light,
    #ambientLight {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}
