/* =========================================================
   Manleen Singh — deep space portfolio
   Launch from the pad, make orbit, then explore the system.
   ========================================================= */

:root {
    color-scheme: dark;

    --ink-00: #ffffff;
    --ink-10: #eef1f6;
    --ink-40: #b2bac9;
    --ink-60: #8f99ad;
    --ink-80: #566175;

    --fg: var(--ink-10);
    --fg-soft: var(--ink-40);
    --fg-faint: var(--ink-60);

    --void: #05070f;
    --deep: #080d1c;

    --accent: #8fcaff;
    --accent-deep: #3b86ff;

    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.22);

    --font-display: 'Instrument Serif', 'Times New Roman', Times, serif;
    --font-body: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

    --t-hero: clamp(3.1rem, 12.5vw, 10.4rem);
    --t-h2:   clamp(2.5rem, 7vw, 5.6rem);
    --t-h3:   clamp(1.3rem, 2.4vw, 1.9rem);
    --t-body: clamp(0.95rem, 1.15vw, 1.06rem);
    --t-small: 0.82rem;
    --t-label: 0.66rem;
    --t-micro: 0.60rem;

    --track-label: 0.24em;

    --p: 0;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

    scrollbar-color: #4a5975 #060914;
}

@supports not (scrollbar-color: auto) {
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: #060914; }
    ::-webkit-scrollbar-thumb { background: #4a5975; border-radius: 999px; }
}

* { box-sizing: border-box; }

html {
    scroll-behavior: auto;
    overflow-x: clip;
    accent-color: var(--accent);
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--fg);
    background: var(--void);
    -webkit-font-smoothing: antialiased;
}

#sky-canvas {
    position: fixed;
    inset: 0;
    width: 100%; height: 100%;
    z-index: -2;
    display: block;
    pointer-events: none;
}

#sky-fallback { display: none; }
.no-webgl #sky-canvas { display: none; }
.no-webgl #sky-fallback {
    display: block;
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(80% 55% at 50% 100%, #16224a 0%, transparent 60%),
        radial-gradient(60% 40% at 80% 10%, #1b1740 0%, transparent 70%),
        linear-gradient(180deg, #05070f, #080d1c);
}

.vignette {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(130% 90% at 50% 50%, transparent 32%, rgba(0, 0, 0, 0.5) 100%);
}

::selection { background: var(--accent-deep); color: #fff; }

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

/* Skip link */
.skip-link {
    position: fixed;
    top: 0.6rem; left: 0.6rem;
    z-index: 10002;
    padding: 0.7rem 1.1rem;
    border-radius: 6px;
    background: var(--accent);
    color: #08101f;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transform: translateY(-180%);
    transition: transform 0.25s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* =========================================================
   Preloader launch sequence
   ========================================================= */

.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 clamp(1.2rem, 5vw, 3.5rem) 9vh;
    transition: opacity 0.9s ease;
}
.preloader.done { opacity: 0; }

.pre-inner {
    width: min(560px, 100%);
    text-align: center;
}

.pre-mark {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4.4vw, 2.6rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--ink-00);
    margin: 0 0 1.5rem;
    opacity: 0;
    animation: preIn 1.1s var(--ease-out) 0.25s forwards;
}

.pre-rule {
    position: relative;
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
    overflow: hidden;
}
.pre-rule span {
    position: absolute;
    inset: 0 100% 0 0;
    background: var(--ink-00);
    transition: right 0.35s var(--ease-out);
}

.pre-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 0.85rem;
    font-family: var(--font-mono);
    font-size: var(--t-micro);
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    color: var(--ink-40);
}

.pre-count {
    font-variant-numeric: tabular-nums;
    color: var(--ink-10);
}

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

body.loading { overflow: hidden; height: 100vh; }
body.loading main,
body.loading .site-header,
body.loading .site-footer { opacity: 0; }

main, .site-header, .site-footer { transition: opacity 1.1s ease 0.15s; }

/* =========================================================
   Targeting reticle cursor
   ========================================================= */

.cursor-dot {
    position: fixed;
    top: 0; left: 0;
    z-index: 10001;
    width: 5px; height: 5px;
    margin: -2.5px 0 0 -2.5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(143, 202, 255, 1);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
}

.reticle {
    position: fixed;
    top: 0; left: 0;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
}

.reticle i {
    position: absolute;
    width: 9px; height: 9px;
    border: 1.5px solid var(--accent);
    box-shadow: 0 0 8px rgba(143, 202, 255, 0.85);
    transition: border-color 0.25s;
}
.reticle i:nth-child(1) { top: 0;    left: 0;    border-right: 0; border-bottom: 0; }
.reticle i:nth-child(2) { top: 0;    right: 0;   border-left: 0;  border-bottom: 0; }
.reticle i:nth-child(3) { bottom: 0; right: 0;   border-left: 0;  border-top: 0; }
.reticle i:nth-child(4) { bottom: 0; left: 0;    border-right: 0; border-top: 0; }

.reticle.locked i { border-color: #fff; }

.cursor-on .cursor-dot, .cursor-on .reticle { opacity: 1; }
.cursor-on, .cursor-on a, .cursor-on button { cursor: none; }

/* =========================================================
   Header & Responsive Popover Navbar + Scrollspy
   ========================================================= */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    padding: 1.2rem clamp(1.2rem, 5vw, 3.5rem);
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(5, 7, 15, 0.82), rgba(5, 7, 15, 0));
}

