:root {
    color-scheme: dark;
    --bg-deep: #05040f;
    --bg-mid: #0b0822;
    --c-1: #4deaff;
    --c-2: #9d6eff;
    --c-3: #ff5ec4;
    --c-4: #ffcb6b;
    --aurora-1: #732dff;
    --aurora-2: #00d2f0;
    --aurora-3: #ff3ca8;
    font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-deep);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-width: 320px;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--bg-deep);
}

.intro {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    isolation: isolate;
    perspective: 1100px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    cursor: default;
    background:
        radial-gradient(ellipse 70% 55% at 50% 48%, rgba(44, 26, 102, 0.52), transparent 70%),
        radial-gradient(ellipse 90% 60% at 50% 105%, rgba(12, 26, 68, 0.72), transparent 65%),
        radial-gradient(circle at 50% 50%, var(--bg-mid) 0%, var(--bg-deep) 78%);
}

/* Subtle atmospheric vignette & cosmic horizon rings */
.intro::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    content: '';
    background:
        radial-gradient(circle at 50% 50%, transparent 45%, rgba(3, 2, 10, 0.72) 100%);
}

/* Volumetric Drifting Auroras */
.aurora-stage {
    position: absolute;
    inset: -15%;
    z-index: 0;
    pointer-events: none;
    filter: blur(80px) saturate(135%);
    will-change: transform;
}

.aurora {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    will-change: transform, opacity;
}

.aurora--one {
    top: -12%;
    left: -6%;
    width: max(52vw, 420px);
    height: max(42vw, 340px);
    background: radial-gradient(circle at 40% 40%, var(--aurora-1), rgba(115, 45, 255, 0) 72%);
    opacity: 0.5;
}

.aurora--two {
    right: -8%;
    bottom: -14%;
    width: max(54vw, 440px);
    height: max(44vw, 360px);
    background: radial-gradient(circle at 60% 60%, var(--aurora-2), rgba(0, 210, 240, 0) 72%);
    opacity: 0.44;
}

.aurora--three {
    top: 18%;
    right: 12%;
    width: max(38vw, 320px);
    height: max(32vw, 280px);
    background: radial-gradient(circle at 50% 50%, var(--aurora-3), rgba(255, 60, 168, 0) 70%);
    opacity: 0.3;
}

.aurora--core {
    top: 50%;
    left: 50%;
    width: min(68vw, 760px);
    height: min(36vw, 380px);
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at 50% 50%, rgba(128, 90, 255, 0.48), rgba(64, 218, 255, 0.18) 48%, transparent 75%);
    opacity: 0.62;
}

/* Interactive Ambient Pointer Halo */
.pointer-glow {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 460px;
    height: 460px;
    margin-top: -230px;
    margin-left: -230px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(104, 224, 255, 0.15) 0%,
        rgba(168, 108, 255, 0.09) 36%,
        rgba(255, 94, 196, 0.04) 58%,
        transparent 74%
    );
    mix-blend-mode: screen;
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
}

/* Interactive Stardust & Particle Canvas */
.stardust {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* 3D Gyroscopic Orbits */
.orbit-stage {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    perspective: 1600px;
    pointer-events: none;
}

.orbit-plane {
    position: absolute;
    top: 50%;
    left: 50%;
    aspect-ratio: 1;
}

.orbit-plane--outer {
    width: min(76vw, 790px);
}

.orbit-plane--mid {
    width: min(62vw, 640px);
}

.orbit-plane--inner {
    width: min(46vw, 480px);
}

.orbit-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.orbit-track {
    fill: none;
    stroke: rgba(168, 152, 255, 0.16);
    stroke-width: 1.1;
}

.orbit-track--dashed {
    stroke: rgba(255, 112, 198, 0.2);
    stroke-dasharray: 5 11;
}

.orbit-comet-glow {
    fill: none;
    stroke-width: 4.6;
    stroke-linecap: round;
    stroke-dasharray: 340 1500;
    opacity: 0.22;
}

.orbit-comet-glow--mid {
    stroke-width: 4.2;
    stroke-dasharray: 260 1580;
}

.orbit-comet-glow--inner {
    stroke-width: 3.8;
    stroke-dasharray: 210 1620;
}

.orbit-comet {
    fill: none;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-dasharray: 340 1500;
}

.orbit-comet--mid {
    stroke-width: 1.75;
    stroke-dasharray: 260 1580;
}

.orbit-comet--inner {
    stroke-width: 1.65;
    stroke-dasharray: 210 1620;
}

/* 3D Parametric Orbiting Lights */
.orbiter {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    margin-left: -7px;
    pointer-events: none;
    mix-blend-mode: screen;
    will-change: transform, opacity;
}

.orbiter__core {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
}

.orbiter__core::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 2px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, currentColor, #fff, currentColor, transparent);
    opacity: 0.85;
    content: '';
}

.orbiter--one {
    color: #4deaff;
}

.orbiter--one .orbiter__core {
    box-shadow:
        0 0 12px 3px #fff,
        0 0 26px 8px rgba(77, 234, 255, 0.85),
        0 0 54px 16px rgba(77, 234, 255, 0.35);
}

.orbiter--two {
    width: 11px;
    height: 11px;
    margin-top: -5.5px;
    margin-left: -5.5px;
    color: #ff62c6;
}

.orbiter--two .orbiter__core {
    box-shadow:
        0 0 10px 2px #fff,
        0 0 24px 7px rgba(255, 98, 198, 0.85),
        0 0 48px 14px rgba(255, 98, 198, 0.35);
}

.orbiter--three {
    width: 9px;
    height: 9px;
    margin-top: -4.5px;
    margin-left: -4.5px;
    color: #ffcf70;
}

