:root {
    color-scheme: dark;
    --black: #050505;
    --black-soft: #090b10;
    --panel: rgba(13, 18, 29, 0.56);
    --panel-strong: rgba(10, 15, 25, 0.78);
    --blue: #0f52ba;
    --blue-light: #3f86ff;
    --line: rgba(110, 157, 230, 0.22);
    --text: #f5f8ff;
    --muted: #a5b3c9;
    --dim: #6f7c91;
    --arabic: "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
    --latin: "Orbitron", "Audiowide", "Eurostile", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 50% 18%, rgba(15, 82, 186, 0.34), transparent 34rem),
        radial-gradient(circle at 12% 28%, rgba(63, 134, 255, 0.12), transparent 24rem),
        linear-gradient(180deg, #06070a 0%, var(--black) 48%, #030303 100%);
    color: var(--text);
    font-family: var(--arabic);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(63, 134, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(63, 134, 255, 0.055) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
    animation: gridDrift 22s linear infinite;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0 42%, rgba(15, 82, 186, 0.12) 48%, transparent 54%),
        radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(63, 134, 255, 0.18), transparent 18rem);
    mix-blend-mode: screen;
}

a {
    color: inherit;
}

#cyber-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.site-shell {
    position: relative;
    width: min(1440px, 100%);
    margin: 0 auto;
}

.nav {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    width: min(1180px, calc(100% - 32px));
    min-height: 66px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(5, 5, 5, 0.7);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    transform: translateX(-50%);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(63, 134, 255, 0.38);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(15, 82, 186, 0.42), rgba(255, 255, 255, 0.04));
    color: #fff;
    text-decoration: none;
    box-shadow: 0 0 36px rgba(15, 82, 186, 0.32);
}

.brand-mark span {
    font: 700 15px/1 var(--latin);
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: clamp(12px, 3vw, 36px);
}

.nav-links a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 180ms ease, text-shadow 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: #fff;
    text-shadow: 0 0 18px rgba(63, 134, 255, 0.9);
}

.language-toggle {
    display: inline-grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 84px;
    height: 42px;
    border: 1px solid rgba(63, 134, 255, 0.34);
    border-radius: 8px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
    font: 700 12px/1 var(--latin);
}

.language-toggle span,
.language-toggle strong {
    display: grid;
    place-items: center;
    height: 34px;
    border-radius: 6px;
    font-weight: 700;
}

html[lang="ar"] .language-toggle span,
html[lang="en"] .language-toggle strong {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 0 24px rgba(15, 82, 186, 0.65);
}

.section {
    position: relative;
    min-height: 100vh;
    padding: 128px clamp(20px, 6vw, 92px);
}

.hero {
    display: grid;
    place-items: center;
    text-align: center;
}

.hero-content {
    display: grid;
    justify-items: center;
    max-width: 980px;
}

.system-line,
.section-kicker {
    margin: 0 0 18px;
    color: var(--blue-light);
    font: 600 12px/1.6 var(--latin);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p,
blockquote {
    margin: 0;
}

h1 {
    font: 800 clamp(64px, 13vw, 172px)/0.9 var(--latin);
    letter-spacing: 0;
    text-shadow: 0 0 22px rgba(63, 134, 255, 0.34), 0 0 72px rgba(15, 82, 186, 0.5);
}

h2 {
    font-size: clamp(36px, 6vw, 78px);
    line-height: 1.05;
    font-weight: 700;
}

html[lang="en"] h2,
html[lang="en"] .nav-links a,
html[lang="en"] .primary-cta {
    font-family: var(--latin);
}

.hero-copy {
    max-width: 840px;
    margin-top: 30px;
    color: #d7e2f4;
    font-size: clamp(19px, 2.2vw, 28px);
    font-weight: 400;
    line-height: 1.9;
}

html[lang="en"] .hero-copy,
html[lang="en"] .section-copy p,
html[lang="en"] blockquote {
    font-family: Arial, sans-serif;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 38px;
}

.primary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 164px;
    min-height: 52px;
    border: 1px solid rgba(105, 162, 255, 0.54);
    border-radius: 8px;
    padding: 0 28px;
    background: linear-gradient(135deg, var(--blue), #08326f);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 18px 48px rgba(15, 82, 186, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-cta:hover,
.primary-cta:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 24px 70px rgba(15, 82, 186, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--muted);
    backdrop-filter: blur(14px);
}

.location-badge b {
    color: #e8eefb;
    font-size: 14px;
}

.location-badge em {
    color: var(--dim);
    font: 500 12px/1 var(--latin);
    font-style: normal;
}

.hero-orbit {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(72vw, 780px);
    aspect-ratio: 1;
    border: 1px solid rgba(63, 134, 255, 0.12);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: rotateSlow 24s linear infinite;
}

.hero-orbit span {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blue-light);
    box-shadow: 0 0 22px rgba(63, 134, 255, 0.95);
}

