/* Custom Design System & CSS Enhancements for Ahmed Farah Mohamed Portfolio */

:root {
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-outfit: 'Outfit', system-ui, -apple-system, sans-serif;
}

/* clip (not hidden) so the sticky header keeps working; hidden is the fallback for old browsers */
html {
    overflow-x: hidden;
    overflow-x: clip;
    width: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: #F8FAFC;
    color: #0F172A;
    overflow-x: hidden;
    overflow-x: clip;
    width: 100%;
    position: relative;
}

.font-outfit {
    font-family: var(--font-outfit);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Glassmorphism Classes */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.glass-light-accent {
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

/* Floating & Glow Animations */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: floatSlow 5s ease-in-out infinite;
}

.animate-float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

.animate-float-slower {
    animation: floatSlow 8s ease-in-out infinite;
    animation-delay: 1.2s;
}

/* Orbiting Ring Rotation (Hero Visual) */
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spinSlow 20s linear infinite;
}

.animate-spin-slower {
    animation: spinSlow 32s linear infinite reverse;
}

/* Terminal Cursor Blink (Hero Code Widget) */
@keyframes blink {
    0%, 45% { opacity: 1; }
    50%, 95% { opacity: 0; }
    100% { opacity: 1; }
}

.animate-blink {
    animation: blink 1s step-end infinite;
}

/* Respect Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    .animate-float,
    .animate-float-slow,
    .animate-float-slower,
    .animate-spin-slow,
    .animate-spin-slower,
    .animate-blink {
        animation: none !important;
    }
}

/* ============================================= */
/* Ambient Blob Drift Animations                  */
/* ============================================= */
@keyframes blobDrift1 {
    0%, 100% { transform: translate(0, 0); opacity: 0.7; }
    50% { transform: translate(50px, 40px); opacity: 0.9; }
}
@keyframes blobDrift2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-40px, 50px); }
}
@keyframes blobDrift3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -40px); }
}
.ambient-blob-1 { animation: blobDrift1 16s ease-in-out infinite; }
.ambient-blob-2 { animation: blobDrift2 20s ease-in-out infinite; }
.ambient-blob-3 { animation: blobDrift3 24s ease-in-out infinite; }


/* Card Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

/* Gradient Text Shimmer Animation */
@keyframes textShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-shimmer {
    background-size: 200% auto;
    animation: textShimmer 4s ease infinite;
}

/* Glow Border & Shadow Utilities */
.glow-indigo {
    box-shadow: 0 0 25px -5px rgba(79, 70, 229, 0.3);
}

.glow-teal {
    box-shadow: 0 0 25px -5px rgba(20, 184, 166, 0.3);
}

.glass-pill {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
}

/* Custom Selection Highlight */
::selection {
    background-color: #4F46E5;
    color: #FFFFFF;
}

/* Custom Scrollbar for Modal & Content Containers */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* ============================================= */
/* Section header (new sections)                 */
/* ============================================= */
.sec-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 2rem;
}