.orbiter--three .orbiter__core {
    box-shadow:
        0 0 9px 2px #fff,
        0 0 20px 6px rgba(255, 207, 112, 0.85),
        0 0 42px 12px rgba(166, 117, 255, 0.4);
}

/* Expanding Iridescent Shockwaves & Anamorphic Light Sweep */
.shockwave {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: min(44vw, 420px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1.5px solid rgba(124, 232, 255, 0.65);
    box-shadow:
        0 0 28px rgba(102, 224, 255, 0.38),
        inset 0 0 28px rgba(255, 98, 198, 0.28);
    transform: translate(-50%, -50%) scale(0.15);
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

.shockwave--two {
    border-color: rgba(255, 110, 205, 0.6);
    box-shadow:
        0 0 32px rgba(178, 116, 255, 0.42),
        inset 0 0 24px rgba(82, 235, 255, 0.25);
}

.light-sweep {
    position: absolute;
    top: -20%;
    bottom: -20%;
    left: -25%;
    z-index: 7;
    width: 18vw;
    min-width: 120px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(120, 232, 255, 0.08) 28%,
        rgba(255, 255, 255, 0.34) 50%,
        rgba(255, 116, 208, 0.1) 72%,
        transparent 100%
    );
    transform: skewX(-22deg);
    filter: blur(10px);
    mix-blend-mode: screen;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Floating 4-Point Diamond Sparkles */
.sparkles {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.spark {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
    filter: drop-shadow(0 0 8px currentColor);
    opacity: 0;
    will-change: transform, opacity;
}

.spark--1 { top: 23%; left: 19%; color: #58ebff; width: 16px; height: 16px; }
.spark--2 { top: 26%; right: 21%; color: #ff7ad1; width: 13px; height: 13px; }
.spark--3 { bottom: 24%; right: 18%; color: #b58cff; width: 17px; height: 17px; }
.spark--4 { bottom: 26%; left: 21%; color: #ffd175; width: 14px; height: 14px; }
.spark--5 { top: 16%; left: 48%; color: #79f0ff; width: 11px; height: 11px; }
.spark--6 { bottom: 17%; left: 52%; color: #ff8cdb; width: 12px; height: 12px; }
.spark--7 { top: 48%; left: 11%; color: #a78bfa; width: 10px; height: 10px; }
.spark--8 { top: 46%; right: 11%; color: #67e8f9; width: 11px; height: 11px; }

/* Hero Name Typography */
.name {
    position: relative;
    z-index: 6;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 0.26em;
    width: 100%;
    max-width: 96vw;
    margin: 0;
    padding: 0.25em 0.3em;
    font-size: clamp(2.8rem, 8.8vw, 8.5rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.06;
    text-align: center;
    will-change: transform;
}

.name__word {
    position: relative;
    display: inline-flex;
    white-space: nowrap;
    perspective: 900px;
}

.name__word--last {
    --flow-x: 0em;
}

.char {
    position: relative;
    display: inline-block;
    transform-origin: 50% 78%;
    will-change: transform, opacity;
}

.char__ambient {
    display: inline-block;
    perspective: 600px;
    will-change: transform;
}

.char__glyph {
    --glint: 0;
    --hover-glint: 0;
    position: relative;
    display: inline-block;
    padding: 0.08em 0.045em;
    margin: -0.08em -0.045em;
    transform-origin: 50% 60%;
    will-change: transform;
}

/* Luminous Pearl Styling for "Ali" */
.name__word--first .char__glyph {
    background-image: linear-gradient(180deg, #ffffff 18%, #e4f7ff 68%, #d7c8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 18px rgba(138, 112, 255, 0.38));
}

/* Seamless World-Space Flowing Prismatic Gradient for "Khoshsirat" */
.name__word--last .char__glyph {
    background-image: linear-gradient(
        90deg,
        var(--c-1) 0%,
        var(--c-2) 25%,
        var(--c-3) 50%,
        var(--c-4) 75%,
        var(--c-1) 100%
    );
    background-size: 11em 100%;
    background-repeat: repeat-x;
    background-position: calc(var(--flow-x, 0em) - var(--char-x, 0px)) 50%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 18px rgba(114, 198, 255, 0.3));
}

/* Per-Glyph Specular Flash & Shimmer Layer */
.char__glyph::after {
    position: absolute;
    inset: 0;
    padding: 0.08em 0.045em;
    content: attr(data-char);
    background-image: linear-gradient(135deg, #ffffff 0%, #9df3ff 45%, #ffc4ee 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.85));
    opacity: min(1, calc(var(--glint) + var(--hover-glint)));
    pointer-events: none;
}

/* Tablet & Mobile Portrait Layout */
@media (max-width: 680px) {
    .name {
        flex-direction: column;
        align-items: center;
        gap: 0.02em;
        font-size: clamp(2.35rem, 14.2vw, 4.4rem);
        letter-spacing: -0.03em;
    }

    .name__word--first {
        font-size: 0.92em;
    }

    .orbit-plane--outer {
        width: 126vw;
    }

    .orbit-plane--mid {
        width: 102vw;
    }

    .orbit-plane--inner {
        width: 78vw;
    }

    .pointer-glow {
        width: 320px;
        height: 320px;
        margin-top: -160px;
        margin-left: -160px;
    }
}

/* Compact Landscape Mobile Layout */
@media (max-height: 480px) and (orientation: landscape) {
    .name {
        flex-direction: row;
        gap: 0.24em;
        font-size: clamp(2.2rem, 7.8vw, 4.2rem);
    }

    .orbit-plane--outer {
        width: min(76vw, 560px);
    }

    .orbit-plane--mid {
        width: min(60vw, 440px);
    }

    .orbit-plane--inner {
        width: min(44vw, 330px);
    }
}
