:root {
    /* Senior Engineering Palette */
    --primary-color: #06b6d4;      /* Cyan-500 */
    --primary-dark: #0891b2;       /* Cyan-600 */
    --primary-glow: rgba(6, 182, 212, 0.4);
    --secondary-color: #6366f1;    /* Indigo-500 */
    --dark-bg: #030712;            /* Deepest Navy */
    --surface-bg: rgba(255, 255, 255, 0.02); /* Subtle section bg */
    --card-bg: rgba(17, 24, 39, 0.7); /* Glass Card */
    --card-border: rgba(255, 255, 255, 0.08);
    --text-color: #f9fafb;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --header-height: 80px;
    --glass: blur(12px) saturate(180%);
    --gradient-text: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    --section-padding: 7rem 8%;
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Technical Blueprint Grid */
    background-image: 
        linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    background-attachment: fixed;
}

/* Atmospheric Orbs */
.ambient-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
    animation: orbFloat 25s infinite alternate ease-in-out;
}

.orb-1 {
    background: var(--primary-color);
    top: -200px;
    right: -100px;
}

.orb-2 {
    background: var(--secondary-color);
    bottom: -200px;
    left: -100px;
    animation-delay: -5s;
    animation-duration: 35s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, 50px) scale(1.1); }
    100% { transform: translate(-50px, 100px) scale(0.9); }
}

h1, h2, h3, h4, .brand-name {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Modern Horizontal Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: var(--glass);
    border-bottom: 1px solid var(--card-border);
    transition: all 0.4s ease;
}

.site-header.scrolled {
    height: 70px;
    background: rgba(3, 7, 18, 0.95);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(6, 182, 212, 0.3);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.brand-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

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

/* Dropdown Nav */
.nav-dropdown {
    position: relative;
}

/* Bridge the gap so hover stays active as mouse moves from toggle to menu */
.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 0.75rem;
}

.nav-dropdown-toggle {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    user-select: none;
}

.nav-dropdown-toggle i {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}

.nav-dropdown.open .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: rgba(3, 7, 18, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.4rem;
    min-width: 165px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 10002;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(6, 182, 212, 0.06);
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
    background: rgba(6, 182, 212, 0.08);
    color: var(--primary-color);
}

.nav-cta {
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    background: white;
    color: var(--dark-bg);
}

.mobile-nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 960px) {
    .nav-desktop {
        display: none;
    }
    .mobile-nav-toggle {
        display: block;
    }
}

/* Status Widget - Premium Floating Pill */
.status-widget {
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem; /* Corner Position */
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(3, 7, 18, 0.6);
    backdrop-filter: blur(15px) saturate(180%);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.1);
    font-family: var(--font-body);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    user-select: none;
}

.status-widget:hover {
    background: rgba(3, 7, 18, 0.85);
    border-color: var(--primary-color);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(6, 182, 212, 0.2);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #94a3b8;
    position: relative;
    transition: all 0.3s ease;
}

.status-indicator.online {
    background-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.status-indicator.online::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid #10b981;
    animation: status-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes status-ping {
    0% { transform: scale(1); opacity: 0.8; }
    70%, 100% { transform: scale(3); opacity: 0; }
}

.status-indicator.offline {
    background-color: #f59e0b; /* Available/Away Amber */
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.status-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

#cairo-time {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.02em;
}

#availability-status {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Nav Overlay Modernization */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--dark-bg);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.nav-links-overlay li {
    margin: 1.5rem 0;
    text-align: center;
}

.nav-links-overlay li a {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    line-height: 1.1;
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-overlay.active {
    transform: translateX(0);
}

.close-menu {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 1.2rem;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.close-menu:hover {
    color: var(--primary-color);
}

.nav-links-overlay {
    list-style: none;
    text-align: left;
    /* Align text left within the centered container if desired, or center. Reference looks left-aligned block but centered on screen? Let's try block alignment. */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 768px) {
    .nav-links-overlay li a {
        font-size: 3rem;
    }
}

.nav-links-overlay li a:hover {
    color: var(--primary-color);
    transform: translateX(10px);
}

/* Hero Modernization */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 40%),
                radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.1), transparent 40%);
    padding: 5.5rem 8% 4rem;
    position: relative;
}

