:root {
    color-scheme: dark;
    --bg: #030510;
    --bg-deep: #06091a;
    --panel: rgba(9, 15, 36, 0.64);
    --panel-strong: rgba(10, 18, 45, 0.88);
    --line: rgba(156, 201, 255, 0.22);
    --text: #f7fbff;
    --muted: #9fb0c8;
    --blue: #2f8fff;
    --cyan: #8ee9ff;
    --focus: #94ddff;
    --shadow: 0 24px 90px rgba(0, 0, 0, 0.44);
    --discord-top-gradient:
        radial-gradient(
            circle at 22% 10%,
            rgba(255, 255, 255, 0.18),
            transparent 32%
        ),
        linear-gradient(180deg, #001a7a 0%, #00126c 64%, #5f6066 100%);
    --discord-avatar-ring-color: #0b1350;
    --font-display: "Space Grotesk", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(
            circle at 50% -20%,
            rgba(44, 91, 167, 0.35),
            transparent 34rem
        ),
        linear-gradient(180deg, #02030a 0%, #050918 42%, #030510 100%);
    color: var(--text);
    font-family: var(--font-display);
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body.is-loading {
    overflow: hidden;
}

body.is-loading main,
body.is-loading .sky {
    opacity: 0;
}

body.is-loading main *,
body.is-loading main *::before,
body.is-loading main *::after,
body.is-loading .sky *,
body.is-loading .sky *::before,
body.is-loading .sky *::after {
    animation-play-state: paused !important;
}

body.modal-open {
    overflow: hidden;
}

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1rem;
    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(0, 47, 249, 0.18),
            transparent 20rem
        ),
        #030510;
    color: #f2f3f5;
    opacity: 1;
    transition:
        opacity 280ms ease,
        visibility 280ms ease;
    visibility: visible;
}

.loading-screen.is-hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.loading-mark {
    width: 2.8rem;
    height: 2.8rem;
    border: 0.28rem solid rgba(242, 243, 245, 0.18);
    border-top-color: #8ee9ff;
    border-radius: 50%;
    animation: loading-spin 820ms linear infinite;
}

.loading-screen p {
    margin: 0;
    color: #b5bac1;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

.sky {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: -2;
    overflow: hidden;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.05),
        rgba(2, 5, 17, 0.8)
    );
}

body.stars-only {
    min-height: 100svh;
    overflow: hidden;
}

body.stars-only main,
body.stars-only .loading-screen {
    display: none !important;
}

body.stars-only .sky {
    z-index: 0;
}

.star-layer {
    position: absolute;
    inset: -8rem 0;
}

.star {
    position: absolute;
    width: var(--size);
    height: var(--size);
    left: var(--left);
    top: var(--top);
    border-radius: 999px;
    background: rgba(255, 255, 255, var(--alpha));
    box-shadow: 0 0 calc(var(--size) * 4) rgba(150, 207, 255, 0.85);
    animation: star-drift var(--drift) ease-in-out infinite alternate;
}

.star.blink {
    animation:
        star-drift var(--drift) ease-in-out infinite alternate,
        blink var(--blink) ease-in-out infinite;
    animation-delay: 0s, var(--delay);
}

.shooting-star-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shooting-star {
    position: absolute;
    left: var(--start-x);
    top: var(--start-y);
    width: clamp(5.5rem, 14vw, 11rem);
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.28) 16%,
        rgba(184, 221, 255, 0.92) 58%,
        #ffffff
    );
    filter: drop-shadow(0 0 0.35rem rgba(174, 218, 255, 0.92));
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(18deg);
    transform-origin: right center;
    animation: shooting-star var(--flight) cubic-bezier(0.14, 0.54, 0.28, 1)
        forwards;
    will-change: transform, opacity;
}

.shooting-star::after {
    content: "";
    position: absolute;
    right: -0.1rem;
    top: 50%;
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 0 0.42rem rgba(255, 255, 255, 0.95),
        0 0 1rem rgba(142, 205, 255, 0.85);
    transform: translateY(-50%);
}