.hero-orbit span:nth-child(1) {
    top: 8%;
    left: 50%;
}

.hero-orbit span:nth-child(2) {
    right: 11%;
    bottom: 22%;
}

.hero-orbit span:nth-child(3) {
    left: 15%;
    bottom: 18%;
}

.scroll-indicator {
    position: absolute;
    bottom: 28px;
    left: 50%;
    width: 28px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    transform: translateX(-50%);
}

.scroll-indicator span {
    position: absolute;
    top: 9px;
    left: 50%;
    width: 4px;
    height: 8px;
    border-radius: 999px;
    background: var(--blue-light);
    transform: translateX(-50%);
    animation: scrollPulse 1.7s ease-in-out infinite;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.78fr);
    align-items: center;
    gap: clamp(36px, 7vw, 92px);
}

.section-copy p,
.quote-shell blockquote {
    margin-top: 24px;
    color: #d3dced;
    font-size: clamp(19px, 2vw, 27px);
    font-weight: 400;
    line-height: 1.95;
}

.centered {
    max-width: 780px;
    margin: 0 auto 42px;
    text-align: center;
}

.signal-panel,
.quote-shell,
.contact-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.signal-panel {
    min-height: 410px;
    padding: 28px;
}

.signal-panel::before,
.presence-card::before,
.contact-card::before,
.quote-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent, rgba(63, 134, 255, 0.18), transparent);
    opacity: 0;
    transform: translateX(-70%);
    transition: opacity 250ms ease;
}

.signal-panel:hover::before,
.presence-card:hover::before,
.contact-card:hover::before,
.quote-shell:hover::before {
    opacity: 1;
    animation: sheen 1.2s ease;
}

.panel-glow {
    position: absolute;
    right: -90px;
    top: -90px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(15, 82, 186, 0.4);
    filter: blur(50px);
}

.terminal-line {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 18px;
    color: var(--muted);
    direction: ltr;
    font: 600 12px/1.5 var(--latin);
}

pre {
    position: relative;
    z-index: 1;
    margin: 40px 0 0;
    white-space: pre-wrap;
    color: #cfe0ff;
    direction: ltr;
    text-align: left;
    font: 500 clamp(14px, 1.5vw, 18px)/1.9 Consolas, "Courier New", monospace;
}

.data-streams {
    position: absolute;
    inset: auto 24px 24px 24px;
    display: grid;
    gap: 10px;
}

.data-streams i {
    display: block;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue-light), transparent);
    opacity: 0.55;
    animation: stream 2.8s ease-in-out infinite;
}

.data-streams i:nth-child(2) {
    animation-delay: 0.4s;
}

.data-streams i:nth-child(3) {
    animation-delay: 0.8s;
}

.data-streams i:nth-child(4) {
    animation-delay: 1.2s;
}

.philosophy {
    display: grid;
    place-items: center;
    min-height: 84vh;
}

.quote-shell {
    width: min(1080px, 100%);
    padding: clamp(30px, 6vw, 72px);
    text-align: center;
}