.site-header.is-measuring * {
    transition: none !important;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.nav-inner > * {
    flex-shrink: 0;
    white-space: nowrap;
}

.logo {
    font-family: var(--font-mono);
    font-size: var(--t-label);
    font-weight: 400;
    letter-spacing: var(--track-label);
    text-indent: var(--track-label);
    text-transform: uppercase;
    color: var(--fg);
    text-decoration: none;
    transition: opacity 0.3s;
}
.logo:hover { opacity: 0.65; }

.site-nav {
    display: flex;
    align-items: center;
}

.menu-button {
    anchor-name: --menu-button;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(8, 13, 28, 0.72);
    backdrop-filter: blur(8px);
    color: var(--fg);
    font-family: var(--font-mono);
    font-size: var(--t-micro);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.nav-links {
    position: fixed;
    inset: auto;
    inset-block-start: 4.5rem;
    inset-block-start: anchor(--menu-button bottom);
    inset-inline-end: clamp(1.2rem, 5vw, 3.5rem);
    inline-size: min(80dvw, 18rem);
    max-inline-size: calc(100dvw - 2rem);
    block-size: fit-content;
    max-block-size: calc(100dvh - 6rem);
    margin: 0.5rem 0 0;
    padding: 0.75rem;
    list-style: none;
    overflow: auto;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: rgba(8, 13, 28, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
    scroll-target-group: auto;
}

@supports not selector(:popover-open) {
    .nav-links[popover]:not(.\:popover-open) { display: none; }
}

.nav-links:is(:popover-open, .\:popover-open) {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

@media (prefers-reduced-motion: no-preference) {
    .nav-links {
        opacity: 0;
        translate: 0 -6px;
        transition: opacity 0.2s var(--ease-out), translate 0.2s var(--ease-out), display 0.2s, overlay 0.2s;
        transition-behavior: allow-discrete;
    }
    .nav-links:is(:popover-open, .\:popover-open) {
        opacity: 1;
        translate: 0 0;
    }
    @starting-style {
        .nav-links:is(:popover-open, .\:popover-open) {
            opacity: 0;
            translate: 0 -6px;
        }
    }
}

.nav-links a {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--t-label);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-soft);
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0.6rem;
    transition: color 0.3s;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0.6rem; right: 0.6rem; bottom: 0.2rem;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.45s var(--ease-out);
}

.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-links a:is(:target-current, .target-current) {
    color: var(--accent);
    font-weight: 600;
}
.nav-links a:is(:target-current, .target-current)::after {
    transform: scaleX(1);
    transform-origin: left;
    background: var(--accent);
}

.site-header.is-wide .menu-button { display: none; }
.site-header.is-wide .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(0.8rem, 2.4vw, 2rem);
    inline-size: auto;
    max-inline-size: none;
    block-size: auto;
    max-block-size: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    opacity: 1;
    translate: none;
}
.site-header.is-wide .nav-links::backdrop { display: none; }
.site-header.is-wide .nav-links a { padding: 0.25rem 0; }
.site-header.is-wide .nav-links a::after { left: 0; right: 0; bottom: -2px; }

.motion-toggle {
    min-height: 36px;
    padding: 0.35rem 0.78rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.04);
    color: var(--fg-soft);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.motion-toggle:hover {
    color: #fff;
    border-color: var(--accent);
    background: rgba(143, 202, 255, 0.12);
}

/* Scroll progress rail */
.scroll-rail {
    position: fixed;
    top: 0; left: 0;
    height: 2px; width: 100%;
    z-index: 250;
}
.scroll-rail i {
    display: block;
    height: 100%;
    width: calc(var(--p) * 100%);
    background: linear-gradient(90deg, var(--accent-deep), #fff);
}

@supports (animation-timeline: scroll()) {
    @keyframes railFill {
        from { transform: scaleX(0); }
        to   { transform: scaleX(1); }
    }
    .scroll-rail i {
        width: 100%;
        transform-origin: left center;
        animation: railFill linear both;
        animation-timeline: scroll(root);
    }
}

/* =========================================================
   Sections & reveals
   ========================================================= */

.section {
    position: relative;
    padding: clamp(5rem, 11vh, 8rem) clamp(1.2rem, 5vw, 3.5rem);
    max-width: 1240px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--t-h2);
    font-weight: 400;
    line-height: 0.94;
    letter-spacing: -0.018em;
    margin: 0 0 3rem;
}
.section-title em {
    font-style: italic;
    color: var(--ink-40);
}

.reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    body:not(.motion-paused) .reveal {
        opacity: 0;
        transform: translate3d(0, 42px, -60px);
        transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
    }
    body:not(.motion-paused) .reveal.show {
        opacity: 1;
        transform: none;
    }
    body:not(.motion-paused) .reveal[data-delay="1"] { transition-delay: 0.1s; }
    body:not(.motion-paused) .reveal[data-delay="2"] { transition-delay: 0.2s; }
    body:not(.motion-paused) .reveal[data-delay="3"] { transition-delay: 0.3s; }
}