.sec-title {
    font-family: var(--font-outfit);
    font-size: clamp(1.875rem, 1.3rem + 2vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: #0F172A;
}

.sec-desc {
    margin-top: 0.75rem;
    max-width: 52ch;
    font-size: 1rem;
    line-height: 1.6;
    color: #64748B;
}

.sec-count {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    color: #64748B;
    font-size: 0.875rem;
    font-weight: 600;
}

.sec-count strong {
    font-family: var(--font-outfit);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: #4F46E5;
    font-variant-numeric: tabular-nums;
}

/* ============================================= */
/* Header: "My sites" button + scroll progress   */
/* ============================================= */
.nav-sites {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5625rem 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid #CBD5E1;
    background: #FFFFFF;
    color: #1E293B;
    font-size: 0.75rem;
    font-weight: 700;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.nav-sites:hover {
    border-color: #818CF8;
    color: #4338CA;
    background: #EEF2FF;
}

.nav-sites-count {
    min-width: 1.25rem;
    padding: 0.0625rem 0.4375rem;
    border-radius: 9999px;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 0.6875rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.scroll-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, #4F46E5, #0EA5E9 55%, #14B8A6);
    transform: scaleX(0);
    transform-origin: 0 50%;
    pointer-events: none;
}

/* ============================================= */
/* Live sites: one button that opens the list    */
/* ============================================= */
.sites-card {
    border-radius: 1.5rem;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 24px 48px -32px rgba(30, 41, 90, 0.3);
    padding: 1.5rem;
}

@media (min-width: 640px) {
    .sites-card {
        padding: 2rem 2.25rem;
    }
}

.sites-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
}

.sites-action {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sites-peek {
    display: none;
}

@media (min-width: 768px) {
    .sites-peek {
        display: flex;
    }
}

.sites-peek img {
    width: 3.25rem;
    height: 2.25rem;
    object-fit: cover;
    object-position: top center;
    border-radius: 0.5rem;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    background: #F1F5F9;
}

.sites-peek img + img {
    margin-left: -0.875rem;
}

.sites-head .sites-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem 0.875rem 0.875rem;
    border-radius: 1rem;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 0.9375rem;
    font-weight: 700;
    box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.6);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sites-head .sites-toggle:hover {
    background: #4F46E5;
}

.sites-toggle:active {
    transform: scale(0.98);
}

.sites-toggle:focus-visible,
.site-card:focus-visible,
.tl-link:focus-visible,
.nav-sites:focus-visible {
    outline: 2px solid #4F46E5;
    outline-offset: 3px;
}

.sites-toggle-count {
    display: grid;
    place-items: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.375rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.sites-toggle svg {
    width: 1.125rem;
    height: 1.125rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sites-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.sites-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sites-panel.is-open {
    grid-template-rows: 1fr;
}

.sites-panel-inner {
    min-height: 0;
    overflow: hidden;
}

.site-grid {
    display: grid;
    gap: 1rem;
    padding-top: 1.75rem;
    margin-top: 1.75rem;
    border-top: 1px solid #EEF1F6;
}

@media (min-width: 640px) {
    .site-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .site-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.site-grid > li {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--i, 0) * 50ms);
}

.sites-panel.is-open .site-grid > li {
    opacity: 1;
    transform: none;
}

.site-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 1rem;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-card:hover {
    border-color: #A5B4FC;
    box-shadow: 0 16px 32px -20px rgba(30, 41, 90, 0.35);
}

.site-thumb {
    position: relative;
    display: block;
    background: #F1F5F9;
    border-bottom: 1px solid #EEF1F6;
}

.site-thumb-bar {
    display: flex;
    align-items: center;
    gap: 0.3125rem;
    padding: 0.4375rem 0.625rem;
    background: #E9EDF3;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748B;
}

.site-thumb-bar i {
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 9999px;
    background: #CBD5E1;
}

.site-thumb-bar span {
    margin-left: 0.375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-thumb-img {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.site-thumb-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-card:hover .site-thumb-img img {
    transform: scale(1.04);
}

.site-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
    padding: 1rem 1.125rem 1.125rem;
}

.site-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.site-card-name {
    font-family: var(--font-outfit);
    font-size: 1.0625rem;
    font-weight: 800;
    color: #0F172A;
}

.site-card-cat {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4F46E5;
}

.site-card-desc {
    font-size: 0.84375rem;
    line-height: 1.55;
    color: #64748B;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0F172A;
}

.site-card:hover .site-card-link {
    color: #4F46E5;
}

.site-card-link svg {
    width: 0.8125rem;
    height: 0.8125rem;
}

/* ============================================= */
/* Featured project cards                        */
/* ============================================= */
.proj-card {
    --accent: #4F46E5;
    --accent-soft: #EEF2FF;
    display: grid;
    border-radius: 1.75rem;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 32px 64px -44px rgba(30, 41, 90, 0.45);
    overflow: hidden;
}

.proj--tscan {
    --accent: #15803D;
    --accent-soft: #DCFCE7;
}

@media (min-width: 1024px) {
    .proj-card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .proj-card.is-reverse .proj-media {
        order: 2;
    }
}

/* Phones and tablets: a short landscape picture above the text (TScan swaps to the phones crop) */
.proj-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #E2E8F0;
}

.proj--tscan .proj-media {
    background: #0C3320;
}

.proj-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.proj--hotel .proj-media img {
    object-position: 50% 62%;
}

@media (min-width: 1024px) {
    .proj-media {
        aspect-ratio: auto;
        min-height: 34rem;
    }

    .proj--hotel .proj-media img {
        object-position: 50% 50%;
    }

    .proj--tscan .proj-media img {
        object-position: 50% 38%;
    }
}

.proj-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

@media (hover: hover) {
    .proj-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 40px 72px -40px rgba(30, 41, 90, 0.5);
    }

    .proj-card:hover .proj-media img {
        transform: scale(1.03);
    }
}

.proj-head {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.proj-icon {
    flex: 0 0 auto;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: #0C3320;
    object-fit: cover;
    box-shadow: 0 10px 20px -10px rgba(12, 51, 32, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.proj-head .proj-sub {
    margin-top: 0.125rem;
}

.proj-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.125rem;
    padding: 1.75rem 1.5rem 2rem;
}

@media (min-width: 640px) {
    .proj-body {
        padding: 2.5rem;
    }
}

@media (min-width: 1280px) {
    .proj-body {
        padding: 3rem 3.5rem;
    }
}

.proj-kicker {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3125rem 0.75rem;
    border-radius: 9999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.78125rem;
    font-weight: 700;
}

.proj-kicker::before {
    content: "";
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 9999px;
    background: currentColor;
}

.proj-title {
    font-family: var(--font-outfit);
    font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: #0F172A;
}

.proj-sub {
    margin-top: -0.625rem;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--accent);
}

.proj-desc {
    max-width: 58ch;
    font-size: 0.96875rem;
    line-height: 1.7;
    color: #475569;
}

.proj-features {
    display: grid;
    gap: 0.625rem 1.25rem;
}

@media (min-width: 640px) {
    .proj-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.proj-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
    color: #334155;
}

.proj-check {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 1.375rem;
    height: 1.375rem;
    margin-top: -0.0625rem;
    border-radius: 0.4375rem;
    background: var(--accent-soft);
    color: var(--accent);
}

.proj-check svg {
    width: 0.8125rem;
    height: 0.8125rem;
}

.proj-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding-top: 0.25rem;
}

.proj-tech li {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.proj-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    padding-top: 0.5rem;
}

.proj-actions .proj-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.125rem;
    border-radius: 0.875rem;
    border: 1px solid #0F172A;
    background: #0F172A;
    color: #FFFFFF;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.proj-actions .proj-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.proj-actions .proj-btn--ghost {
    background: #FFFFFF;
    border-color: #CBD5E1;
    color: #0F172A;
}