.quote-shell blockquote {
    position: relative;
    max-width: 870px;
    margin-inline: auto;
}

.quote-shell blockquote::before,
.quote-shell blockquote::after {
    color: var(--blue-light);
    font: 700 clamp(48px, 8vw, 92px)/0.5 Georgia, serif;
    opacity: 0.6;
}

.quote-shell blockquote::before {
    content: "“";
    margin-inline-end: 10px;
}

.quote-shell blockquote::after {
    content: "”";
    margin-inline-start: 10px;
}

.presence {
    min-height: auto;
}

.presence-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.presence-card {
    position: relative;
    overflow: hidden;
    min-height: 250px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    background:
        linear-gradient(145deg, rgba(15, 82, 186, 0.16), rgba(255, 255, 255, 0.035)),
        rgba(5, 5, 5, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(16px);
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.presence-card:hover {
    border-color: rgba(63, 134, 255, 0.58);
    box-shadow: 0 24px 70px rgba(15, 82, 186, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.09);
    transform: translateY(-6px);
}

.presence-card span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(63, 134, 255, 0.34);
    border-radius: 8px;
    color: var(--blue-light);
    font: 700 12px/1 var(--latin);
}

.presence-card h3 {
    position: absolute;
    inset: auto 24px 24px;
    direction: ltr;
    text-align: left;
    font: 700 clamp(20px, 2vw, 28px)/1.18 var(--latin);
    overflow-wrap: anywhere;
}

.contact {
    display: grid;
    place-items: center;
    min-height: 74vh;
}

.contact-card {
    width: min(780px, 100%);
    padding: clamp(34px, 7vw, 76px);
    text-align: center;
}

.contact-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 520px);
    min-height: 68px;
    margin-top: 34px;
    border: 1px solid rgba(63, 134, 255, 0.48);
    border-radius: 8px;
    background: rgba(15, 82, 186, 0.15);
    color: #fff;
    font: 700 clamp(18px, 4vw, 30px)/1.2 var(--latin);
    text-decoration: none;
    box-shadow: 0 0 42px rgba(15, 82, 186, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow-wrap: anywhere;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 28px 20px 40px;
    color: var(--dim);
    font-size: 13px;
}

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

:focus-visible {
    outline: 2px solid var(--blue-light);
    outline-offset: 4px;
}

@keyframes gridDrift {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 72px 72px;
    }
}

@keyframes rotateSlow {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes scrollPulse {
    0% {
        opacity: 0;
        transform: translate(-50%, 0);
    }
    45% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 18px);
    }
}

@keyframes stream {
    0%,
    100% {
        transform: translateX(-8%);
        opacity: 0.18;
    }
    50% {
        transform: translateX(8%);
        opacity: 0.75;
    }
}

@keyframes sheen {
    to {
        transform: translateX(70%);
    }
}

@media (max-width: 1040px) {
    .split,
    .presence-grid {
        grid-template-columns: 1fr 1fr;
    }

    .split {
        align-items: start;
    }
}

@media (max-width: 760px) {
    .nav {
        top: 10px;
        grid-template-columns: auto auto;
        width: calc(100% - 20px);
    }

    .nav-links {
        grid-column: 1 / -1;
        order: 3;
        justify-content: space-between;
        overflow-x: auto;
        padding: 4px 2px 2px;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .language-toggle {
        justify-self: end;
    }

    .section {
        padding: 146px 20px 84px;
    }

    .hero {
        min-height: 100svh;
    }

    .hero-copy,
    .section-copy p,
    .quote-shell blockquote {
        font-size: 18px;
    }

    .hero-actions,
    .location-badge {
        width: 100%;
    }

    .primary-cta,
    .location-badge {
        justify-content: center;
    }

    .split,
    .presence-grid {
        grid-template-columns: 1fr;
    }

    .signal-panel {
        min-height: 360px;
        padding: 22px;
    }

    .presence-card {
        min-height: 170px;
    }

    .footer {
        display: grid;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