.hero-inner {
    max-width: 1400px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 4rem;
    animation: fadeIn 1s ease-out;
}

.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-image-col {
    flex: 0 0 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img-wrapper {
    position: relative;
    width: 340px;
    height: 340px;
}

/* Availability badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}

.hero-greeting {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 0.2rem;
}

.profile-img-container {
    width: 340px;
    height: 340px;
    position: relative;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.4), 0 0 100px rgba(6, 182, 212, 0.15);
    animation: pulse 3s infinite;
}

/* Floating stat badges */
.hero-stat {
    position: absolute;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 14px;
    padding: 0.7rem 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    min-width: 88px;
    text-align: center;
    z-index: 10;
}

.stat-number {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-top-right {
    top: 10px;
    right: -70px;
}

.stat-bottom-left {
    bottom: 50px;
    left: -70px;
}

.stat-bottom-right {
    bottom: 10px;
    right: -70px;
}

.hero-title {
    font-size: 5.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 0.95;
    color: white;
}

.highlight {
    background: linear-gradient(to right, #06b6d4, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero-description {
    font-size: 1.35rem;
    color: var(--text-color);
    margin: 0 0 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: baseline;
}

.hero-description.sub {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    font-weight: 400;
    max-width: 500px;
    line-height: 1.75;
}

/* Rotating Text Styles */
.rotating-text {
    font-weight: 800;
    color: var(--primary-color);
    position: relative;
    display: inline-flex;
    overflow: hidden;
    height: 1.5em;
    align-items: center;
}

.rotating-char {
    display: inline-block;
    transform-origin: bottom center;
    opacity: 0;
    transform: translateY(100%) rotateX(-90deg);
}

.rotating-char.in {
    animation: rotateIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.rotating-char.out {
    animation: rotateOut 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.rotating-space {
    display: inline-block;
    width: 0.3em;
}

@keyframes rotateIn {
    0% {
        opacity: 0;
        transform: translateY(100%) rotateX(-90deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}

@keyframes rotateOut {
    0% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-100%) rotateX(90deg);
    }
}

/* Contact row: email + socials inline */
.hero-contact-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-email {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hero-email:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Social Links */
.profile-social {
    display: flex;
    justify-content: flex-start;
    gap: 0.6rem;
}

.profile-social-link {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.profile-social-link:hover {
    background: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.4);
}

/* Primary CTAs */
.hero-actions {
    display: flex;
    justify-content: flex-start;
    gap: 0.875rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

/* Secondary CTAs */
.hero-actions-secondary {
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.cta-button,
.download-btn {
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(6, 182, 212, 0.3);
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
}

.cta-button.hire-btn {
    background: #10b981;
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.cta-button.hire-btn:hover {
    background: #059669;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.download-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
}

.download-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive: stack on mobile */
@media (max-width: 960px) {
    .hero {
        padding: 6rem 5% 3rem;
    }

    .hero-inner {
        flex-direction: column-reverse;
        gap: 2.5rem;
        text-align: center;
        align-items: center;
    }

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

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

    .hero-description.sub {
        max-width: 100%;
    }

    .hero-contact-row {
        justify-content: center;
    }

    .profile-social {
        justify-content: center;
    }

    .hero-actions,
    .hero-actions-secondary {
        justify-content: center;
    }

    .hero-image-col {
        flex: unset;
    }

    .profile-img-wrapper {
        width: 220px;
        height: 220px;
    }

    .profile-img-container {
        width: 220px;
        height: 220px;
    }

    .hero-stat {
        display: none;
    }

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

/* Skills Section */
.skills {
    padding: var(--section-padding);
    background: var(--surface-bg);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.skills-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skills-category {
    background: rgba(255, 255, 255, 0.02);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skills-category h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.8rem;
}

.skills-category h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.skill-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    color: var(--text-color);
}

.skill-item:hover {
    background: rgba(6, 182, 212, 0.12);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.skill-item i {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Services Section */
.services {
    padding: 6rem 2rem;
    background: var(--dark-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.12);
}

.service-card--featured {
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.1);
}

.service-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.9rem;
    border-radius: 50px;
    white-space: nowrap;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.service-icon {
    width: 50px;
    height: 50px;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--primary-color);
}

.service-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
}

.service-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.service-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.service-features li i {
    color: var(--primary-color);
    font-size: 0.7rem;
    flex-shrink: 0;
}

.service-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    transition: gap 0.2s ease, color 0.2s ease;
}

.service-cta:hover {
    gap: 0.75rem;
    color: #fff;
}

/* Projects Section */
.projects {
    padding: var(--section-padding);
    background: var(--dark-bg);
}

.projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.projects h2::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background: var(--primary-color);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 0 1rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

.project-img,
.card-placeholder-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(17, 24, 39, 1), rgba(30, 41, 59, 1));
    font-size: 4rem;
    color: var(--primary-color);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.project-date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    align-self: flex-start;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more::after {
    content: '→';
    transition: transform 0.3s ease;
}

.project-card:hover .read-more::after {
    transform: translateX(5px);
}

/* Certifications Summary Section */
.certifications-summary {
    padding: var(--section-padding);
    background: var(--surface-bg);
}

.cert-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.cert-feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.cert-feature-card:hover {
    background: rgba(6, 182, 212, 0.08);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.cert-feature-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cert-feature-content {
    flex-grow: 1;
}

.cert-feature-content h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: var(--text-color);
    line-height: 1.2;
}

.cert-feature-org {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cert-feature-year {
    display: none;
    /* Optional: hide year on compact card to save space, or show if desired */
}

.cert-feature-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.cert-feature-link:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.cert-view-all {
    text-align: center;
    margin-top: 2rem;
}

.view-archive-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    transition: gap 0.3s ease;
}

.view-archive-btn:hover {
    gap: 0.8rem;
    text-decoration: underline;
}

/* Gallery Overlay Content (Dome Gallery) */
.gallery-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 20;
    padding: 3rem 5rem;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.gallery-overlay-content .section-title {
    margin-bottom: 0.5rem;
    font-size: 3.5rem;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.gallery-overlay-content .section-subtitle {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Global Footprint (Map) Modernization */
.map-section {
    padding: var(--section-padding);
    background: radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.05), transparent 70%), var(--dark-bg);
    position: relative;
    overflow: hidden;
}

.map-container {
    height: 600px;
    width: 100%;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5), 0 0 40px rgba(6, 182, 212, 0.1);
    z-index: 1;
    position: relative;
}

/* Pulsing Radar Markers - Refined */
.radar-marker-container {
    overflow: visible !important;
}

.radar-marker {
    position: relative;
    width: 10px;
    height: 10px;
    background: #06b6d4; /* Forced Cyan */
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.8);
    display: block;
}

.radar-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: #06b6d4;
    border-radius: 50%;
    animation: radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    z-index: -1;
}

@keyframes radar-ping {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

/* Modern Leaflet Popups - Forced Style */
div.leaflet-popup-content-wrapper {
    background: rgba(10, 15, 25, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    color: #ffffff !important;
}

div.leaflet-popup-tip {
    background: rgba(10, 15, 25, 0.85) !important;
    border: 1px solid rgba(6, 182, 212, 0.3) !important;
}

.leaflet-popup-content {
    margin: 15px 20px !important;
}

.map-popup-context {
    font-size: 0.7rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 4px;
}

.map-popup-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
    color: white;
}

.map-popup-location {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Style the Map Tiles - Clean Dark View */
.leaflet-tile-container img {
    filter: none;
}

/* Hide zoom controls for cleaner look */
.leaflet-control-zoom {
    display: none !important;
}

/* Hide Leaflet attribution prefix if desired for minimalism, 
   but keeping attribution is required by license. 
   Styling it to be unobtrusive. */
.leaflet-control-attribution {
    background: rgba(3, 7, 18, 0.8) !important;
    color: var(--text-muted) !important;
    font-size: 0.7rem;
}

.leaflet-control-attribution a {
    color: var(--secondary-color) !important;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    padding: 4rem 8%;
    text-align: center;
    border-top: 1px solid var(--card-border);
}

.footer h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary-color); /* fallback if gradient fails */
}

.footer .social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer .social-links a {
    font-size: 1.8rem;
    color: var(--text-muted);
}

.footer .social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(6, 182, 212, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

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

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

}

/* Research & Skills Polish */
.research-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: var(--glass);
}

.research-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    border-color: var(--primary-color) !important;
}

/* Scroll Shadow for Header — merged into .site-header.scrolled above */

/* Remove Distracting Ticker */
.news-ticker-bar {
    display: none !important;
}

/* Mobile Fixes for Grids */
@media (max-width: 768px) {
    .research-grid, .projects-grid, .skills-content {
        grid-template-columns: 1fr !important;
        padding: 0;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .nav-overlay li a {
        font-size: 1.8rem;
    }
}

/* Back to Top Button */

/* ─── Daily Toolkit ──────────────────────────────────── */
.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 1.25rem;
    max-width: 960px;
    margin: 2.5rem auto 0;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: #94a3b8;
    transition: color 0.2s;
}

.tool-card:hover {
    color: var(--primary-color);
}

.tool-icon-wrap {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.25s ease, background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.tool-card:hover .tool-icon-wrap {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.35);
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

.tool-icon-wrap img {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    object-fit: contain;
}

.tool-icon-wrap .tool-fa-icon {
    font-size: 1.65rem;
}

.tool-name {
    font-size: 0.72rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

.toolkit-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    margin: 2.5rem auto 0;
}

/* ── Toolkit Grid ─────────────────────────────────────── */
.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    max-width: 860px;
    margin: 2.5rem auto 0;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 1.4rem 0.75rem 1.1rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                border-color 0.3s ease,
                box-shadow 0.3s ease,
                background 0.3s ease,
                color 0.3s ease;
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.04);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 12px 35px rgba(6, 182, 212, 0.18), 0 4px 12px rgba(0,0,0,0.4);
    background: rgba(6, 182, 212, 0.06);
    color: #e2e8f0;
}

.tool-icon-wrap {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                background 0.3s ease,
                box-shadow 0.3s ease;
    flex-shrink: 0;
}

.tool-card:hover .tool-icon-wrap {
    transform: scale(1.15);
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.25);
}