.nebula {
    position: absolute;
    width: 42rem;
    height: 42rem;
    border-radius: 50%;
    filter: blur(34px);
    opacity: 0.26;
    animation: nebula-float 18s ease-in-out infinite alternate;
}

.nebula-a {
    top: 8%;
    left: -14rem;
    background: radial-gradient(
        circle,
        rgba(35, 141, 255, 0.68),
        transparent 66%
    );
}

.nebula-b {
    right: -18rem;
    bottom: 14%;
    background: radial-gradient(
        circle,
        rgba(107, 225, 255, 0.48),
        transparent 68%
    );
    animation-delay: -7s;
}

.section-panel {
    min-height: 100svh;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 6rem 0;
}

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

.hero-inner {
    width: min(880px, 100%);
}

.eyebrow {
    margin: 0 0 1.1rem;
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: clamp(0.76rem, 1.5vw, 0.9rem);
    letter-spacing: 0;
    text-transform: lowercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(3.15rem, 10vw, 7.8rem);
    line-height: 0.94;
    letter-spacing: 0;
}

.name-gradient {
    display: inline-block;
    color: transparent;
    background: repeating-linear-gradient(
        108deg,
        #ffffff 0%,
        #9d9d9d 17%,
        #0b0b0d 38%,
        #d9d9d9 48%,
        #ffffff 56%
    );
    background-size: 280% 280%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: name-gradient-drift 2s linear infinite;
}

.subtitle {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.38em;
    flex-wrap: nowrap;
    min-height: 2.4em;
    max-width: 100%;
    margin: 1.4rem auto 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 3vw, 1.55rem);
    line-height: 1.55;
    white-space: nowrap;
}

.rotating-wrap {
    display: inline-block;
    min-width: 0;
    text-align: center;
    vertical-align: baseline;
    white-space: nowrap;
}

#rotating-text {
    display: inline-block;
    color: var(--cyan);
    background: linear-gradient(90deg, var(--cyan), var(--blue), #b9f4ff);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 700;
    animation: blue-sweep 1.8s ease-in-out infinite;
    white-space: nowrap;
}

#rotating-text.is-changing {
    animation:
        word-pop 0.34s ease,
        blue-sweep 1.8s ease-in-out infinite;
}

.project-card,
.orbit-item,
.discord-card,
.modal-dialog {
    border: 1px solid var(--line);
    background: linear-gradient(
        180deg,
        rgba(15, 31, 72, 0.62),
        rgba(8, 13, 31, 0.74)
    );
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.scroll-cue {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    width: 2rem;
    height: 3.1rem;
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
}

.scroll-cue span {
    position: absolute;
    top: 0.58rem;
    left: 50%;
    width: 0.36rem;
    height: 0.36rem;
    border-radius: 50%;
    transform: translateX(-50%);
    background: white;
    animation: cue 1.6s ease-in-out infinite;
}

.orbit-section,
.projects-section {
    display: grid;
    align-content: center;
    gap: 3rem;
}

.orbit-layout {
    display: grid;
    grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
}

.discord-card {
    width: 330px;
    max-width: none;
    justify-self: start;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0;
    background: linear-gradient(180deg, #0b1350 30%, #5f6066 100%);
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

.discord-banner {
    height: 6.55rem;
    position: relative;
    overflow: hidden;
    background: var(--discord-top-gradient);
}

.discord-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discord-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
    pointer-events: none;
}

.discord-profile-main {
    display: flex;
    min-height: 2.9rem;
    align-items: flex-start;
    padding: 0 1rem;
}

.discord-card-body {
    padding: 0 1rem 1rem;
}

.discord-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    max-width: 100%;
    margin-left: 0.38rem;
    padding: 0.1rem 0.34rem 0.1rem 0.18rem;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px) saturate(140%);
    color: #f7fbff;
    font-family: "gg sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}

.discord-badges img {
    display: block;
    width: 1rem;
    height: 1rem;
    object-fit: contain;
}

.discord-badges span {
    display: inline-block;
    min-width: 0;
    max-width: 7rem;
    overflow: hidden;
    color: #f7fbff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.discord-avatar-wrap {
    position: relative;
    flex: 0 0 auto;
    margin-top: -2.1rem;
    padding: 6px;
    border-radius: 50%;
    background: var(--discord-avatar-ring-color);
}

.discord-avatar-wrap::after {
    content: none;
}

#discord-avatar {
    position: relative;
    z-index: 1;
    display: block;
    width: 4.7rem;
    height: 4.7rem;
    border-radius: 50%;
    object-fit: cover;
    background: #1e1f22;
    border: 0;
}

