/* ============================================================
   AZRA Project — Ultra-Premium Stylesheet v3.0
   Colors: Pure Black (#000), Yellow (#FFD500) — UNTOUCHED
   ============================================================ */

/* ===== FONT IMPORTS =====
   Loaded via <link> in <head> for non-blocking, faster delivery:
   Space Grotesk, Syne, Manrope, JetBrains Mono, Vazirmatn, Noto Naskh Arabic */

/* ===== CSS VARIABLES ===== */
:root {
    /* Core palette — untouched */
    --bg-primary:       #000000;
    --bg-secondary:     #050505;
    --bg-tertiary:      #0a0a0a;
    --bg-card:          #0c0c0c;
    --bg-card-hover:    #141414;
    --text-primary:     #ffffff;
    --text-secondary:   #e0e0e0;
    --text-muted:       #888888;
    --text-dim:         #555555;
    --accent-gold:      #FFD500;
    --accent-gold-dim:  rgba(255, 213, 0, 0.08);
    --accent-gold-glow: rgba(255, 213, 0, 0.25);
    --accent-purple:    #800080;
    --accent-purple-light: #c084fc;

    /* Borders */
    --border-subtle:    rgba(255,255,255,0.04);
    --border-default:   rgba(255,255,255,0.07);
    --border-hover:     rgba(255,255,255,0.14);
    --border-gold:      rgba(255,213,0,0.18);
    --border-gold-hover:rgba(255,213,0,0.45);

    /* Shadows */
    --shadow-sm:        0 2px 8px rgba(0,0,0,0.4);
    --shadow-md:        0 8px 32px rgba(0,0,0,0.5);
    --shadow-lg:        0 20px 60px rgba(0,0,0,0.6);
    --shadow-gold:      0 4px 24px rgba(255,213,0,0.12);
    --shadow-gold-lg:   0 12px 48px rgba(255,213,0,0.2);
    --shadow-glass:     0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);

    /* Radius */
    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  22px;
    --radius-2xl: 32px;

    /* Transitions */
    --t-fast:   0.15s ease;
    --t-base:   0.3s ease;
    --t-slow:   0.5s ease;
    --t-spring: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Glass */
    --glass-bg:     rgba(255,255,255,0.03);
    --glass-border: rgba(255,255,255,0.08);
    --glass-blur:   20px;

    /* Fonts */
    --font-display: 'Syne', 'Space Grotesk', sans-serif;
    --font-sans:    'Space Grotesk', 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body:    'Manrope', 'Space Grotesk', sans-serif;
    --font-fa:      'Vazirmatn', 'Space Grotesk', sans-serif;
    --font-fa-display: 'Vazirmatn', 'Noto Naskh Arabic', sans-serif;
    --font-mono:    'JetBrains Mono', 'Courier New', monospace;

    /* Cinematic motion */
    --ease-cinematic: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-spring-soft: cubic-bezier(0.34, 1.56, 0.64, 1);
    --reveal-duration: 0.95s;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-gold) #000;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
    -webkit-user-select: none;
}

input, textarea, [contenteditable="true"] {
    user-select: text !important;
    -webkit-user-select: text !important;
}

[lang="fa"] body, [dir="rtl"] body, [dir="rtl"] p,
[dir="rtl"] span, [dir="rtl"] li, [dir="rtl"] a {
    font-family: var(--font-fa);
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
    font-family: var(--font-fa-display);
    letter-spacing: 0;
}

::selection { background: rgba(255,213,0,0.28); color: #fff; }
::-moz-selection { background: rgba(255,213,0,0.28); color: #fff; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: var(--accent-gold); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #ffed4e; }

:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 3px; border-radius: var(--radius-sm); }

/* ===== DEDICATION BANNER ===== */
.dedication-banner {
    position: fixed;
    inset: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-cinematic);
}
.dedication-banner.show { opacity: 1; pointer-events: auto; }

.dedication-content {
    position: relative;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    align-items: center;
    text-align: center;
    padding: 2.6rem 2.2rem 2.2rem;
    background: linear-gradient(165deg, rgba(18,18,18,0.92) 0%, rgba(6,6,6,0.96) 100%);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-2xl);
    box-shadow:
        0 30px 90px rgba(0,0,0,0.7),
        0 0 0 1px rgba(255,213,0,0.05),
        0 0 70px rgba(255,213,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.06);
    transform: translateY(28px) scale(0.94);
    opacity: 0;
    filter: blur(0);
    transition: transform 0.6s var(--ease-spring-soft) 0.08s, opacity 0.5s ease 0.08s, filter 0.6s ease 0.08s;
}
.dedication-banner.show .dedication-content {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
}

/* top gradient hairline accent */
.dedication-content::before {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
}

.dedication-icon {
    width: 46px; height: 46px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle, rgba(255,213,0,0.18) 0%, rgba(255,213,0,0.04) 70%);
    border: 1px solid var(--border-gold);
    color: var(--accent-gold);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.dedication-text {
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    line-height: 1.85;
    font-weight: 500;
    color: var(--text-secondary);
}
.dedication-text .dedication-en {
    font-family: var(--font-body);
    display: block;
    margin-bottom: 1.1rem;
    color: var(--text-secondary);
}
.dedication-text .dedication-fa {
    font-family: var(--font-fa);
    display: block;
    color: var(--accent-gold);
    font-size: 1.02rem;
    line-height: 2.1;
}