/* =========================================================
   Hero
   ========================================================= */

.hero-pin { height: 155vh; position: relative; }

.hero-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 clamp(1.2rem, 5vw, 3.5rem);
    perspective: 1200px;
    overflow: clip;
}

.hero-inner {
    transform-style: preserve-3d;
    transform: translateZ(calc(var(--hero-out, 0) * 340px))
               translateY(calc(var(--hero-out, 0) * -50px));
    opacity: calc(1 - var(--hero-out, 0) * 1.2);
    will-change: transform, opacity;
    width: 100%;
    max-width: 1100px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(143, 202, 255, 0.38);
    border-radius: 100px;
    padding: 0.42rem 1rem;
    margin-bottom: 2rem;
    background: rgba(143, 202, 255, 0.06);
    backdrop-filter: blur(6px);
}
.hero-tag i {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 10px #4ade80;
}

@media (prefers-reduced-motion: no-preference) {
    body:not(.motion-paused) .hero-tag i {
        animation: pulseDot 1.8s ease-in-out infinite;
    }
}

.hero-name-wrap {
    position: relative;
    display: block;
}

.hero-name {
    position: relative;
    z-index: 2;
    font-family: var(--font-display);
    font-size: var(--t-hero);
    font-weight: 400;
    line-height: 0.94;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--ink-00);
    text-shadow: 0 0 120px rgba(160, 200, 255, 0.28);
}

.hero-name .ch {
    display: inline-block;
    opacity: 0;
    transform: translate3d(0, 0.5em, -260px) rotateX(-55deg);
    transition: opacity 0.7s ease, transform 1s var(--ease-out);
}
.hero-name.lit .ch { opacity: 1; transform: none; }
.hero-name .sp { display: inline-block; width: 0.28em; }

.name-sat {
    position: absolute;
    left: 0; top: 0;
    width: 46px;
    margin: -23px 0 0 -23px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease 0.6s;
}
.hero-name.lit ~ .name-sat { opacity: 1; }
.name-sat svg { width: 100%; height: auto; display: block; }

.hero-lead {
    font-family: var(--font-mono);
    font-size: clamp(0.66rem, 1.5vw, 0.8rem);
    letter-spacing: 0.32em;
    text-indent: 0.32em;
    text-transform: uppercase;
    color: var(--fg-soft);
    margin: 2.3rem 0 0;
    opacity: 0;
    transition: opacity 1s ease 0.85s;
}
.hero-name-wrap:has(.hero-name.lit) ~ .hero-lead { opacity: 1; }

.scroll-cue {
    position: absolute;
    bottom: 2.4rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--fg-faint);
    opacity: calc(1 - var(--hero-out, 0) * 2);
}
.scroll-cue i {
    display: block;
    width: 1px; height: 44px;
    background: linear-gradient(180deg, currentColor, transparent);
}

@media (prefers-reduced-motion: no-preference) {
    body:not(.motion-paused) .scroll-cue i {
        animation: cueFall 2.1s ease-in-out infinite;
    }
}

@keyframes cueFall {
    0%   { transform: scaleY(0); transform-origin: top; }
    45%  { transform: scaleY(1); transform-origin: top; }
    55%  { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes pulseDot { 50% { opacity: 0.35; transform: scale(0.75); } }

/* =========================================================
   About — porthole & telemetry record
   ========================================================= */

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
}

.porthole-wrap {
    position: relative;
    width: min(360px, 78vw);
    aspect-ratio: 1;
    margin: 0 auto;
    perspective: 900px;
}

.porthole {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform-style: preserve-3d;
    transition: transform 0.6s var(--ease-out);
    padding: 3px;
    background: linear-gradient(150deg,
        rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.06) 38%,
        rgba(255, 255, 255, 0.02) 62%, rgba(143, 202, 255, 0.35));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.10),
        0 40px 90px rgba(2, 6, 18, 0.75),
        0 0 70px rgba(59, 134, 255, 0.14);
}

.porthole-glass {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #060b18;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        inset 0 18px 40px rgba(0, 0, 0, 0.55);
}

.me_pic {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    filter: contrast(1.05) saturate(1.02) brightness(0.98);
}

.porthole-glass::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(142deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.03) 22%, transparent 40%),
        radial-gradient(circle at 50% 46%, transparent 52%, rgba(4, 8, 18, 0.62) 100%);
}

.porthole-arc {
    position: absolute;
    inset: -7.5%;
    width: 115%;
    height: 115%;
    overflow: visible;
    pointer-events: none;
}
.porthole-arc circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.32);
    stroke-width: 0.45;
    stroke-dasharray: 62 240;
    stroke-linecap: round;
    transform-box: fill-box;
    transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
    body:not(.motion-paused) .porthole-arc circle {
        animation: arcSpin 26s linear infinite;
    }
}
@keyframes arcSpin { to { transform: rotate(360deg); } }