.tool-fa-icon {
    font-size: 1.85rem;
}

.tool-icon-wrap img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
}

.tool-name {
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

.tool-card:hover .tool-name {
    color: var(--primary-color);
}

@media (max-width: 700px) {
    .toolkit-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
    }
}

@media (max-width: 420px) {
    .toolkit-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─────────────────────────────────────────────────────── */

/* ── Stats Bar ────────────────────────────────────────────── */
.stats-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(6, 182, 212, 0.03);
    padding: 2rem 5%;
}

.stats-bar-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.stat-num {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    font-family: 'Outfit', sans-serif;
}

.stat-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.stat-divider {
    width: 1px;
    height: 3rem;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* ── Featured Work ────────────────────────────────────────── */
.featured-work {
    padding: 5rem 5%;
}

.fw-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: -1.5rem;
    margin-bottom: 3rem;
}

.fw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.fw-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.fw-card:hover {
    transform: translateY(-6px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.08);
}

.fw-card-featured {
    border-color: rgba(6, 182, 212, 0.2);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.07);
}

.fw-card-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.02);
}

.fw-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.fw-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
}

.fw-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-color);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
}

.fw-card-body h3 {
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: 0.6rem;
    color: var(--text-color);
}

.fw-card-body p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 1.25rem;
}