.dedication-close {
    margin-top: 0.4rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--accent-gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.7rem 1.8rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all var(--t-base);
}
.dedication-close:hover {
    background: rgba(255,213,0,0.12);
    border-color: var(--border-gold-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* legacy corner-x button kept for markup compatibility, hidden in new layout */
.dedication-close.dedication-x {
    position: absolute;
    top: 14px; right: 16px;
    background: none; border: none;
    padding: 6px; margin: 0;
    font-size: 1.3rem;
    color: var(--text-muted);
    box-shadow: none;
}
.dedication-close.dedication-x:hover { color: var(--accent-gold); background: none; transform: none; box-shadow: none; }
[dir="rtl"] .dedication-close.dedication-x { right: auto; left: 16px; }

/* ===== STARFIELD ===== */
.starfield {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: starTwinkle var(--duration, 4s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes starTwinkle {
    0%, 100% { opacity: var(--opacity-min, 0.2); transform: scale(1); }
    50% { opacity: var(--opacity-max, 0.7); transform: scale(1.3); }
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    z-index: 1000;
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
    overflow: visible;
}

.header.scrolled {
    background: rgba(0,0,0,0.9);
    border-bottom: 1px solid var(--border-gold);
    box-shadow: 0 1px 0 var(--border-gold), 0 4px 30px rgba(0,0,0,0.6);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1rem;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-gold);
    letter-spacing: 0.2em;
    text-decoration: none;
    transition: opacity var(--t-fast), transform var(--t-spring);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0;
    transition: opacity var(--t-base);
}
.logo:hover { transform: scale(1.04); }
.logo:hover::after { opacity: 1; }

.logo-icon { width: 32px; height: 32px; filter: drop-shadow(0 0 8px rgba(255,213,0,0.5)); }

/* NAV DESKTOP */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-shrink: 0;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color var(--t-base);
    position: relative;
    padding: 0.3rem 0;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 50%; right: 50%;
    height: 1.5px;
    background: var(--accent-gold);
    transition: left var(--t-spring), right var(--t-spring);
    border-radius: 1px;
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { left: 0; right: 0; }

/* LANG BTN */
.lang-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 7px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-sans);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all var(--t-base);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    flex-shrink: 0;
}
.lang-btn:hover {
    background: rgba(255,213,0,0.1);
    border-color: var(--border-gold-hover);
    color: var(--accent-gold);
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

@media (min-width: 769px) { .mobile-lang { display: none; } }
@media (max-width: 768px) {
    .nav-desktop .lang-btn { display: none; }
    .mobile-lang { display: block; }
}

/* NOTIFICATION */
.notification-wrapper { position: relative; }

.notification-btn {
    background: none; border: none;
    color: var(--text-muted);
    cursor: pointer; padding: 0.45rem;
    display: flex; align-items: center;
    transition: color var(--t-base), transform var(--t-fast);
    border-radius: 50%;
    position: relative;
}
.notification-btn:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
    animation: bellRing 0.5s ease;
}
.notification-btn::after {
    content: '';
    position: absolute;
    top: 4px; right: 4px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--accent-gold);
    box-shadow: 0 0 8px rgba(255,213,0,0.8);
    animation: notifDotPulse 2.4s ease-in-out infinite;
}
@keyframes notifDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.6; }
}
@keyframes bellRing {
    0%,100% { transform: rotate(0) scale(1.1); }
    20% { transform: rotate(18deg) scale(1.1); }
    40% { transform: rotate(-14deg) scale(1.1); }
    60% { transform: rotate(10deg) scale(1.1); }
    80% { transform: rotate(-7deg) scale(1.1); }
}

.notification-dropdown {
    position: absolute;
    top: 150%; right: -10px;
    width: 360px;
    background: linear-gradient(165deg, rgba(16,16,16,0.92) 0%, rgba(6,6,6,0.97) 100%);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    opacity: 0;
    transform: translateY(-14px) scale(0.94);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.35s var(--ease-cinematic), transform 0.35s var(--ease-spring-soft);
    box-shadow:
        0 24px 70px rgba(0,0,0,0.65),
        0 0 0 1px rgba(255,213,0,0.04),
        0 0 40px rgba(255,213,0,0.07),
        inset 0 1px 0 rgba(255,255,255,0.07);
    z-index: 1001;
    overflow: hidden;
}
[dir="rtl"] .notification-dropdown { right: auto; left: -10px; transform-origin: top left; }
.notification-dropdown.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.65rem; text-transform: uppercase;
    letter-spacing: 0.18em; color: var(--accent-gold);
    font-weight: 700;
    padding: 0.9rem 1rem 0.8rem;
    border-bottom: 1px solid var(--border-gold);
    margin-bottom: 0.3rem;
}
.notification-header .notif-count {
    background: rgba(255,213,0,0.12);
    border: 1px solid rgba(255,213,0,0.25);
    color: var(--accent-gold);
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 0.62rem;
    letter-spacing: 0.04em;
}
.notification-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin: 0.2rem;
    padding: 0.75rem 0.7rem;
    border-radius: var(--radius-md);
    transition: background var(--t-fast), transform var(--t-fast);
    position: relative;
}
.notification-item:hover {
    background: rgba(255,213,0,0.06);
    transform: translateX(-2px);
}
[dir="rtl"] .notification-item:hover { transform: translateX(2px); }
.notification-item + .notification-item { border-top: 1px solid var(--border-subtle); }
.notification-icon {
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,213,0,0.08);
    border: 1px solid rgba(255,213,0,0.18);
    color: var(--accent-gold);
    font-size: 0.85rem;
}
.notification-date { font-size: 0.62rem; color: var(--text-dim); margin-bottom: 0.3rem; letter-spacing: 0.05em; }
.notification-text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.55; }
.notification-footer {
    text-align: center;
    padding: 0.7rem;
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

/* HAMBURGER */
.hamburger {
    display: none;
    flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 8px; border-radius: var(--radius-sm);
    transition: background var(--t-fast);
    flex-shrink: 0;
    position: relative;
    z-index: 1100;
}
.hamburger:hover { background: rgba(255,255,255,0.05); }
.hamburger span {
    width: 22px; height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all var(--t-spring);
    display: block;
}
.hamburger.active span { background: var(--accent-gold); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* MOBILE MENU — glass panel with cascading pill links, strong page blur-behind */
.mobile-menu {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.62);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    display: flex; flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 110px 1.4rem 2rem;
    gap: 0.65rem;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s var(--ease-cinematic), transform 0.45s var(--ease-cinematic), visibility 0.45s, backdrop-filter 0.5s ease;
    z-index: 999;
    max-width: 100vw;
    overflow-y: auto;
}
.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* While the menu is open, blur and recede everything behind it so focus
   is unmistakably on the navigation — the page becomes a soft backdrop */
body.menu-open .header,
body.menu-open #scrollProgress,
body.menu-open .starfield {
    filter: blur(3px) brightness(0.7);
    transition: filter 0.4s var(--ease-cinematic);
}
body.menu-open { overflow: hidden; }

/* pill-shaped glass links, staggered entrance with depth (blur + scale) */
.mobile-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 1rem 1.4rem;
    font-size: 0.92rem; font-weight: 600;
    letter-spacing: 0.03em;
    font-family: var(--font-display);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 6px 18px rgba(0,0,0,0.35);
    transition:
        background var(--t-base), border-color var(--t-base),
        color var(--t-base), transform 0.5s var(--ease-spring-soft), box-shadow var(--t-base),
        opacity 0.45s var(--ease-cinematic), translate 0.5s var(--ease-spring-soft),
        filter 0.45s var(--ease-cinematic);
    opacity: 0;
    translate: 0 22px;
    filter: blur(8px);
    transform: scale(0.92);
    position: relative;
    overflow: hidden;
}
[dir="rtl"] .mobile-link { font-family: var(--font-fa-display); }