.porthole-sweep {
    position: absolute;
    inset: -10%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.07);
    pointer-events: none;
}

.record {
    margin: 0;
    border-top: 1px solid var(--line);
}

.record-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.42fr) auto minmax(0, 1fr);
    gap: 0.9rem;
    align-items: baseline;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    transition: background-color 0.35s, padding-left 0.35s var(--ease-out);
}
.record-row:hover { background: rgba(143, 202, 255, 0.05); padding-left: 0.5rem; }

.record-key {
    font-family: var(--font-mono);
    font-size: var(--t-micro);
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    color: var(--ink-40);
    padding-top: 0.3em;
}

.record-sep {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.75;
}

.record-val {
    font-size: 1rem;
    color: var(--fg);
    letter-spacing: -0.005em;
    word-break: break-word;
}

.social-card {
    display: flex;
    gap: 0.8rem;
    margin-top: 2.2rem;
}

.social-card a {
    position: relative;
    width: 58px; height: 58px;
    display: grid;
    place-items: center;
    color: var(--fg);
    clip-path: polygon(22% 0, 100% 0, 100% 78%, 78% 100%, 0 100%, 0 22%);
    background: linear-gradient(150deg, rgba(143, 202, 255, 0.14), rgba(143, 202, 255, 0.03));
    box-shadow: inset 0 0 0 1px rgba(143, 202, 255, 0.35);
    transition: transform 0.45s var(--ease-out), background 0.35s, box-shadow 0.35s;
    overflow: hidden;
}

.social-card a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.5) 50%, transparent 65%);
    transform: translateX(-130%);
    transition: transform 0.7s var(--ease-out);
}
.social-card a:hover::before { transform: translateX(130%); }

.social-card a svg {
    width: 22px; height: 22px;
    fill: currentColor;
    position: relative;
    z-index: 1;
    transition: transform 0.4s var(--ease-out);
}
.social-card a svg.stroked { fill: none; stroke: currentColor; }

.social-card a:hover {
    transform: translateY(-5px);
    background: linear-gradient(150deg, rgba(59, 134, 255, 0.55), rgba(143, 202, 255, 0.2));
    box-shadow: inset 0 0 0 1px rgba(143, 202, 255, 0.85), 0 0 26px rgba(59, 134, 255, 0.45);
}
.social-card a:hover svg { transform: scale(1.12); }

/* =========================================================
   Projects — planetary system
   ========================================================= */

.system {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem clamp(1.5rem, 4vw, 3rem);
    padding-top: 1rem;
}

.planet-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding-bottom: 205px;
}

.planet-trigger {
    background: none;
    border: 0;
    padding: 0 0 205px;
    font: inherit;
    cursor: pointer;
    appearance: none;
}

.planet-card:nth-child(2) { margin-top: 70px; }
.planet-card:nth-child(3) { margin-top: 0; }
.planet-card:nth-child(4) { margin-top: 24px; }
.planet-card:nth-child(5) { margin-top: 86px; }
.planet-card:nth-child(6) { margin-top: 8px; }

.planet-slot {
    width: var(--size, 150px);
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
}

.no-webgl .planet-slot {
    background:
        radial-gradient(circle at 30% 26%, rgba(255,255,255,.35), transparent 46%),
        radial-gradient(circle at 74% 78%, rgba(0,0,0,.85), transparent 64%),
        var(--fallback, #2b3f6b);
    box-shadow: 0 0 40px var(--glow, rgba(90,166,255,.35));
}

.planet-name {
    margin: 1.4rem 0 0;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #cddffa;
    text-align: center;
    transition: color 0.4s, text-shadow 0.4s;
}
.planet-card:hover .planet-name,
.planet-card:focus-visible .planet-name {
    color: #fff;
    text-shadow: 0 0 20px rgba(143, 202, 255, 0.8);
}

.planet-status {
    display: inline-block;
    margin-top: 0.45rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.54rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid rgba(143, 202, 255, 0.35);
    color: var(--accent);
    background: rgba(143, 202, 255, 0.08);
}
.planet-status.status-dev {
    border-color: rgba(251, 191, 36, 0.55);
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.10);
}
.planet-status.status-test {
    border-color: rgba(56, 189, 248, 0.55);
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.10);
}

.planet-info {
    position: absolute;
    top: calc(var(--size, 150px) + 5rem);
    left: 50%;
    width: min(290px, 84vw);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.planet-drop {
    width: 1px; height: 0;
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
    transition: height 0.36s var(--ease-out);
}
.planet-card:hover .planet-drop,
.planet-card:focus-visible .planet-drop { height: 28px; }

.planet-rule {
    width: 0; height: 1px;
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
    transition: width 0.45s var(--ease-out) 0.22s;
}
.planet-card:hover .planet-rule,
.planet-card:focus-visible .planet-rule { width: 100%; }

.planet-readout {
    margin-top: 0.85rem;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease 0.35s, transform 0.5s var(--ease-out) 0.35s;
}
.planet-card:hover .planet-readout,
.planet-card:focus-visible .planet-readout { opacity: 1; transform: none; }

.planet-desc {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    line-height: 1.65;
    color: #f1f5f9;
    letter-spacing: 0.02em;
}

.planet-cta {
    display: inline-block;
    margin-top: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}
.planet-cta::after { content: " \2192"; }

/* =========================================================
   Research & Builds — Deep Space Network downlink
   ========================================================= */

.dsn {
    border: 1px solid var(--line);
    border-radius: 3px;
    background:
        linear-gradient(180deg, rgba(143, 202, 255, 0.035), transparent 40%),
        rgba(5, 8, 18, 0.58);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    overflow: hidden;
}

.dsn-head {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 2.5vw, 1.6rem);
    padding: 0.95rem clamp(1rem, 2.6vw, 1.7rem);
    border-bottom: 1px solid var(--line);
}