.discord-status-dot {
    position: absolute;
    right: 0.18rem;
    bottom: 0.18rem;
    z-index: 3;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 0;
    background: transparent url("https://cdn3.emoji.gg/emojis/54394-offline.png")
        center / contain no-repeat;
    cursor: help;
}

.discord-status-dot.online {
    background-image: url("https://cdn3.emoji.gg/emojis/11458-online.png");
}

.discord-status-dot.idle {
    background-image: url("https://cdn3.emoji.gg/emojis/11458-idle.png");
}

.discord-status-dot.idle::after {
    content: none;
}

.discord-status-dot.dnd {
    background-image: url("https://cdn3.emoji.gg/emojis/2572-donotdisturb.png");
}

.discord-status-dot.dnd::after {
    content: none;
}

.discord-status-dot.offline {
    background-image: url("https://cdn3.emoji.gg/emojis/54394-offline.png");
}

.discord-status-dot.offline::after {
    content: none;
}

.discord-status-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.58rem);
    z-index: 12;
    width: max-content;
    max-width: 12rem;
    padding: 0.42rem 0.54rem;
    border-radius: 5px;
    background: #111214;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    color: #f2f3f5;
    font-family: "gg sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translate(-50%, 0.2rem);
    transition:
        opacity 160ms ease,
        transform 160ms ease,
        visibility 160ms ease;
    visibility: hidden;
    white-space: normal;
}

.discord-status-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 0.48rem;
    height: 0.48rem;
    background: #111214;
    transform: translate(-50%, -50%) rotate(45deg);
}

.discord-status-dot:hover .discord-status-tooltip,
.discord-status-dot:focus-visible .discord-status-tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
    visibility: visible;
}

.discord-profile-copy {
    min-width: 0;
    margin-top: 0.28rem;
    padding: 0.78rem;
    border: 0;
    border-radius: 8px 8px 0 0;
    background: transparent;
}

.discord-activity-label,
.discord-spotify p,
.discord-connections p {
    margin: 0;
    color: #f2f3f5;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.discord-profile-copy h3 {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.22rem 0;
    margin: 0;
    color: #f2f3f5;
    font-size: 1.42rem;
    line-height: 1.05;
}

#discord-name {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.discord-profile-copy p:last-child {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.26rem 0;
    margin: 0.28rem 0 0;
    color: #b5bac1;
    font-size: 0.86rem;
}

.discord-activity,
.discord-spotify,
.discord-connections {
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(15, 16, 20, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px) saturate(150%);
}

.discord-activity,
.discord-spotify,
.discord-connections {
    display: grid;
    gap: 0.34rem;
    margin-top: 0;
    padding: 0.78rem;
}

.discord-activity {
    margin-top: 0.4rem;
    border-radius: 8px;
}

.discord-spotify {
    border-radius: 8px;
    margin-top: 0.76rem;
}

.discord-connections {
    grid-template-columns: 1fr;
    border-radius: 8px;
    margin-top: 0.76rem;
}

.discord-activity-content {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 0.72rem;
}

.discord-activity-art {
    position: relative;
    width: 4rem;
    height: 4rem;
    flex: 0 0 auto;
}

#discord-activity-image {
    display: block;
    width: 3.9rem;
    height: 3.9rem;
    border-radius: 8px;
    object-fit: contain;
    background: transparent;
}

#discord-activity-small-image {
    position: absolute;
    right: -0.14rem;
    bottom: -0.14rem;
    width: 1.44rem;
    height: 1.44rem;
    border: 0;
    border-radius: 50%;
    object-fit: contain;
    padding: 0.16rem;
    background: rgba(49, 51, 56, 0.86);
    box-shadow: none;
    overflow: hidden;
}