/* cascading reveal — each link gets its index-based delay set inline by JS
   via --i, falls back to nth-child for the static markup order */
.mobile-menu.active .mobile-link {
    opacity: 1;
    translate: 0 0;
    filter: blur(0);
    transform: scale(1);
    transition-delay: calc(var(--i, 0) * 60ms + 100ms);
}
/* reverse cascade on close — last link leaves first, gives the menu a
   "deflating" feel rather than the snap-out of a flat opacity fade */
.mobile-menu:not(.active) .mobile-link {
    transition-delay: calc((var(--total, 1) - var(--i, 0)) * 35ms);
}

.mobile-link::after {
    content: '→';
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--t-base), transform var(--t-base);
    color: var(--accent-gold);
    font-size: 0.85rem;
}
[dir="rtl"] .mobile-link::after { content: '←'; transform: translateX(6px); }

.mobile-link:hover, .mobile-link:active {
    color: var(--accent-gold);
    background: rgba(255,213,0,0.08);
    border-color: var(--border-gold-hover);
    transform: scale(1.02);
    box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.06);
}
.mobile-link:hover::after { opacity: 1; transform: translateX(0); }
[dir="rtl"] .mobile-link:hover::after { transform: translateX(0); }

/* subtle ambient glow behind the menu */
.mobile-menu::before {
    content: '';
    position: fixed;
    top: -10%; left: 50%;
    transform: translateX(-50%);
    width: 70vw; height: 40vh;
    background: radial-gradient(ellipse, rgba(255,213,0,0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex; align-items: center;
    padding: 0 2rem;
    position: relative;
    overflow: hidden;
}

/* Ambient glow orbs */
.hero::before {
    content: '';
    position: absolute;
    top: 20%; left: 10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,213,0,0.05) 0%, transparent 65%);
    pointer-events: none;
    animation: orbFloat1 12s ease-in-out infinite;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 10%; right: 5%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(128,0,128,0.04) 0%, transparent 65%);
    pointer-events: none;
    animation: orbFloat2 16s ease-in-out infinite;
}
@keyframes orbFloat1 {
    0%,100% { transform: translate(0,0) scale(1); }
    50% { transform: translate(40px,-30px) scale(1.1); }
}
@keyframes orbFloat2 {
    0%,100% { transform: translate(0,0) scale(1); }
    50% { transform: translate(-30px,20px) scale(1.08); }
}

.hero-content {
    max-width: 1400px; margin: 0 auto; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    gap: 4rem; padding-top: 80px;
}

.hero-text { flex: 1; max-width: 620px; }

.hero-brand {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.35em;
    margin-bottom: 1.2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.3s forwards;
    display: flex; align-items: center; gap: 12px;
}
.hero-brand::before, .hero-brand::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,213,0,0.4));
    max-width: 60px;
}
.hero-brand::after {
    background: linear-gradient(90deg, rgba(255,213,0,0.4), transparent);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    line-height: 0.95;
    margin-bottom: 0.5rem;
    display: inline-block;
    overflow: hidden; white-space: nowrap;
    border-right: 3px solid var(--accent-gold);
    width: 0;
    animation: typing 2.5s steps(30,end) 0.6s forwards, blink-caret 0.8s step-end infinite;
    max-width: 100%;
    text-shadow: 0 0 60px rgba(255,213,0,0.2);
}
@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent-gold); }
}

.hero-subtitle {
    margin-top: 1.5rem;
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: fadeInUp 0.8s ease 1.6s forwards;
    line-height: 1.6;
}

.hero-description {
    margin-top: 1.2rem;
    max-width: 500px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.85;
    opacity: 0;
    animation: fadeInUp 0.8s ease 2s forwards;
}