.dsn-tag {
    font-family: var(--font-mono);
    font-size: var(--t-micro);
    font-weight: 700;
    letter-spacing: var(--track-label);
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
}

.dsn-head-rule {
    flex: 1;
    height: 1px;
    background: var(--line);
}

.dsn-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: var(--t-micro);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--fg-faint);
    white-space: nowrap;
}

.dsn-led {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
    body:not(.motion-paused) .dsn-led {
        animation: dsn-blink 2.4s ease-in-out infinite;
    }
}
@keyframes dsn-blink {
    0%, 62%, 100% { opacity: 1; }
    76%           { opacity: 0.18; }
}

.dsn-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(70px, 150px) auto auto;
    align-items: center;
    gap: clamp(0.9rem, 2.6vw, 2rem);
    padding: 1.15rem clamp(1rem, 2.6vw, 1.7rem);
    border-top: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: background-color 0.35s ease;
}
.dsn-row:first-child { border-top: 0; }

.dsn-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: 50% 50%;
    transition: transform 0.4s var(--ease-out);
}
.dsn-row:hover,
.dsn-row:focus-visible { background: rgba(143, 202, 255, 0.05); }
.dsn-row:hover::before,
.dsn-row:focus-visible::before { transform: scaleY(1); }
.dsn-row:focus-visible { outline: none; }

.dsn-id {
    font-family: var(--font-mono);
    font-size: var(--t-micro);
    font-weight: 600;
    letter-spacing: 0.16em;
    color: var(--ink-60);
    transition: color 0.35s ease;
}
.dsn-row:hover .dsn-id,
.dsn-row:focus-visible .dsn-id { color: var(--accent); }

.dsn-body { display: block; min-width: 0; }

.dsn-name {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #cddffa;
    transition: color 0.35s, text-shadow 0.35s;
}
.dsn-row:hover .dsn-name,
.dsn-row:focus-visible .dsn-name {
    color: #fff;
    text-shadow: 0 0 20px rgba(143, 202, 255, 0.7);
}

.dsn-desc {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    font-family: var(--font-body);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--fg-soft);
    transition: grid-template-rows 0.45s var(--ease-out), opacity 0.3s ease;
}
.dsn-desc > span {
    min-height: 0;
    overflow: hidden;
    padding-top: 0.5rem;
}
.dsn-row:hover .dsn-desc,
.dsn-row:focus-visible .dsn-desc {
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows 0.5s var(--ease-out), opacity 0.45s ease 0.1s;
}

.dsn-wave {
    display: block;
    height: 22px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.dsn-wave svg {
    display: block;
    width: 200%;
    height: 100%;
}
@media (prefers-reduced-motion: no-preference) {
    body:not(.motion-paused) .dsn-wave svg {
        animation: dsn-scroll 3.4s linear infinite;
    }
    body:not(.motion-paused) .dsn-row:hover .dsn-wave svg,
    body:not(.motion-paused) .dsn-row:focus-visible .dsn-wave svg {
        animation-duration: 1.3s;
    }
}
.dsn-wave polyline {
    fill: none;
    stroke: var(--ink-80);
    stroke-width: 1.4;
    vector-effect: non-scaling-stroke;
    transition: stroke 0.35s ease;
}
.dsn-row:hover .dsn-wave polyline,
.dsn-row:focus-visible .dsn-wave polyline { stroke: var(--accent); }

@keyframes dsn-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.dsn-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.42rem;
}

.dsn-sig {
    width: 58px;
    height: 8px;
    background: repeating-linear-gradient(90deg, var(--line-strong) 0 4px, transparent 4px 7px);
}
.dsn-sig i {
    display: block;
    height: 100%;
    width: var(--sig, 70%);
    background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 7px);
    opacity: 0.65;
    transition: opacity 0.35s ease, filter 0.35s ease;
}
.dsn-row:hover .dsn-sig i,
.dsn-row:focus-visible .dsn-sig i {
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(143, 202, 255, 0.8));
}

.dsn-fmt {
    font-family: var(--font-mono);
    font-size: var(--t-micro);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg-faint);
    white-space: nowrap;
}

.dsn-cta {
    font-family: var(--font-mono);
    font-size: var(--t-micro);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
}
.dsn-cta i {
    font-style: normal;
    display: inline-block;
    transition: transform 0.45s var(--ease-out);
}
.dsn-row:hover .dsn-cta,
.dsn-row:focus-visible .dsn-cta { opacity: 1; transform: none; }
.dsn-row:hover .dsn-cta i,
.dsn-row:focus-visible .dsn-cta i { transform: translateX(4px); }