.proj-actions .proj-btn--ghost:hover {
    background: #FFFFFF;
    border-color: var(--accent);
    color: var(--accent);
}

.proj-btn svg {
    width: 1rem;
    height: 1rem;
}

.proj-actions .proj-btn {
    white-space: nowrap;
}

@media (max-width: 639px) {
    .proj-actions .proj-btn {
        flex: 1 1 auto;
        justify-content: center;
        gap: 0.375rem;
        padding: 0.75rem;
    }
}

.proj-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ============================================= */
/* Experience timeline                           */
/* ============================================= */
.timeline {
    position: relative;
    padding-left: 2.25rem;
}

.timeline::before,
.timeline::after {
    content: "";
    position: absolute;
    left: 0.4375rem;
    top: 0.5rem;
    width: 2px;
    border-radius: 2px;
}

.timeline::before {
    bottom: 0.5rem;
    background: #E2E8F0;
}

.timeline::after {
    height: calc(var(--tl-progress, 0) * (100% - 1rem));
    background: linear-gradient(180deg, #4F46E5, #0EA5E9);
}

.tl-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-dot {
    position: absolute;
    left: -2.25rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    background: #FFFFFF;
    border: 2px solid #CBD5E1;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.tl-item.is-reached .tl-dot {
    background: #4F46E5;
    border-color: #4F46E5;
    box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.14);
}

.tl-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
}

.tl-org {
    font-family: var(--font-outfit);
    font-size: 1.375rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0F172A;
}

.tl-period {
    padding: 0.1875rem 0.625rem;
    border-radius: 9999px;
    background: #EEF2FF;
    color: #4338CA;
    font-size: 0.78125rem;
    font-weight: 700;
    white-space: nowrap;
}

.tl-item.is-current .tl-period {
    display: inline-flex;
    align-items: center;
    gap: 0.4375rem;
    background: #DCFCE7;
    color: #15803D;
}

.tl-item.is-current .tl-period::before {
    content: "";
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 9999px;
    background: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.tl-item.is-current.is-reached .tl-dot {
    background: #22C55E;
    border-color: #22C55E;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.18);
}

.tl-role {
    margin-top: 0.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
}

.tl-desc {
    margin-top: 0.5rem;
    max-width: 60ch;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #475569;
}

.tl-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.625rem;
    font-size: 0.84375rem;
    font-weight: 600;
    color: #4F46E5;
}

.tl-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tl-link svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* ============================================= */
/* Programming languages                         */
/* ============================================= */
.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.75rem;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    border-radius: 1rem;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
}

.lang-mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: var(--lang-bg);
    color: var(--lang-ink);
    font-family: var(--font-outfit);
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.lang-text {
    display: grid;
    gap: 0.125rem;
    min-width: 0;
}

.lang-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0F172A;
}

.lang-use {
    font-size: 0.8125rem;
    color: #64748B;
}

/* ============================================= */
/* Hero intro (one orchestrated page-load moment) */
/* ============================================= */
.line-mask {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}

.line-mask > span {
    display: inline-block;
}

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

@keyframes lineUp {
    from { transform: translateY(105%); }
    to { transform: none; }
}

@keyframes introPhoto {
    from { opacity: 0; transform: translateY(12px) scale(0.97); filter: blur(6px); }
    to { opacity: 1; transform: none; filter: none; }
}

@media (prefers-reduced-motion: no-preference) {
    .intro {
        animation: introIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
        animation-delay: var(--d, 0ms);
    }

    .line-mask > span {
        animation: lineUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
        animation-delay: var(--d, 0ms);
    }

    .intro-photo {
        animation: introPhoto 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
        animation-delay: var(--d, 0ms);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sites-panel,
    .site-grid > li,
    .site-thumb-img img,
    .sites-toggle svg,
    .tl-dot {
        transition: none;
    }

    .ambient-blob-1,
    .ambient-blob-2,
    .ambient-blob-3,
    .animate-shimmer {
        animation: none;
    }
}