.cta-button {
    display: inline-flex; align-items: center; gap: 10px;
    margin-top: 2.5rem;
    padding: 1rem 2.2rem;
    border: 1.5px solid var(--accent-gold);
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--radius-md);
    transition: all var(--t-base);
    position: relative; overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.8s ease 2.4s forwards, pulseGlow 2.5s ease-in-out 3.5s infinite;
    backdrop-filter: blur(10px);
}
.cta-button::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--accent-gold);
    transition: left var(--t-base);
    z-index: -1;
}
.cta-button::after {
    content: '→';
    transition: transform var(--t-base), opacity var(--t-base);
    opacity: 0;
    transform: translateX(-6px);
}
.cta-button:hover { color: #000; }
.cta-button:hover::before { left: 0; }
.cta-button:hover::after { opacity: 1; transform: translateX(0); }

@keyframes pulseGlow {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,213,0,0.25); }
    50% { box-shadow: 0 0 25px 6px rgba(255,213,0,0.35); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== HERO AVATAR (COMPLETELY REDESIGNED) ===== */
.hero-illustration {
    flex-shrink: 0;
    position: relative;
    display: flex; align-items: center; justify-content: center;
}

.avatar-container {
    position: relative;
    width: 380px; height: 480px;
    display: flex; align-items: center; justify-content: center;
    animation: avatarFloat 8s ease-in-out infinite;
    opacity: 0;
    animation: avatarFloat 8s ease-in-out infinite, avatarReveal 1s ease 2.8s forwards;
}

@keyframes avatarReveal {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes avatarFloat {
    0%,100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Orbit rings */
.avatar-orbit {
    position: absolute;
    border: 1px solid rgba(255,213,0,0.12);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
}
.avatar-orbit-1 {
    width: 340px; height: 340px;
    border-color: rgba(255,213,0,0.1);
    animation: orbitSpin1 20s linear infinite;
}
.avatar-orbit-2 {
    width: 420px; height: 420px;
    border-color: rgba(128,0,128,0.08);
    animation: orbitSpin2 30s linear infinite;
}
.avatar-orbit-3 {
    width: 260px; height: 260px;
    border-color: rgba(255,213,0,0.06);
    animation: orbitSpin1 14s linear infinite reverse;
}

@keyframes orbitSpin1 {
    from { transform: translate(-50%,-50%) rotate(0deg); }
    to   { transform: translate(-50%,-50%) rotate(360deg); }
}
@keyframes orbitSpin2 {
    from { transform: translate(-50%,-50%) rotate(0deg); }
    to   { transform: translate(-50%,-50%) rotate(-360deg); }
}

/* Orbit dots */
.orbit-dot {
    position: absolute;
    width: 8px; height: 8px;
    background: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-gold);
}
.orbit-dot-purple {
    background: var(--accent-purple-light);
    box-shadow: 0 0 12px var(--accent-purple-light);
    width: 6px; height: 6px;
}

/* Central avatar glass card */
.avatar-core {
    position: relative;
    width: 260px; height: 320px;
    background: linear-gradient(145deg,
        rgba(255,213,0,0.06) 0%,
        rgba(255,255,255,0.02) 40%,
        rgba(128,0,128,0.04) 100%);
    border: 1px solid rgba(255,213,0,0.2);
    border-radius: 40px 40px 20px 20px;
    backdrop-filter: blur(10px);
    box-shadow:
        0 0 0 1px rgba(255,213,0,0.08),
        0 20px 60px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.08),
        0 0 80px rgba(255,213,0,0.06);
    overflow: hidden;
    z-index: 2;
}

/* Glass reflection */
.avatar-core::before {
    content: '';
    position: absolute;
    top: 0; left: -40%; width: 80%; height: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.07), transparent);
    border-radius: 40px 40px 0 0;
    pointer-events: none;
}

/* Inner figure — upgraded */
.avatar-figure-svg {
    width: 100%; height: 100%;
    position: absolute;
    top: 0; left: 0;
}

/* Glow pulse under avatar */
.avatar-glow {
    position: absolute;
    bottom: -20px; left: 50%;
    transform: translateX(-50%);
    width: 180px; height: 30px;
    background: radial-gradient(ellipse, rgba(255,213,0,0.25) 0%, transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
    filter: blur(10px);
}
@keyframes glowPulse {
    0%,100% { opacity: 0.5; transform: translateX(-50%) scaleX(1); }
    50% { opacity: 1; transform: translateX(-50%) scaleX(1.2); }
}

/* Floating code badge */
.avatar-badge {
    position: absolute;
    background: rgba(10,10,10,0.92);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-gold);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
    white-space: nowrap;
    z-index: 10;
}
.avatar-badge-1 {
    top: 40px; right: -70px;
    animation: badgeFloat1 5s ease-in-out infinite;
}
.avatar-badge-2 {
    bottom: 80px; left: -80px;
    animation: badgeFloat2 6s ease-in-out infinite;
    border-color: rgba(192,132,252,0.3);
    color: var(--accent-purple-light);
}
.avatar-badge-3 {
    bottom: 30px; right: -60px;
    animation: badgeFloat1 7s ease-in-out infinite 1s;
    font-size: 0.68rem;
}
@keyframes badgeFloat1 {
    0%,100% { transform: translateY(0px) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}
@keyframes badgeFloat2 {
    0%,100% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

/* ===== SECTIONS ===== */
.section {
    padding: 140px 2rem;
    position: relative;
}
.section-alt { background: var(--bg-secondary); }

/* Gradient section dividers */
.section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
    opacity: 0.5;
}

.section-header { text-align: center; margin-bottom: 70px; }
.container { max-width: 1200px; margin: 0 auto; }

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4.5vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: var(--accent-gold);
    letter-spacing: 0.04em;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px; left: 0;
    width: 50px; height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple-light));
    border-radius: 2px;
    transition: width var(--t-slow);
}
.section-title:hover::after { width: 100%; }

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px; margin: 0 auto;
    line-height: 1.85;
    margin-top: 0.5rem;
}

.section-content p {
    margin-bottom: 1.3rem;
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.95;
    font-family: var(--font-body);
}
[dir="rtl"] .section-content p { font-family: var(--font-fa); }

/* ===== GLASS CARDS (Reason, Feature, Research, Vision) ===== */
.reason-grid, .feature-grid, .research-areas, .vision-grid, .features-grid-extended {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
    margin-top: 2.5rem;
}

.reason-card, .feature-item, .research-area, .vision-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.2rem;
    transition: all var(--t-spring);
    position: relative; overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Top shimmer line */
.reason-card::before, .feature-item::before,
.research-area::before, .vision-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0;
    transition: opacity var(--t-base);
}

/* Sweep shimmer */
.reason-card::after, .feature-item::after,
.research-area::after, .vision-item::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.06), transparent);
    transition: left 0.7s ease;
    transform: skewX(-15deg);
    pointer-events: none;
}

.reason-card:hover, .feature-item:hover,
.research-area:hover, .vision-item:hover {
    border-color: var(--border-gold-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow-gold-lg);
    background: rgba(255,213,0,0.03);
}
.reason-card:hover::before, .feature-item:hover::before,
.research-area:hover::before, .vision-item:hover::before { opacity: 1; }
.reason-card:hover::after, .feature-item:hover::after,
.research-area:hover::after, .vision-item:hover::after { left: 150%; }