@media (hover: none) {
    .dsn-desc { display: block; opacity: 1; }
    .dsn-desc > span { display: block; overflow: visible; }
    .dsn-cta { opacity: 1; transform: none; }
}

/* =========================================================
   Milestones — swipeable constellations
   ========================================================= */

.const-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 4vw, 2.6rem);
    margin-top: 1.4rem;
}

.const-title { text-align: center; min-width: 12ch; }

.const-name {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--ink-00);
    margin: 0;
    text-shadow: 0 0 40px rgba(180, 214, 255, 0.4);
}

.const-sub {
    font-family: var(--font-mono);
    font-size: var(--t-micro);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--fg-faint);
    margin: 0.35rem 0 0;
}

.const-arrow {
    flex: none;
    width: 42px; height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    color: var(--ink-10);
    font-size: 0.95rem;
    transition: background-color 0.3s, border-color 0.3s, transform 0.3s var(--ease-out);
}
.const-arrow:hover {
    background: rgba(59, 134, 255, 0.35);
    border-color: var(--accent);
    transform: scale(1.08);
}

.const-dots {
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    margin-top: 0.9rem;
}

.const-dots button {
    width: 32px; height: 32px;
    padding: 0;
    border: 0;
    background: none;
    display: grid;
    place-items: center;
}
.const-dots button::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(233, 241, 255, 0.32);
    transition: background-color 0.3s, transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.const-dots button[aria-current="true"]::before {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    transform: scale(1.5);
}

.const-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 560px;
    touch-action: pan-y;
    cursor: grab;
    overflow: clip;
}
.const-stage:active { cursor: grabbing; }

.const-figure {
    position: absolute;
    left: 0; top: 0;
    pointer-events: none;
    opacity: 0.22;
    transition: opacity 0.4s ease;
}
.const-figure svg {
    width: 100%;
    height: 100%;
    display: block;
}

.const-svg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}
.const-line {
    fill: none;
    stroke: rgba(143, 202, 255, 0.48);
    stroke-width: 1;
    stroke-linecap: round;
}
.const-tie {
    stroke: rgba(233, 241, 255, 0.45);
    stroke-width: 1;
    stroke-dasharray: 2 3;
    transition: opacity 0.3s;
}

.const-minor-star {
    fill: rgba(214, 232, 255, 0.75);
    filter: drop-shadow(0 0 4px rgba(143, 202, 255, 0.9));
}

.star {
    position: absolute;
    left: 0; top: 0;
    width: 0; height: 0;
}

.star-hit {
    position: absolute;
    left: -22px; top: -22px;
    width: 44px; height: 44px;
    padding: 0; border: 0;
    background: none;
    border-radius: 50%;
}

.star-dot {
    position: absolute;
    left: -5px; top: -5px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(143, 202, 255, 0.9), 0 0 24px rgba(143, 202, 255, 0.5);
    transition: transform 0.4s var(--ease-out);
    pointer-events: none;
}

.star-dot::before, .star-dot::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    opacity: 0;
    color: rgba(200, 226, 255, 0.9);
    transition: opacity 0.45s;
}
.star-dot::before {
    width: 1px; height: 40px;
    margin: -20px 0 0 -0.5px;
    background: linear-gradient(transparent, currentColor, transparent);
}
.star-dot::after {
    width: 40px; height: 1px;
    margin: -0.5px 0 0 -20px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
}

.star.on .star-dot { transform: scale(1.5); }
.star.on .star-dot::before, .star.on .star-dot::after { opacity: 1; }

.star-label {
    position: absolute;
    left: 0; top: 0;
    width: max-content;
    max-width: 21ch;
    transform: translate(var(--lx, 16px), var(--ly, -1.5em));
    pointer-events: none;
}
.star[data-side="right"] .star-label { text-align: left; }
.star[data-side="left"]  .star-label { text-align: right; }

.star-org {
    display: block;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--fg);
    letter-spacing: -0.01em;
    line-height: 1.25;
    transition: color 0.35s;
}
.star-role {
    display: block;
    font-size: 0.7rem;
    color: var(--fg-soft);
    line-height: 1.35;
    margin-top: 0.15rem;
}
.star-when {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-faint);
    margin-top: 0.25rem;
}
.star.on .star-org { color: #fff; text-shadow: 0 0 18px rgba(143, 202, 255, 0.8); }

/* =========================================================
   Skills — interactive Fibonacci tag sphere
   ========================================================= */

#skills { padding-top: clamp(3.5rem, 7vh, 5.5rem); padding-bottom: clamp(3rem, 6vh, 4.5rem); }

.skills-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: -1.5rem 0 2.6rem;
}