.discord-activity-copy {
    min-width: 0;
}

.discord-activity strong,
.discord-spotify strong {
    display: block;
    color: #f2f3f5;
    font-size: 0.93rem;
    line-height: 1.2;
}

.discord-activity span,
.discord-spotify span {
    display: block;
    margin-top: 0.16rem;
    color: #b5bac1;
    font-size: 0.76rem;
    line-height: 1.32;
}

.discord-connections a {
    display: flex;
    min-width: 0;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.62rem;
    padding: 0.46rem 0.55rem;
    border-radius: 5px;
    color: #f2f3f5;
    font-family: "gg sans", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 160ms ease,
        transform 160ms ease;
}

.discord-connections a:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.connection-icon {
    display: grid;
    width: 1.42rem;
    height: 1.42rem;
    flex: 0 0 auto;
    place-items: center;
}

.connection-icon img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 1.42rem;
    max-height: 1.42rem;
    object-fit: contain;
}

.section-heading {
    text-align: center;
}

h2 {
    margin: 0;
    font-size: clamp(2.25rem, 7vw, 5.8rem);
    line-height: 0.96;
}

.orbit-stage {
    --orbit-stage-size: min(60vw, 620px);
    --orbit-track-inset: 14%;
    --orbit-radius: calc((var(--orbit-stage-size) / 2) - 5.1rem);
    --orbit-desc-width: 7rem;
    position: relative;
    width: var(--orbit-stage-size);
    aspect-ratio: 1;
    margin: 0 auto;
    display: grid;
    place-items: center;
}

.orbit-ring {
    position: absolute;
    inset: var(--orbit-track-inset);
    border: 1px dashed rgba(142, 233, 255, 0.28);
    border-radius: 50%;
    box-shadow:
        inset 0 0 28px rgba(47, 143, 255, 0.08),
        0 0 42px rgba(47, 143, 255, 0.1);
}

.orbit-ring-two {
    inset: 27%;
    opacity: 0.78;
    animation: ring-pulse 4s ease-in-out infinite;
}

.orbit-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 999px;
    text-align: center;
    text-decoration: none;
    position: relative;
    color: var(--text);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.orbit-item img {
    display: block;
    width: 1.65rem;
    height: 1.65rem;
    object-fit: contain;
}

.orbit-item strong {
    margin-top: 0.28rem;
    font-size: 0.76rem;
}

.orbit-desc {
    position: absolute;
    top: 50%;
    left: calc(100% + 0.62rem);
    z-index: 8;
    width: max-content;
    max-width: var(--orbit-desc-width);
    padding: 0.44rem 0.56rem;
    border: 1px solid rgba(142, 233, 255, 0.24);
    border-radius: 8px;
    background: rgba(8, 13, 31, 0.96);
    box-shadow:
        0 12px 30px rgba(2, 8, 20, 0.46),
        0 0 20px rgba(47, 143, 255, 0.16);
    color: var(--text);
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translate(-0.25rem, -50%) scale(0.98);
    transition:
        opacity 160ms ease,
        transform 160ms ease,
        visibility 160ms ease;
    visibility: hidden;
    white-space: normal;
}

.orbit-desc::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -0.31rem;
    width: 0.5rem;
    height: 0.5rem;
    border-left: 1px solid rgba(142, 233, 255, 0.24);
    border-bottom: 1px solid rgba(142, 233, 255, 0.24);
    background: rgba(8, 13, 31, 0.96);
    transform: translateY(-50%) rotate(45deg);
}

.orbit-item:hover,
.orbit-item:focus-visible,
.orbit-item.is-desc-open {
    z-index: 9;
    border-color: rgba(142, 233, 255, 0.62);
    box-shadow:
        0 12px 34px rgba(2, 8, 20, 0.46),
        0 0 30px rgba(47, 143, 255, 0.26);
}

.orbit-item:hover .orbit-desc,
.orbit-item:focus-visible .orbit-desc,
.orbit-item.is-desc-open .orbit-desc {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
    visibility: visible;
}