.reason-number {
    font-family: var(--font-display);
    font-size: 2.2rem; font-weight: 900;
    color: rgba(255,213,0,0.15);
    margin-bottom: 0.8rem;
    letter-spacing: 0.05em;
    transition: color var(--t-base);
}
.reason-card:hover .reason-number { color: rgba(255,213,0,0.35); }

.reason-card h3, .feature-item h3, .research-area h3, .vision-item h3 {
    font-family: var(--font-display);
    font-size: 1.1rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: 0.8rem;
    letter-spacing: 0.02em;
}
.reason-card p, .feature-item p, .research-area p, .vision-item p {
    font-size: 0.9rem; color: var(--text-muted); line-height: 1.8;
}

/* ===== FEATURE CARD EXTENDED ===== */
.feature-card-extended {
    background: linear-gradient(150deg, rgba(255,213,0,0.04) 0%, rgba(10,10,10,0.9) 40%, rgba(128,0,128,0.03) 100%);
    padding: 2.5rem 2.2rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-default);
    transition: all 0.45s cubic-bezier(0.16,1,0.3,1);
    position: relative; overflow: hidden;
    backdrop-filter: blur(16px);
}
.feature-card-extended::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-gold), transparent, var(--accent-purple-light));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.45s ease;
}
.feature-card-extended:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(255,213,0,0.12), 0 0 0 1px rgba(255,213,0,0.15);
}
.feature-card-extended:hover::before { opacity: 1; }

.feature-icon-large {
    font-size: 2.8rem; margin-bottom: 1.3rem;
    transition: transform var(--t-spring);
    display: inline-block;
}
.feature-card-extended:hover .feature-icon-large { transform: scale(1.15) rotate(-5deg); }

.feature-card-extended h3 {
    font-family: var(--font-display);
    font-size: 1.25rem; color: var(--text-primary);
    margin-bottom: 1rem; font-weight: 700;
}
.feature-card-extended p { color: var(--text-muted); line-height: 1.85; margin-bottom: 1.5rem; font-size: 0.9rem; }

.feature-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-item {
    padding: 5px 13px;
    background: rgba(255,213,0,0.07);
    border: 1px solid rgba(255,213,0,0.15);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent-gold); font-weight: 600;
    letter-spacing: 0.04em;
    transition: background var(--t-fast), transform var(--t-fast);
}
.stat-item:hover { background: rgba(255,213,0,0.15); transform: scale(1.05); }

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px; margin-top: 40px;
}

.gallery-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-default);
    transition: all var(--t-spring);
    position: relative; cursor: pointer;
}
.gallery-item::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--t-base);
}
.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(255,213,0,0.5);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(255,213,0,0.1);
}
.gallery-item:hover::after { opacity: 1; }

.gallery-item img {
    width: 100%; height: 210px;
    object-fit: cover; display: block;
    transition: transform var(--t-slow);
}
.gallery-item:hover img { transform: scale(1.07); }

.gallery-caption {
    padding: 14px 18px; font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500; letter-spacing: 0.02em;
    position: relative; z-index: 2;
    transition: color var(--t-base);
}
.gallery-item:hover .gallery-caption { color: var(--accent-gold); }

/* ===== CODE PLAYGROUND ===== */
.code-playground {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
}

.playground-container {
    background: rgba(12,12,12,0.9);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    transition: border-color var(--t-base), box-shadow var(--t-base);
}
.playground-container:focus-within {
    border-color: rgba(255,213,0,0.3);
    box-shadow: 0 0 40px rgba(255,213,0,0.08), var(--shadow-lg);
}

.code-editor { background: #0d0d0d; }
.editor-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 24px;
    background: rgba(8,8,8,0.9);
    border-bottom: 1px solid var(--border-subtle);
}

/* Editor tabs style */
.editor-tabs { display: flex; gap: 6px; }
.editor-tab {
    padding: 5px 14px;
    border-radius: 6px 6px 0 0;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-gold);
    background: rgba(255,213,0,0.06);
    border: 1px solid rgba(255,213,0,0.15);
    border-bottom: none;
    font-weight: 600; letter-spacing: 0.04em;
}

.editor-controls { display: flex; gap: 8px; align-items: center; }
.editor-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}
.editor-dot-red { background: #ff5f57; }
.editor-dot-yellow { background: #ffbd2e; }
.editor-dot-green { background: #28c840; }

.btn-icon {
    background: transparent; border: none;
    color: var(--text-dim); cursor: pointer; padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--t-base);
    display: flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: var(--bg-card); color: var(--accent-gold); transform: rotate(8deg); }

.code-textarea {
    width: 100%; min-height: 380px; padding: 24px;
    background: #0d0d0d; color: #c8c8c8;
    border: none; font-family: var(--font-mono);
    font-size: 0.88rem; line-height: 1.85;
    resize: vertical; outline: none; tab-size: 4;
    transition: background var(--t-base);
}
.code-textarea:focus { background: #111; }
.code-textarea::selection { background: rgba(255,213,0,0.18); }

.playground-controls {
    display: flex; gap: 12px; padding: 16px 24px;
    background: rgba(8,8,8,0.9);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.btn-primary {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 26px;
    background: var(--accent-gold);
    color: #000; border: none;
    border-radius: var(--radius-md);
    font-weight: 800; font-family: var(--font-sans);
    font-size: 0.88rem; cursor: pointer;
    transition: all var(--t-base);
    letter-spacing: 0.04em;
    position: relative; overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}
.btn-primary:hover::after { left: 100%; }
.btn-primary:hover { background: #ffed4e; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,213,0,0.35); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    padding: 10px 24px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.88rem; font-weight: 500;
    cursor: pointer; transition: all var(--t-base);
}
.btn-secondary:hover { border-color: rgba(255,213,0,0.4); color: var(--accent-gold); background: rgba(255,213,0,0.04); }

.output-panel { background: #090909; }
.output-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 24px;
    background: rgba(8,8,8,0.9);
    border-bottom: 1px solid var(--border-subtle);
}
.output-title { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-dim); font-weight: 500; }
.output-status {
    font-size: 0.75rem; font-weight: 700;
    padding: 4px 12px; border-radius: 20px;
    background: rgba(76,175,80,0.12); color: #4CAF50;
    letter-spacing: 0.06em;
}
.output-status.running { background: rgba(255,213,0,0.12); color: var(--accent-gold); }
.output-status.error { background: rgba(244,67,54,0.12); color: #f44336; }
.output-content {
    padding: 24px; min-height: 140px;
    color: var(--text-secondary); font-family: var(--font-mono);
    font-size: 0.85rem; line-height: 1.85;
    white-space: pre-wrap; word-wrap: break-word;
}

/* ===== SYNTAX SHOWCASE ===== */
.syntax-showcase {
    padding: 130px 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
}
.syntax-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem; margin-top: 3rem;
}
.syntax-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); padding: 1.8rem;
    transition: all var(--t-spring); position: relative; overflow: hidden;
    backdrop-filter: blur(10px);
}
.syntax-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0; transition: opacity var(--t-base);
}
.syntax-card:hover { border-color: rgba(255,213,0,0.3); box-shadow: var(--shadow-gold-lg); transform: translateY(-5px); }
.syntax-card:hover::before { opacity: 1; }