.skills-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.5rem 1.05rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.78);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}
.skills-filter:hover { border-color: rgba(143, 202, 255, 0.65); color: #fff; }
.skills-filter.active { background: var(--accent); border-color: var(--accent); color: #0b1020; font-weight: 600; }

.filter-dot { width: 7px; height: 7px; border-radius: 50%; display: block; }
.filter-dot[data-cat="ai"]        { background: #b39dff; }
.filter-dot[data-cat="data"]      { background: #fde047; }
.filter-dot[data-cat="robotics"]  { background: #6ee7d5; }
.filter-dot[data-cat="webcloud"]  { background: #ffc98f; }

.cloud-stage {
    position: relative;
    width: 100%;
    height: min(500px, 52vh);
    cursor: grab;
    overflow: clip;
}
.cloud-stage:active { cursor: grabbing; }

.cloud-sphere { position: absolute; inset: 0; }

.cloud-tag {
    position: absolute;
    left: 0; top: 0;
    white-space: nowrap;
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: -0.01em;
    will-change: transform, opacity;
    transition: color 0.4s;
    user-select: none;
    pointer-events: none;
}

.cloud-tag[data-cat="ai"]        { color: #b39dff; }
.cloud-tag[data-cat="data"]      { color: #fde047; }
.cloud-tag[data-cat="robotics"]  { color: #6ee7d5; }
.cloud-tag[data-cat="webcloud"]  { color: #ffc98f; }

.cloud-tag.dim { opacity: 0.14 !important; }
.cloud-tag.match { text-shadow: 0 0 22px currentColor; }

.cloud-stage.flat { height: auto; overflow: visible; cursor: default; }
.cloud-stage.flat .cloud-sphere {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem 1rem;
}
.cloud-stage.flat .cloud-tag {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    white-space: normal;
}
.cloud-stage.flat .cloud-tag.dim { opacity: 0.18 !important; }
.cloud-stage.flat + .cloud-hint { display: none; }

.cloud-hint {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--fg-faint);
    margin-top: 1rem;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
    position: relative;
    padding: 5rem clamp(1.2rem, 5vw, 3.5rem) 3rem;
    text-align: center;
}

.footer-meta {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-faint);
    margin: 0;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1040px) {
    .system { grid-template-columns: repeat(2, 1fr); }
    .planet-card:nth-child(odd)  { margin-top: 0; }
    .planet-card:nth-child(even) { margin-top: 70px; }

    .dsn-wave { display: none; }
    .dsn-row  { grid-template-columns: auto minmax(0, 1fr) auto auto; }
}

@media (max-width: 700px) {
    .dsn-head { flex-wrap: wrap; gap: 0.6rem 1rem; }
    .dsn-head-rule { display: none; }

    .dsn-row {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        gap: 0.6rem 0.9rem;
    }
    .dsn-id { padding-top: 0.12rem; }

    .dsn-meta {
        grid-column: 2;
        flex-direction: row;
        align-items: center;
        gap: 0.7rem;
    }
    .dsn-cta { grid-column: 2; justify-self: start; }
}

@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .social-card { justify-content: center; }
    .const-stage { aspect-ratio: 4 / 3; }
}

@media (max-width: 760px) {
    .hero-pin { height: 150vh; }

    .system { grid-template-columns: 1fr; gap: 2.5rem; }
    .planet-card { margin-top: 0 !important; padding-bottom: 185px; }

    .planet-slot { width: min(var(--size, 150px), 38vw); }
    .planet-info { top: calc(min(var(--size, 150px), 38vw) + 4.8rem); }

    .const-stage { aspect-ratio: 5 / 7; }
    .star-label { max-width: 14ch; }
    .star-org  { font-size: 0.72rem; line-height: 1.2; }
    .star-role { font-size: 0.58rem; line-height: 1.25; margin-top: 0.1rem; }
    .star-when { font-size: 0.48rem; margin-top: 0.14rem; }

    .record-row { grid-template-columns: 1fr; gap: 0.2rem; }
    .record-sep { display: none; }

    .cloud-stage { height: 380px; }
}

@media (max-width: 560px) {
    .hero-tag { font-size: 0.54rem; letter-spacing: 0.16em; }
    .name-sat { width: 32px; margin: -16px 0 0 -16px; }
}

@media (hover: none) {
    .cursor-dot, .reticle { display: none; }
    .planet-drop { height: 28px; }
    .planet-rule { width: 100%; }
    .planet-readout { opacity: 1; transform: none; }
    .planet-name { color: #fff; }
}

/* =========================================================
   Accessibility: Reduced motion & Forced colors
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
    .hero-name .ch { opacity: 1; transform: none; }
    .hero-lead { opacity: 1; }
    .hero-pin { height: auto; }
    .hero-stage { position: relative; height: auto; min-height: 82vh; }
    .hero-inner { transform: none; opacity: 1; }
    .scroll-cue { display: none; }
    .preloader { display: none; }
    body.loading { overflow: auto; height: auto; }
    body.loading main,
    body.loading .site-header,
    body.loading .site-footer { opacity: 1; }
}

body.motion-paused .hero-inner { transform: none; opacity: 1; }
body.motion-paused .reveal { opacity: 1; transform: none; }

@media (forced-colors: active) {
    .site-header {
        background: Canvas;
        border-bottom: 1px solid CanvasText;
    }
    .nav-links {
        background: Canvas;
        border-color: CanvasText;
    }
    .nav-links a:is(:target-current, .target-current) {
        color: Highlight;
        outline: 1px solid Highlight;
    }
    .dsn, .skills-filter, .const-arrow, .motion-toggle, .menu-button {
        border: 1px solid CanvasText;
    }
    .skills-filter.active {
        background: Highlight;
        color: HighlightText;
        border-color: Highlight;
    }
    .const-dots button[aria-current="true"]::before {
        background: Highlight;
        border: 1px solid Highlight;
    }
    .social-card a {
        border: 1px solid LinkText;
        clip-path: none;
    }
    .status-dialog {
        background: Canvas;
        color: CanvasText;
        border: 2px solid CanvasText;
    }
    .dialog-close {
        border: 1px solid ButtonText;
    }
}

/* =========================================================
   Project Status Templates (Native Modal Dialogs)
   ========================================================= */

.status-dialog {
    margin: auto;
    padding: 0;
    width: min(560px, calc(100dvw - 2rem));
    max-height: calc(100dvh - 2.5rem);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(143, 202, 255, 0.12), transparent 60%),
        rgba(7, 11, 24, 0.94);
    color: var(--fg);
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(255, 255, 255, 0.06);
    opacity: 0;
    transition-property: opacity, transform, display, overlay;
    transition-duration: 0.32s;
    transition-timing-function: var(--ease-out);
    transition-behavior: allow-discrete;
}

@media (prefers-reduced-motion: no-preference) {
    .status-dialog {
        transform: scale(0.94) translateY(12px);
    }
}

.status-dialog:modal {
    overscroll-behavior: contain;
}

.status-dialog::backdrop {
    overflow: hidden;
    overscroll-behavior: contain;
    background-color: rgba(3, 5, 12, 0);
    backdrop-filter: blur(0px);
    transition-property: background-color, backdrop-filter, display, overlay;
    transition-duration: 0.32s;
    transition-timing-function: ease-out;
    transition-behavior: allow-discrete;
}

.status-dialog[open]:where(:not([data-closing])) {
    display: block;
    opacity: 1;
    @starting-style {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .status-dialog[open]:where(:not([data-closing])) {
        transform: scale(1) translateY(0);
        @starting-style {
            transform: scale(0.94) translateY(12px);
        }
    }
}

.status-dialog[open]:where(:not([data-closing]))::backdrop {
    background-color: rgba(3, 5, 12, 0.76);
    backdrop-filter: blur(8px);
    @starting-style {
        background-color: rgba(3, 5, 12, 0);
        backdrop-filter: blur(0px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .status-dialog,
    .status-dialog::backdrop {
        transition-duration: 0.1s;
    }
}

.status-dialog-dev {
    border-color: rgba(251, 191, 36, 0.38);
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(251, 191, 36, 0.12), transparent 60%),
        rgba(7, 11, 24, 0.95);
}

.status-dialog-test {
    border-color: rgba(56, 189, 248, 0.38);
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(56, 189, 248, 0.12), transparent 60%),
        rgba(7, 11, 24, 0.95);
}

.dialog-shell {
    padding: clamp(1.4rem, 4vw, 2.2rem);
}

.dialog-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.dialog-code {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fg-soft);
}

.dialog-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}
.status-dialog-dev .dialog-dot { background: #fbbf24; box-shadow: 0 0 10px #fbbf24; }
.status-dialog-test .dialog-dot { background: #38bdf8; box-shadow: 0 0 10px #38bdf8; }

@media (prefers-reduced-motion: no-preference) {
    body:not(.motion-paused) .dialog-dot {
        animation: pulseDot 1.8s ease-in-out infinite;
    }
}

.dialog-badge {
    padding: 0.26rem 0.7rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.badge-dev {
    border: 1px solid rgba(251, 191, 36, 0.55);
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.12);
}
.badge-test {
    border: 1px solid rgba(56, 189, 248, 0.55);
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.12);
}

.dialog-title {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5vw, 3rem);
    font-weight: 400;
    line-height: 1;
    margin: 1.2rem 0 0.45rem;
    color: var(--ink-00);
}

.dialog-sub {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 0.9rem;
}
.status-dialog-dev .dialog-sub { color: #fcd34d; }
.status-dialog-test .dialog-sub { color: #7dd3fc; }

.dialog-copy {
    margin: 0 0 1.4rem;
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--fg-soft);
}

.dialog-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    margin-bottom: 1.3rem;
}

.dialog-panel-head {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fg-faint);
}

.dialog-stages {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dialog-stages li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.72rem 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
}
.dialog-stages li:first-child { border-top: 0; }

.stage-name { color: var(--ink-10); }

.stage-state {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
}
.state-ok   { color: #4ade80; }
.state-work { color: #fcd34d; }
.status-dialog-test .state-work { color: #7dd3fc; }
.state-next { color: var(--fg-faint); }

.dialog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}
.dialog-tags span {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    color: var(--fg-soft);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
}

.dialog-close {
    min-height: 42px;
    padding: 0.55rem 1.35rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink-00);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.25s, border-color 0.25s, transform 0.25s var(--ease-out);
}
.dialog-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #08101f;
}