.zed-core {
    width: clamp(7.4rem, 17vw, 9.2rem);
    height: clamp(7.4rem, 17vw, 9.2rem);
    padding: 1rem;
    border-radius: 50%;
    background:
        radial-gradient(
            circle at top,
            rgba(142, 233, 255, 0.3),
            transparent 58%
        ),
        rgba(8, 13, 31, 0.8);
    animation: core-breathe 3.8s ease-in-out infinite;
}

.zed-core img {
    width: 2.8rem;
    height: 2.8rem;
}

.orbit-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(4.65rem, 8vw, 5.25rem);
    height: clamp(4.65rem, 8vw, 5.25rem);
    padding: 0.54rem;
    animation: orbit 16s linear infinite;
    will-change: transform;
}

.node-lua {
    --angle: 0deg;
}

.node-luau {
    --angle: 72deg;
}

.node-js {
    --angle: 144deg;
}

.node-css {
    --angle: 216deg;
}

.node-html {
    --angle: 288deg;
}

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

.project-card {
    display: flex;
    flex-direction: column;
    min-height: 14rem;
    padding: 1.1rem;
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(142, 233, 255, 0.62);
    background: linear-gradient(
        180deg,
        rgba(31, 72, 136, 0.62),
        rgba(8, 13, 31, 0.78)
    );
}

.project-card .number {
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.project-card h3 {
    margin: 2.2rem 0 0.65rem;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.1;
}

.project-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.project-card .type {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    overflow-wrap: anywhere;
    margin-top: 1.4rem;
    color: #d7f7ff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.projects-note {
    width: min(780px, 100%);
    margin: -1.4rem auto 0;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: clamp(0.78rem, 1.8vw, 0.92rem);
    line-height: 1.7;
    text-align: center;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    place-items: center;
    padding: 1.2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal.is-open {
    display: grid;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 2, 10, 0.72);
    backdrop-filter: blur(10px);
}

.modal-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    min-height: 24rem;
    max-height: calc(100svh - 2.4rem);
    overflow-y: auto;
    padding: clamp(1.4rem, 5vw, 2.4rem);
    border-radius: 8px;
    transform: translateY(16px) scale(0.98);
    opacity: 0;
    animation: modal-in 180ms ease forwards;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.modal-kicker {
    margin: 0 0 0.8rem;
    color: var(--cyan);
    font-family: var(--font-mono);
}

.modal-dialog h3 {
    margin: 0;
    padding-right: 2.4rem;
    font-size: clamp(2rem, 6vw, 4.2rem);
    line-height: 0.96;
}

.modal-dialog p {
    color: var(--muted);
    line-height: 1.7;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.5rem;
}

.modal-meta span,
.modal-cta {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.modal-meta span {
    padding: 0.55rem 0.75rem;
    color: #dff8ff;
}

.modal-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: 100%;
    margin: 1rem 0 0;
    padding: 0.85rem 1.25rem;
    color: var(--text);
    text-decoration: none;
}

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

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

@-webkit-keyframes bg-pan-top {
    0% {
        background-position: 50% 100%;
    }
    100% {
        background-position: 50% 0%;
    }
}

@keyframes bg-pan-top {
    0% {
        background-position: 50% 100%;
    }
    100% {
        background-position: 50% 0%;
    }
}

@keyframes shooting-star {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) rotate(18deg) scaleX(0.38);
    }
    10% {
        opacity: 1;
    }
    82% {
        opacity: 0.92;
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--travel-x), var(--travel-y), 0)
            rotate(18deg) scaleX(1);
    }
}

@keyframes loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes name-gradient-drift {
    from {
        background-position: 95% 32%;
    }
    to {
        background-position: 0% 0%;
    }
}