.syntax-card h4 {
    color: var(--accent-gold); margin-bottom: 1.2rem;
    font-family: var(--font-display);
    font-size: 0.95rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.syntax-card pre {
    background: rgba(0,0,0,0.6); padding: 1.3rem;
    border-radius: var(--radius-md); overflow-x: auto;
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(5px);
}
.syntax-card code { font-family: var(--font-mono); font-size: 0.82rem; color: #c8c8c8; line-height: 1.85; }

/* ===== CODE BLOCK ===== */
.code-block {
    background: rgba(0,0,0,0.5); padding: 1.5rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg); overflow-x: auto; margin: 2rem 0;
    backdrop-filter: blur(10px);
}
.code-block code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent-gold); line-height: 1.85; }

/* ===== COMMUNITY SECTION ===== */
.community-section { padding: 130px 0; background: var(--bg-primary); }
.community-content {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 80px; align-items: center;
}
.community-text h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.6rem);
    color: var(--accent-gold); margin-bottom: 1.3rem; font-weight: 800;
}
.community-text p { color: var(--text-muted); line-height: 1.95; margin-bottom: 3rem; font-size: 1rem; }
.community-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.stat-box {
    text-align: center; padding: 1.5rem 1rem;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); transition: all var(--t-spring);
    backdrop-filter: blur(10px);
}
.stat-box:hover { border-color: var(--border-gold-hover); transform: translateY(-4px); box-shadow: var(--shadow-gold); }
.stat-number { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--accent-gold); margin-bottom: 0.5rem; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.04em; }

.community-links { display: flex; flex-direction: column; gap: 1rem; }
.community-link {
    display: flex; align-items: center; gap: 1.2rem;
    padding: 1.3rem 1.6rem;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); text-decoration: none;
    transition: all var(--t-spring); color: var(--text-secondary);
    position: relative; overflow: hidden;
    backdrop-filter: blur(10px);
}
.community-link::before {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.06), transparent);
    transition: left 0.6s ease;
}
.community-link:hover {
    border-color: rgba(255,213,0,0.4);
    transform: translateX(8px);
    background: rgba(255,213,0,0.03);
    box-shadow: var(--shadow-gold);
}
.community-link:hover::before { left: 100%; }
[dir="rtl"] .community-link:hover { transform: translateX(-8px); }

.link-icon { font-size: 1.5rem; flex-shrink: 0; }
.link-text { font-weight: 600; font-size: 0.92rem; letter-spacing: 0.02em; }

/* ===== TIMELINE ===== */
.timeline { margin-top: 2rem; position: relative; padding-left: 2.5rem; }
.timeline::before {
    content: '';
    position: absolute; left: 5px; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(to bottom, transparent, var(--accent-gold), transparent);
}

.timeline-item { margin-bottom: 2.8rem; position: relative; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.3rem; top: 0.4rem;
    width: 12px; height: 12px;
    background: var(--accent-gold);
    border-radius: 50%;
    border: 2px solid #000;
    box-shadow: 0 0 0 3px rgba(255,213,0,0.15);
    transition: transform var(--t-spring), box-shadow var(--t-base);
}
.timeline-item:hover::before {
    transform: scale(1.4);
    box-shadow: 0 0 0 6px rgba(255,213,0,0.12), 0 0 20px rgba(255,213,0,0.5);
}

.timeline-date {
    color: var(--accent-purple-light);
    font-family: var(--font-mono);
    font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.12em; margin-bottom: 0.4rem;
    text-transform: uppercase;
}
.timeline-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); padding: 1.5rem;
    transition: all var(--t-spring);
    backdrop-filter: blur(10px);
}
.timeline-item:hover .timeline-content {
    border-color: rgba(255,213,0,0.25);
    transform: translateX(6px);
    box-shadow: var(--shadow-gold);
}
[dir="rtl"] .timeline-item:hover .timeline-content { transform: translateX(-6px); }

.timeline-content h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-primary); }
.timeline-content p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.8; }

/* ===== WRITINGS ===== */
.writings-list { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1.2rem; }
.writing-item {
    text-decoration: none; color: var(--text-primary);
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); padding: 1.8rem;
    transition: all var(--t-spring); display: block;
    position: relative; overflow: hidden;
    backdrop-filter: blur(10px);
}
.writing-item::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0; transition: opacity var(--t-base);
}
.writing-item::after {
    content: '';
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.05), transparent);
    transition: left 0.55s ease;
}
.writing-item:hover { border-color: rgba(255,213,0,0.35); transform: translateX(6px); box-shadow: var(--shadow-gold); background: rgba(255,213,0,0.02); }
.writing-item:hover::before { opacity: 1; }
.writing-item:hover::after { left: 100%; }
[dir="rtl"] .writing-item:hover { transform: translateX(-6px); }