.fw-card-links {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-top: auto;
}

.fw-link-primary {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s ease;
}

.fw-link-primary:hover { gap: 0.65rem; }

.fw-link-secondary {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
}

.fw-link-secondary:hover { color: var(--text-color); }

@media (max-width: 960px) {
    .fw-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
    }
}

@media (max-width: 600px) {
    .stats-bar-inner {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    .stat-divider { display: none; }
    .stat-item { min-width: 40%; }
    .stat-num { font-size: 2rem; }
}
/* ── Experience ───────────────────────────────────────────── */
.experience {
    padding: 5rem 5%;
}

.xp-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.xp-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.xp-item:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.3);
    border-left-color: var(--primary-color);
}

.xp-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.xp-head h3 {
    font-size: 1.15rem;
    color: var(--text-color);
    margin: 0;
}

.xp-org {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin: 0.2rem 0 0;
}

.xp-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.xp-item ul {
    margin: 0 0 1rem 1.1rem;
    padding: 0;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.xp-item li + li {
    margin-top: 0.35rem;
}

/* ── Publications ─────────────────────────────────────────── */
.publications {
    padding: 4rem 5%;
}

.pub-list {
    list-style: none;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.pub-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--card-border);
}

.pub-list a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.pub-venue {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ── Contact CTA ──────────────────────────────────────────── */
.contact-cta {
    padding: 5rem 5%;
    text-align: center;
}

.contact-cta h2 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    margin-bottom: 1rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-cta p {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.contact-cta .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: underline;
}

.footer-link:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .xp-head,
    .pub-list li {
        flex-direction: column;
        gap: 0.35rem;
    }

    .xp-item {
        padding: 1.5rem 1.25rem;
    }
}