@keyframes blue-sweep {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes word-pop {
    0% {
        transform: translateY(10px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes blink {
    0%,
    100% {
        opacity: 0.22;
        transform: scale(0.82);
    }
    45% {
        opacity: 1;
        transform: scale(1.25);
    }
}

@keyframes blink-mobile {
    0%,
    100% {
        opacity: 0.22;
    }
    45% {
        opacity: 1;
    }
}

@keyframes star-drift {
    from {
        translate: 0 -0.45rem;
        opacity: 0.72;
    }
    to {
        translate: 0 0.45rem;
        opacity: 1;
    }
}

@keyframes nebula-float {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(3rem, -2rem, 0) scale(1.08);
    }
}

@keyframes cue {
    0%,
    100% {
        transform: translate(-50%, 0);
        opacity: 0.2;
    }
    45% {
        transform: translate(-50%, 1.25rem);
        opacity: 1;
    }
}

@keyframes ring-pulse {
    0%,
    100% {
        opacity: 0.42;
    }
    50% {
        opacity: 0.9;
    }
}

@keyframes core-breathe {
    0%,
    100% {
        box-shadow: 0 0 34px rgba(47, 143, 255, 0.22);
    }
    50% {
        box-shadow: 0 0 64px rgba(142, 233, 255, 0.32);
    }
}

@keyframes orbit {
    from {
        transform: translate(-50%, -50%) rotate(var(--angle))
            translateX(var(--orbit-radius)) rotate(calc(var(--angle) * -1));
    }
    to {
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 360deg))
            translateX(var(--orbit-radius))
            rotate(calc((var(--angle) + 360deg) * -1));
    }
}

@keyframes modal-in {
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (max-width: 860px) {
    .section-panel {
        width: min(100% - 28px, 1120px);
        padding: 5.25rem 0;
    }

    .orbit-section,
    .projects-section {
        gap: 2.35rem;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .orbit-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .discord-card {
        width: min(100%, 330px);
        margin: 0 auto;
        order: -1;
    }

    .orbit-stage {
        --orbit-stage-size: min(92vw, 560px);
        --orbit-radius: calc((var(--orbit-stage-size) / 2) - 4.8rem);
    }

    .orbit-node {
        width: clamp(4.35rem, 16vw, 5rem);
        height: clamp(4.35rem, 16vw, 5rem);
    }

    .orbit-desc {
        --orbit-desc-width: 5.6rem;
    }

    .modal {
        align-items: start;
        padding: 1rem;
    }

    .modal-dialog {
        min-height: auto;
        max-height: calc(100svh - 2rem);
        margin: auto 0;
    }
}

@media (max-width: 560px) {
    body {
        background:
            radial-gradient(
                circle at 50% -10%,
                rgba(44, 91, 167, 0.32),
                transparent 26rem
            ),
            linear-gradient(180deg, #02030a 0%, #050918 42%, #030510 100%);
    }

    .nebula {
        width: 30rem;
        height: 30rem;
        filter: blur(22px);
        opacity: 0.18;
        animation-duration: 28s;
    }

    .nebula-a {
        left: -18rem;
    }

    .nebula-b {
        right: -20rem;
    }

    .star {
        animation: none;
    }

    .star.blink {
        animation: blink-mobile 5.2s ease-in-out infinite;
        animation-delay: var(--delay);
    }

    .project-card,
    .orbit-item,
    .modal-dialog {
        backdrop-filter: none;
    }

    .section-panel {
        width: min(100% - 24px, 1120px);
        min-height: auto;
        padding: 4.25rem 0;
    }

    .hero {
        min-height: 100svh;
        padding-bottom: 5.5rem;
    }

    h1 {
        font-size: clamp(2.45rem, 16vw, 4.45rem);
        line-height: 0.98;
    }

    h2 {
        font-size: clamp(2.1rem, 12vw, 3.8rem);
    }

    .subtitle {
        gap: 0.16rem 0.38rem;
        max-width: 100%;
        min-height: 2.4em;
        margin-top: 1.05rem;
        font-size: clamp(0.86rem, 4.4vw, 1.28rem);
        line-height: 1.35;
    }

    .rotating-wrap {
        display: inline-block;
        min-width: 0;
        margin-top: 0;
        text-align: center;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .project-card {
        min-height: auto;
        padding: 0.95rem;
    }

    .project-card:hover {
        transform: translateY(-2px);
    }

    .project-card h3 {
        margin: 1rem 0 0.45rem;
        font-size: 1.22rem;
    }

    .project-card p {
        font-size: 0.92rem;
        line-height: 1.45;
    }

    .project-card .type {
        margin-top: 0.8rem;
    }

    .projects-note {
        margin-top: -0.8rem;
        text-align: left;
    }

    .orbit-stage {
        --orbit-stage-size: min(calc(100vw - 24px), 420px);
        --orbit-track-inset: 13%;
        --orbit-radius: calc((var(--orbit-stage-size) / 2) - 4.1rem);
        --orbit-desc-width: 7.4rem;
        margin-top: 0.25rem;
    }

    .orbit-node {
        width: clamp(3.9rem, 18vw, 4.35rem);
        height: clamp(3.9rem, 18vw, 4.35rem);
        padding: 0.45rem 0.55rem;
    }

    .orbit-item img {
        width: 1.45rem;
        height: 1.45rem;
    }

    .orbit-item strong {
        font-size: 0.76rem;
    }

    .orbit-desc {
        top: auto;
        bottom: calc(100% + 0.5rem);
        left: 50%;
        padding: 0.4rem 0.48rem;
        font-size: 0.62rem;
        transform: translate(-50%, 0.25rem) scale(0.98);
    }

    .orbit-desc::before {
        top: 100%;
        left: 50%;
        border: 0;
        border-right: 1px solid rgba(142, 233, 255, 0.24);
        border-bottom: 1px solid rgba(142, 233, 255, 0.24);
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .orbit-item:hover .orbit-desc,
    .orbit-item:focus-visible .orbit-desc,
    .orbit-item.is-desc-open .orbit-desc {
        transform: translate(-50%, 0) scale(1);
    }

    .zed-core {
        width: clamp(6.25rem, 29vw, 7.3rem);
        height: clamp(6.25rem, 29vw, 7.3rem);
        padding: 0.85rem;
    }

    .zed-core img {
        width: 2.45rem;
        height: 2.45rem;
    }

    .modal-dialog {
        min-height: auto;
        width: 100%;
        padding: 1.15rem;
    }

    .modal-close {
        top: 0.72rem;
        right: 0.72rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .modal-kicker {
        max-width: calc(100% - 3rem);
        font-size: 0.82rem;
    }

    .modal-dialog h3 {
        padding-right: 2.8rem;
        font-size: clamp(1.9rem, 12vw, 3rem);
    }

    .modal-dialog p {
        font-size: 0.95rem;
        line-height: 1.58;
    }

    .modal-meta {
        gap: 0.5rem;
        margin-top: 1.1rem;
    }

    .modal-meta span,
    .modal-cta {
        font-size: 0.76rem;
    }

    .modal-cta {
        min-width: 0;
        margin-top: 0.9rem;
        min-height: 2.75rem;
        align-items: center;
    }
}

@media (max-width: 380px) {
    .section-panel {
        width: min(100% - 20px, 1120px);
        padding: 3.75rem 0;
    }

    .hero {
        padding-bottom: 5rem;
    }

    h1 {
        font-size: clamp(2.28rem, 15vw, 3.6rem);
    }

    .subtitle {
        font-size: clamp(0.8rem, 4.2vw, 1rem);
    }

    .orbit-section,
    .projects-section {
        gap: 1.8rem;
    }

    .orbit-stage {
        --orbit-stage-size: min(calc(100vw - 20px), 340px);
        --orbit-radius: calc((var(--orbit-stage-size) / 2) - 3.85rem);
        --orbit-desc-width: 4.5rem;
    }

    .orbit-desc {
        --orbit-desc-width: 4.5rem;
    }

    .orbit-node {
        width: 3.78rem;
        height: 3.78rem;
        padding: 0.38rem;
    }

    .zed-core {
        width: 6.1rem;
        height: 6.1rem;
    }

    .modal {
        padding: 0.7rem;
    }

    .modal-dialog {
        max-height: calc(100svh - 1.4rem);
    }
}

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

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