.writing-meta { font-size: 0.72rem; color: var(--text-dim); display: flex; justify-content: space-between; margin-bottom: 0.9rem; letter-spacing: 0.04em; }
.writing-category { color: var(--accent-purple-light); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.writing-item h3 { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; margin-bottom: 0.55rem; color: var(--text-primary); letter-spacing: 0.01em; }
.writing-item p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.75; }
.writing-item code { font-family: var(--font-mono); background: rgba(255,213,0,0.09); padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; color: var(--accent-gold); }

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    padding: 6rem 2rem 2.5rem;
    border-top: 1px solid var(--border-subtle);
    position: relative; overflow: hidden;
}
.footer::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,213,0,0.3), transparent);
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem; max-width: 1200px; margin: 0 auto;
}
.footer-section h4 {
    color: var(--accent-gold); margin-bottom: 1.3rem;
    font-family: var(--font-display);
    font-size: 0.9rem; font-weight: 800;
    letter-spacing: 0.1em; text-transform: uppercase;
}
.footer-section p { color: var(--text-dim); font-size: 0.86rem; line-height: 1.85; }
.footer-section a {
    display: block; text-decoration: none;
    color: var(--text-muted); margin-bottom: 0.8rem;
    font-size: 0.86rem; font-weight: 400;
    transition: color var(--t-base), transform var(--t-fast);
}
.footer-section a:hover { color: var(--accent-gold); transform: translateX(5px); }
[dir="rtl"] .footer-section a:hover { transform: translateX(-5px); }
.footer-bottom {
    margin-top: 4rem; padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.78rem; color: var(--text-dim); text-align: center;
    max-width: 1200px; margin-left: auto; margin-right: auto;
    margin-top: 4rem;
}

/* ===== CINEMATIC SCROLL REVEAL SYSTEM ===== */
/* Base: every reveal element starts hidden and offset, then settles with a
   cinematic ease. Direction is controlled via data-reveal attribute or
   legacy .animate-on-scroll (defaults to fade-up). */
[data-reveal], .animate-on-scroll {
    opacity: 0;
    will-change: opacity, transform, filter;
    transition:
        opacity var(--reveal-duration) var(--ease-cinematic),
        transform var(--reveal-duration) var(--ease-cinematic),
        filter var(--reveal-duration) var(--ease-cinematic);
    filter: blur(6px);
}

/* fade-up (default) */
[data-reveal="up"], .animate-on-scroll {
    transform: translateY(48px);
}

/* fade only — gentle dissolve, no positional shift */
[data-reveal="fade"] {
    transform: translateY(10px);
}

/* slide in from left */
[data-reveal="left"] {
    transform: translateX(-90px);
}

/* slide in from right */
[data-reveal="right"] {
    transform: translateX(90px);
}

/* soft scale-in, used for cards/media */
[data-reveal="scale"] {
    transform: translateY(24px) scale(0.92);
}

/* zoom-out reveal, used for hero-scale moments */
[data-reveal="zoom"] {
    transform: scale(1.06);
}

/* Settled state — applied by IntersectionObserver via JS */
[data-reveal].is-visible,
.animate-on-scroll.visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
    filter: blur(0);
}

/* Stagger helper — applied via inline custom property --reveal-delay
   from JS based on sibling index within a revealed group */
[data-reveal-group] > * {
    transition-delay: calc(var(--reveal-delay, 0) * 1ms);
}

/* ============================================================
   MOBILE CINEMATIC FOCUS ENGINE
   On touch / narrow viewports, scroll becomes a continuous camera:
   the content nearest the viewport center reads as "in focus" —
   sharp, full-opacity, true scale — while everything above and
   below falls away into a soft cine-blur and gentle depth scale.
   Driven by JS (.cine-focus / --cine-progress), re-triggers every
   pass (not just first reveal) for a living, breathing scroll feel.
   ============================================================ */
@media (max-width: 768px) {

    /* tighter, punchier travel distances so nothing scrolls off-canvas */
    [data-reveal="left"] { transform: translateX(-46px); }
    [data-reveal="right"] { transform: translateX(46px); }
    [data-reveal="up"], .animate-on-scroll { transform: translateY(34px); }
    [data-reveal="scale"] { transform: translateY(20px) scale(0.9); }
    [data-reveal], .animate-on-scroll { filter: blur(10px); }
    [data-reveal], .animate-on-scroll {
        transition:
            opacity 0.75s var(--ease-cinematic),
            transform 0.75s var(--ease-cinematic),
            filter 0.75s var(--ease-cinematic);
    }

    /* Elements opted into the continuous focus engine via JS get this
       class instead of / in addition to is-visible. --cine-blur and
       --cine-scale are written directly to the element's inline style
       every animation frame while it's within the tracked range. */
    .cine-tracked {
        will-change: filter, transform, opacity;
        transition: filter 0.18s linear, opacity 0.18s linear, transform 0.18s linear;
        filter: blur(var(--cine-blur, 0px));
        opacity: var(--cine-opacity, 1);
        transform: scale(var(--cine-scale, 1));
    }

    /* The element currently in the focus band gets a subtle glow lift
       so attention is unmistakably drawn there */
    .cine-tracked.cine-active {
        filter: blur(0);
    }
    .reason-card.cine-active,
    .feature-card-extended.cine-active,
    .research-area.cine-active,
    .vision-item.cine-active,
    .gallery-item.cine-active,
    .writing-item.cine-active {
        border-color: var(--border-gold-hover) !important;
        box-shadow: 0 0 0 1px rgba(255,213,0,0.12), 0 18px 50px rgba(255,213,0,0.1), var(--shadow-md);
    }

    /* Cards re-dim as they exit the focus band on either side instead
       of just staying revealed forever — gives the "camera moving
       through a scene" feeling rather than a one-shot checklist reveal */
    .reason-card.cine-tracked,
    .feature-card-extended.cine-tracked,
    .research-area.cine-tracked,
    .vision-item.cine-tracked,
    .gallery-item.cine-tracked,
    .writing-item.cine-tracked,
    .timeline-item.cine-tracked {
        transition: filter 0.22s linear, opacity 0.22s linear, transform 0.22s var(--ease-cinematic);
    }
}