/* Project card without a cover image */
.fw-card-icon {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(99, 102, 241, 0.12));
}

/* ── Global: accessibility, icons, motion (shared by all pages) ── */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 10001;
    background: var(--primary-color);
    color: var(--dark-bg);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.skip-link:focus {
    top: 1rem;
}

:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 2px;
    border-radius: 4px;
}

.icon {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    vertical-align: -0.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.badge-dot {
    animation-iteration-count: 3;
}

/* Scroll-driven reveal; content stays visible where unsupported */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .reveal {
            animation: reveal-up linear both;
            animation-timeline: view();
            animation-range: entry 0% cover 22%;
        }
    }
}

@keyframes reveal-up {
    from { opacity: 0; translate: 0 24px; }
}

/* Cross-document page transitions */
@view-transition {
    navigation: auto;
}

.site-header {
    view-transition-name: site-header;
}

@media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 250ms;
    }
}

@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;
    }

    .ambient-orb {
        display: none;
    }

    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}

.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;
}

/* ── Shared site chrome (assets/js/site-chrome.js) ── */
.has-chrome .mobile-nav-toggle,
.has-chrome .close-menu {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.6rem;
    cursor: pointer;
}

.nav-overlay {
    visibility: hidden;
}

.nav-overlay.active {
    visibility: visible;
}

body.chrome-offset {
    padding-top: calc(var(--header-height) + 0.5rem);
}

.footer[data-site-footer] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    padding: 3rem 5%;
}

.sf-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #10b981 !important;
    font-weight: 600;
}

.sf-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

.sf-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.5rem;
}

.sf-links a {
    color: var(--text-color);
    font-weight: 500;
}

.sf-links a:hover,
.sf-minor a:hover {
    color: var(--primary-color);
}

.sf-minor {
    font-size: 0.82rem !important;
}

.sf-minor a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────
   Floating WhatsApp button (injected by assets/js/site-chrome.js)
   Bottom-right corner. z-index stays under
   the mobile nav overlay (10001) and command palette (20000).
   ───────────────────────────────────────────────────────────── */
.whatsapp-fab {
    position: fixed;
    right: 2rem;
    bottom: 1.25rem;
    z-index: 1000;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
    color: #fff;
}

.whatsapp-fab:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(37, 211, 102, 0.55);
}

.whatsapp-fab svg {
    display: block;
    width: 28px;
    height: 28px;
}

/* Small hover label, desktop pointers only */
.whatsapp-fab-label {
    position: absolute;
    right: calc(100% + 0.6rem);
    top: 50%;
    transform: translate(6px, -50%);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #0b1222;
    border: 1px solid rgba(37, 211, 102, 0.4);
    color: var(--text-color);
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) and (min-width: 641px) {
    .whatsapp-fab:hover .whatsapp-fab-label,
    .whatsapp-fab:focus-visible .whatsapp-fab-label {
        opacity: 1;
        transform: translate(0, -50%);
    }
}

@media (max-width: 640px) {
    .whatsapp-fab-label {
        display: none;
    }
}

@media (max-width: 640px) {
    .whatsapp-fab {
        right: 1rem;
        bottom: 1rem;
    }

}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-fab:hover {
        transform: none;
    }
}

/* ── Shared chrome: phone tweaks ── */
.nav-overlay {
    inset: 0;
    height: auto;
    min-height: 100%;
}

@media (max-width: 640px) {
    .has-chrome .brand-name {
        font-size: 0.95rem;
        letter-spacing: 0.06em;
    }
}