/* Respect data-saver / explicit opt-out without killing the whole effect */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .cine-tracked {
        filter: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Staggered children */
.reason-grid .reason-card:nth-child(1),
.research-areas .research-area:nth-child(1),
.vision-grid .vision-item:nth-child(1) { transition-delay: 0.05s; }
.reason-grid .reason-card:nth-child(2),
.research-areas .research-area:nth-child(2),
.vision-grid .vision-item:nth-child(2) { transition-delay: 0.12s; }
.reason-grid .reason-card:nth-child(3),
.research-areas .research-area:nth-child(3),
.vision-grid .vision-item:nth-child(3) { transition-delay: 0.19s; }
.reason-grid .reason-card:nth-child(4),
.research-areas .research-area:nth-child(4),
.vision-grid .vision-item:nth-child(4) { transition-delay: 0.26s; }

/* ===== RTL SUPPORT ===== */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .nav-desktop { flex-direction: row-reverse; }
[dir="rtl"] .header-container { flex-direction: row-reverse; }
[dir="rtl"] .logo { order: 0; }
[dir="rtl"] .nav-desktop { order: 1; }
[dir="rtl"] .hamburger, [dir="rtl"] .mobile-lang { order: 2; }
[dir="rtl"] .notification-wrapper { order: 3; }
[dir="rtl"] .timeline { padding-left: 0; padding-right: 2.5rem; }
[dir="rtl"] .timeline::before { left: auto; right: 5px; }
[dir="rtl"] .timeline-item::before { left: auto; right: -2.3rem; }
[dir="rtl"] .hero-brand::before { background: linear-gradient(270deg, transparent, rgba(255,213,0,0.4)); }
[dir="rtl"] .hero-brand::after { background: linear-gradient(270deg, rgba(255,213,0,0.4), transparent); }

/* ===== FEATURES DEEP SECTION ===== */
.features-deep { padding: 140px 0; background: var(--bg-secondary); }

/* ===== GRAMMAR EXAMPLE ===== */
.grammar-example { margin: 2rem 0; }

/* ===== INTRO TEXT ===== */
.intro-text { color: var(--text-muted); font-size: 0.96rem; line-height: 1.9; margin-bottom: 0.5rem; }

/* ===== GITHUB LINK ===== */
.github-nav-link { display: flex; align-items: center; }
.github-nav-link:hover svg { stroke: var(--accent-gold); }
.github-nav-link svg { transition: stroke var(--t-base); }

/* ===== PROGRESS BAR ===== */
#scrollProgress {
    position: fixed;
    top: 0; left: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple-light));
    z-index: 9999;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255,213,0,0.6);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    [data-reveal], .animate-on-scroll, .cine-tracked {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero-content { flex-direction: column; text-align: center; align-items: center; }
    .hero-text { max-width: 100%; }
    .hero-description { margin-left: auto; margin-right: auto; }
    .avatar-container { width: 300px; height: 380px; }
    .avatar-core { width: 200px; height: 250px; }
    .avatar-badge-1 { right: -50px; font-size: 0.66rem; }
    .avatar-badge-2 { left: -60px; font-size: 0.66rem; }
    .avatar-badge-3 { display: none; }
    .avatar-orbit-2 { width: 320px; height: 320px; }
    .community-content { grid-template-columns: 1fr; gap: 50px; }
    .hero-brand { justify-content: center; }
}

@media (max-width: 768px) {
    .nav-desktop { display: none; }
    .hamburger { display: flex; }
    .header-container { justify-content: space-between; flex-wrap: nowrap; gap: 0.5rem; }
    .logo { flex-shrink: 0; }
    .mobile-lang { display: inline-block; order: 2; margin-left: auto; }
    .hamburger { order: 3; }
    .notification-wrapper { display: none; }
    .hero-brand { font-size: 0.7rem; }
    .section { padding: 100px 1.5rem; }
    .reason-grid, .feature-grid, .research-areas, .vision-grid,
    .features-grid-extended, .syntax-examples { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr 1fr; }
    .community-stats { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .playground-controls { flex-direction: column; }
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
    .mobile-menu { padding-top: 100px; }
    .avatar-badge { display: none; }
    .avatar-orbit-2 { width: 280px; height: 280px; }
    .dedication-banner { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .hero { padding: 0 1rem; }
    .section { padding: 80px 1rem; }
    .avatar-container { width: 240px; height: 300px; }
    .avatar-core { width: 160px; height: 200px; }
    .avatar-orbit-1, .avatar-orbit-2, .avatar-orbit-3 { display: none; }
    .gallery-grid { grid-template-columns: 1fr; }
    .notification-dropdown { width: 280px; right: -50px; }
    .header-container { padding: 0.8rem 1rem; }
    .hero-title { font-size: clamp(3rem, 15vw, 5rem); }
    .mobile-menu { padding: 90px 1rem 2rem; gap: 0.5rem; }
    .mobile-link { padding: 0.9rem 1.1rem; font-size: 0.86rem; }
    .dedication-content { padding: 2rem 1.4rem 1.7rem; }
}

/* ===== EDITOR HEADER DOTS ===== */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(6,6,6,0.95);
    border-bottom: 1px solid var(--border-subtle);
    gap: 12px;
}
.editor-controls { display: flex; gap: 7px; align-items: center; }
.editor-dot {
    width: 11px; height: 11px;
    border-radius: 50%; cursor: default;
    transition: filter var(--t-base);
}
.editor-dot:hover { filter: brightness(1.3); }
.editor-dot-red    { background: #ff5f57; }
.editor-dot-yellow { background: #ffbd2e; }
.editor-dot-green  { background: #28c840; }

.editor-title {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-dim);
    font-weight: 500;
    letter-spacing: 0.04em;
    flex: 1;
    text-align: center;
}

/* ===== GALLERY ZOOM LIGHTBOX HINT ===== */
.gallery-item img {
    cursor: zoom-in;
}

/* ===== FEATURE DEEP CONTAINER ===== */
.features-deep .container { padding: 0 2rem; }

/* ===== WRITING LINK OVERRIDE ===== */
a.writing-item:hover h3 { color: var(--accent-gold); }

/* ===== SECTION INNER ===== */
.section > .container { position: relative; z-index: 1; }

/* ===== NAV ACTIVE STATE ===== */
.nav-link.active {
    color: var(--accent-gold) !important;
}
