/* Project observatory page styles. */

/* These styles apply only to this page. */
body.projects-page {
    background: #080e19;
    color: #edf3ff;
    font-family: 'DM Sans', sans-serif;
}
.projects-page .navbar {
    position: sticky;
    top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(8, 14, 25, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid #203049;
}
.projects-page .nav-btn {
    min-width: 0;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: #a8b7cd;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.2px;
}
.projects-page .nav-btn:hover,
.projects-page .nav-btn[aria-current] {
    background: #15283a;
    border-color: #2c5865;
    color: #8debdc;
    transform: none;
}
.projects-page a:focus-visible,
.projects-page button:focus-visible,
.projects-page [tabindex]:focus-visible {
    outline: 2px solid #80e7d5;
    outline-offset: 5px;
}
.projects-page .skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    transform: translateY(-180%);
    padding: 10px 16px;
    background: #fff;
    color: #080e19;
    z-index: 2000;
    border-radius: 8px;
}
.projects-page .skip-link:focus {
    transform: none;
}
.projects-page .project-hero {
    position: relative;
    max-width: 1180px;
    margin: 32px auto 0;
    padding: 58px 52px;
    overflow: hidden;
    border: 1px solid #273852;
    border-radius: 24px;
    background:
        linear-gradient(100deg, rgba(10, 22, 40, 0.97), rgba(10, 22, 40, 0.76)),
        url('../../assets/bg-images/bgprojects.png') center/cover;
}
.projects-page .project-hero::after {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    right: -130px;
    top: -170px;
    border-radius: 50%;
    background: #47cbb5;
    filter: blur(110px);
    opacity: 0.15;
    pointer-events: none;
}
.projects-page .hero-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 36px;
    position: relative;
    z-index: 1;
}
.projects-page .eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #86dfce;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.projects-page .eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #86dfce;
    border-radius: 50%;
}
.projects-page .project-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(38px, 6vw, 66px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin: 16px 0;
}
.projects-page .hero-description {
    max-width: 540px;
    font-size: 15px;
    line-height: 1.8;
    color: #aebed3;
}
.projects-page .hero-avatar {
    flex: none;
    width: 170px;
    height: 170px;
    object-fit: contain;
    filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.4));
}
.projects-page .topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 25px;
    list-style: none;
    padding: 0;
}
.projects-page .topic-list li {
    padding: 6px 11px;
    border: 1px solid #30425a;
    border-radius: 30px;
    color: #c0cee0;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.025);
}
.projects-page .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}
.projects-page .hero-action {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 16px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #345366;
    color: #dcf6f2;
    background: #153039;
}
.projects-page .hero-action.secondary {
    background: transparent;
    border-color: #30425a;
    color: #c0cee0;
}
.projects-page .explore-section {
    max-width: 1440px;
    margin: 38px auto 0;
    padding: 0 24px;
}
.projects-page .section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    max-width: 1180px;
    margin: 0 auto 18px;
}
.projects-page .section-toolbar h2 {
    font-size: 19px;
    font-weight: 500;
    margin: 0 0 5px;
}
.projects-page .section-toolbar p {
    color: #8fa2bc;
    font-size: 12px;
    margin: 0;
}
.projects-page .sound-button {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: #111f31;
    color: #bdcde0;
    border: 1px solid #2a3d56;
    border-radius: 9px;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.projects-page .sound-button[aria-pressed='true'] {
    color: #8debdc;
    border-color: #3c8279;
}
.projects-page .galaxy-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid #24354d;
    border-radius: 22px;
    background: radial-gradient(ellipse at 50% 45%, #112b3e 0%, #0b1425 40%, #060c16 80%);
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.22);
}
.projects-page .galaxy-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(126, 180, 210, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(126, 180, 210, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
}
.projects-page .solar-system-section {
    position: relative;
    display: block;
    width: 100%;
    overflow: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #335168 #0b1425;
}
.projects-page .solar-system {
    margin: 0 auto;
}
.projects-page .galaxy-caption {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 13px 20px;
    border-top: 1px solid #24354d;
    color: #8fa2bc;
    font-size: 11px;
}
.projects-page .galaxy-caption span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.projects-page .left-character {
    opacity: 0.12;
    z-index: 0;
}
.projects-page footer {
    position: relative;
    margin-top: 48px;
    padding: 30px 20px;
    background: #0b1421;
    border-top: 1px solid #203049;
}
.projects-page .footer-links {
    gap: 20px;
    margin-bottom: 12px;
}
.projects-page .footer-links a {
    font-size: 20px;
}
.projects-page footer p {
    font-size: 11px;
    margin: 4px 0;
}
@media (max-width: 800px) {
    .projects-page .project-hero {
        margin: 18px 16px 0;
        padding: 32px 26px;
    }
    .projects-page .hero-layout {
        gap: 16px;
    }
    .projects-page .hero-avatar {
        width: 110px;
        height: 110px;
    }
    .projects-page .explore-section {
        padding: 0 16px;
        margin-top: 28px;
    }
}
@media (max-width: 520px) {
    .projects-page .navbar {
        gap: 3px;
        padding: 10px 6px;
    }
    .projects-page .nav-btn {
        padding: 9px 10px;
        font-size: 11px;
    }
    .projects-page .nav-btn i {
        margin-right: 4px;
    }
    .projects-page .project-hero {
        padding: 28px 22px;
    }
    .projects-page .hero-layout {
        align-items: flex-start;
    }
    .projects-page .hero-avatar {
        position: absolute;
        top: 0;
        right: 0;
        width: 62px;
        height: 62px;
        opacity: 0.65;
    }
    .projects-page .eyebrow {
        padding-right: 64px;
        font-size: 9px;
        letter-spacing: 1px;
    }
    .projects-page .project-hero h1 {
        margin-top: 24px;
    }
    .projects-page .hero-description {
        font-size: 13px;
    }
    .projects-page .section-toolbar {
        align-items: flex-start;
    }
    .projects-page .section-toolbar h2 {
        font-size: 17px;
    }
    .projects-page .section-toolbar p {
        max-width: 220px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .projects-page *,
    .projects-page *::before,
    .projects-page *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
/* PROJECT OBSERVATORY — contained, responsive exploration */
.projects-page .explore-section {
    max-width: 1320px;
}
.projects-page .observatory {
    --obs-accent: #8debdc;
    position: relative;
    isolation: isolate;
    border: 1px solid #2b4055;
    border-radius: 22px;
    overflow: hidden;
    background: #09121f;
    box-shadow: 0 30px 70px #0005;
}
.projects-page .observatory button {
    font-family: inherit;
    cursor: pointer;
}
.projects-page .observatory [hidden] {
    display: none !important;
}
.obs-toolbar,
.obs-controls,
.obs-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 22px;
}
.obs-toolbar {
    justify-content: space-between;
    border-bottom: 1px solid #243349;
    background: linear-gradient(90deg, #132234, #0e1a29);
}
.obs-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10px;
    letter-spacing: 2px;
    color: #c7d8ea;
}
.obs-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8debdc;
    box-shadow: 0 0 15px #8debdc;
}
.obs-version {
    color: #647c96;
}
.obs-views {
    display: flex;
    gap: 3px;
    padding: 3px;
    background: #07111d;
    border: 1px solid #293e53;
    border-radius: 9px;
}
.obs-views button {
    border: 0;
    border-radius: 6px;
    padding: 7px 11px;
    color: #91a6c0;
    background: transparent;
    font-size: 11px;
}
.obs-views button[aria-pressed='true'] {
    background: #233c4b;
    color: #c7f9ed;
}
.obs-controls {
    padding-bottom: 8px;
}
.obs-reset {
    padding: 9px 11px;
    border: 1px solid #2b4055;
    border-radius: 8px;
    background: #112235;
    color: #afc4da;
    font-size: 11px;
}
.obs-filters {
    gap: 7px;
    padding-top: 7px;
    padding-bottom: 18px;
}
.obs-filter {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid #2a3b51;
    border-radius: 30px;
    background: #101d2d;
    color: #a6bad2;
    font-size: 11px;
}
.obs-filter i {
    width: 5px;
    height: 5px;
    background: var(--world-color, #8debdc);
    border-radius: 50%;
}
.obs-filter[aria-pressed='true'] {
    color: #e5fff7;
    border-color: var(--world-color, #8debdc);
    background: #18313b;
}
.obs-filter span {
    color: #7891aa;
    font-size: 10px;
}
.obs-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    border-top: 1px solid #243349;
}
.obs-universe {
    min-width: 0;
    background: radial-gradient(ellipse at 50% 48%, #14283e 0%, #0a1526 40%, #070e1a 80%);
}
.obs-map {
    position: relative;
    height: 620px;
    overflow: hidden;
}
#starCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.8;
}
.obs-orbits {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.obs-orbits ellipse {
    fill: none;
    stroke: #83b4d3;
    stroke-opacity: 0.12;
    stroke-width: 1;
    stroke-dasharray: 3 7;
}
.obs-orbits ellipse:nth-child(2) {
    stroke-opacity: 0.07;
    stroke-dasharray: none;
}
.obs-orbits path {
    stroke: #5e8bab;
    stroke-opacity: 0.08;
    stroke-dasharray: 2 8;
}
.obs-map-top {
    position: absolute;
    top: 20px;
    left: 22px;
    right: 22px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 8px;
    letter-spacing: 1.5px;
    color: #7995b2;
    pointer-events: none;
}
.obs-coordinate {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: #536e89;
    font-size: 8px;
    letter-spacing: 3px;
    pointer-events: none;
}
.obs-core {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 134px;
    height: 134px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid #92ecdc55;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #3b7e8f, #19394d 40%, #071221 80%);
    color: #eefdfb;
    box-shadow:
        inset -15px -10px 25px #0008,
        0 0 60px #67cdbb18;
    text-align: center;
}
.obs-core::before,
.obs-core::after {
    content: '';
    position: absolute;
    inset: -12px;
    border: 1px solid #8debdc30;
    border-radius: 50%;
}
.obs-core::after {
    inset: -24px;
    border-style: dashed;
    border-color: #8debdc18;
    animation: obs-turn 100s linear infinite;
}
.obs-core strong {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 27px;
    line-height: 1.1;
    max-width: 115px;
}
.obs-core small {
    font-size: 8px;
    color: #a2d8dd;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.obs-world {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 124px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #d5e4f4;
}
.obs-globe {
    position: relative;
    display: block;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: 1px solid var(--world-color);
    background: radial-gradient(circle at 30% 20%, var(--world-color), #102037 75%);
    box-shadow: 0 0 28px color-mix(in srgb, var(--world-color) 16%, transparent);
    transition: transform 0.25s;
}
.obs-globe::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 28% 20%, #ffffff25, transparent 42%),
        linear-gradient(130deg, transparent 25%, #000c 90%);
    box-shadow: inset -8px -7px 15px #0008;
    pointer-events: none;
}
.obs-globe img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.7;
}
.obs-world:nth-of-type(even) .obs-globe::before {
    content: '';
    position: absolute;
    inset: 25px -16px;
    border: 2px solid var(--world-color);
    border-radius: 50%;
    transform: rotate(-25deg);
    opacity: 0.6;
}
.obs-world:hover .obs-globe,
.obs-world:focus-visible .obs-globe {
    transform: scale(1.13);
}
.obs-world-label {
    font-size: 12px;
    font-weight: 500;
    margin-top: 10px;
    text-shadow: 0 2px 5px #000;
}
.obs-world-count {
    font-size: 9px;
    color: #7e9ab6;
    margin-top: 2px;
}
.obs-project-node {
    position: absolute;
    width: 62px;
    padding: 0;
    transform: translate(-50%, -50%);
    background: transparent;
    border: 0;
    color: #c4d7ec;
}
.obs-project-node img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 13px;
    border: 1px solid #6796b4;
    box-shadow: 0 5px 20px #0007;
    background: #1b3349;
    transition: transform 0.2s;
}
.obs-project-node[aria-pressed='true'] img,
.obs-project-node:hover img {
    transform: scale(1.12);
    border: 2px solid var(--obs-accent);
    box-shadow: 0 0 20px #8debdc33;
}
.obs-node-number {
    display: block;
    margin-top: 6px;
    font-size: 9px;
    color: #85a1bd;
}
.obs-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border-top: 1px solid #243349;
    font-size: 10px;
    color: #8ca6c2;
}
.obs-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 9px;
}
.obs-legend i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #8debdc;
}
.obs-legend i:last-child {
    background: #647f9a;
    margin-left: 5px;
}
.obs-inspector {
    min-width: 0;
    border-left: 1px solid #243349;
    padding: 24px;
    background: linear-gradient(160deg, #132135, #0a1422);
}
.obs-kicker {
    color: var(--obs-accent);
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.obs-inspector h3 {
    font-family: 'Playfair Display', serif;
    font-size: 29px;
    line-height: 1.2;
    font-weight: 400;
    color: #e3eefb;
    margin: 0 0 14px;
}
.obs-inspector p {
    font-size: 12px;
    line-height: 1.8;
    color: #9fb5ce;
    margin: 0 0 18px;
}
.obs-inspector-image {
    width: 100%;
    height: 170px;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #31475e;
    margin: 0 0 20px;
    background: #12263a;
}
.obs-facts {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    margin-bottom: 20px;
    border-top: 1px solid #2a3c51;
    border-bottom: 1px solid #2a3c51;
}
.obs-facts strong {
    display: block;
    color: #deebf9;
    font-size: 23px;
    font-weight: 400;
}
.obs-facts span {
    color: #8da6c0;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.obs-open-link {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 10px 14px;
    background: #1e414a;
    color: #b3f4e5;
    border: 1px solid #3d6970;
    border-radius: 8px;
    font-size: 11px;
    margin-bottom: 20px;
}
.obs-next-label {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: #738da8;
    margin: 15px 0 10px;
}
.obs-project-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 260px;
    overflow: auto;
    scrollbar-width: thin;
}
.obs-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    width: 100%;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #a8bed7;
}
.obs-list-item[aria-pressed='true'] {
    border-color: #3b6571;
    background: #18303e;
    color: #e5fff9;
}
.obs-list-item:hover {
    background: #172d40;
}
.obs-list-item img {
    width: 34px;
    height: 34px;
    border-radius: 7px;
    object-fit: cover;
    flex: none;
}
.obs-list-item span {
    font-size: 11px;
    line-height: 1.4;
}
.obs-collection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
    gap: 14px;
    padding: 22px;
    min-height: 620px;
    align-content: start;
}
.obs-mini-card {
    text-align: left;
    border: 1px solid #2c4258;
    background: #112136;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    color: #dceafa;
}
.obs-mini-card[aria-pressed='true'] {
    border-color: #8debdc;
}
.obs-mini-card img {
    display: block;
    width: 100%;
    height: 115px;
    object-fit: cover;
    background: #18334a;
}
.obs-mini-card strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    padding: 0 12px 14px;
    line-height: 1.4;
}
.obs-mini-card small {
    display: block;
    color: #8ba9c6;
    padding: 12px 12px 7px;
    font-size: 9px;
}
.obs-no-results {
    padding: 30px;
    color: #a0b6cd;
    font-size: 13px;
}
.observatory.obs-paused *::after {
    animation-play-state: paused;
}
@keyframes obs-turn {
    to {
        transform: rotate(360deg);
    }
}
@media (max-width: 1000px) {
    .obs-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
    }
    .obs-inspector {
        padding: 20px;
    }
    .obs-world {
        width: 95px;
    }
    .obs-globe {
        width: 66px;
        height: 66px;
    }
}
@media (max-width: 760px) {
    .obs-layout {
        grid-template-columns: 1fr;
    }
    .obs-inspector {
        border-left: 0;
        border-top: 1px solid #243349;
    }
    .obs-map {
        height: 520px;
    }
    .obs-collection {
        min-height: 0;
    }
    .obs-project-list {
        max-height: 200px;
    }
    .obs-inspector-image {
        height: 210px;
    }
    .obs-map-top {
        font-size: 7px;
        letter-spacing: 1px;
    }
}
@media (max-width: 430px) {
    .obs-toolbar,
    .obs-controls,
    .obs-filters {
        padding-left: 14px;
        padding-right: 14px;
    }
    .obs-map {
        height: 480px;
    }
    .obs-globe {
        width: 56px;
        height: 56px;
    }
    .obs-world-label {
        font-size: 10px;
    }
    .obs-world {
        width: 86px;
    }
    .obs-core {
        width: 100px;
        height: 100px;
    }
    .obs-core strong {
        font-size: 22px;
    }
    .obs-core small {
        font-size: 7px;
    }
    .obs-project-node {
        width: 46px;
    }
    .obs-project-node img {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }
    .obs-legend {
        display: none;
    }
}

/* Living worlds: rotating textures, atmospheric light and slow orbital travel. */
.projects-page .obs-globe {
    isolation: isolate;
}
.obs-surface {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 50%;
    background-size: 200% 100%;
    background-repeat: repeat-x;
    background-color: var(--world-color);
    opacity: 0.85;
    animation: obs-texture var(--spin-duration, 48s) linear infinite;
    animation-delay: var(--spin-delay, 0s);
}
.obs-globe::after {
    z-index: 2;
}
.obs-globe::before {
    z-index: 3;
}
.obs-world .obs-globe {
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        filter 0.35s ease;
}
.obs-world:hover .obs-globe,
.obs-world:focus-visible .obs-globe {
    transform: scale(1.16) rotate(-6deg);
    filter: brightness(1.2);
    box-shadow:
        0 0 20px color-mix(in srgb, var(--world-color) 40%, transparent),
        0 0 65px color-mix(in srgb, var(--world-color) 20%, transparent);
}
.obs-world:hover .obs-surface,
.obs-world:focus-visible .obs-surface {
    animation-play-state: paused;
}
.obs-map::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(
        180px circle at var(--light-x, -300px) var(--light-y, -300px),
        #78d9df0d,
        transparent 85%
    );
}
.obs-map::after {
    content: '';
    position: absolute;
    width: 110px;
    height: 1px;
    top: 12%;
    left: -25%;
    background: linear-gradient(90deg, transparent, #c3efff);
    opacity: 0;
    transform: rotate(-22deg);
    animation: obs-meteor 18s ease-in infinite;
    pointer-events: none;
}
.obs-core {
    animation: obs-core-light 7s ease-in-out infinite;
}
.obs-project-node[aria-pressed='true'] img {
    animation: obs-selected-light 3s ease-in-out infinite;
}
.obs-world-label {
    transition:
        color 0.25s,
        letter-spacing 0.25s;
}
.obs-world:hover .obs-world-label {
    color: var(--world-color);
    letter-spacing: 0.5px;
}
.obs-inspector-image {
    animation: obs-detail-reveal 0.4s ease-out;
}
.observatory.obs-paused *,
.observatory.obs-paused *::before,
.observatory.obs-paused *::after {
    animation-play-state: paused !important;
}
@keyframes obs-texture {
    from {
        background-position: 0% 50%;
    }
    to {
        background-position: 200% 50%;
    }
}
@keyframes obs-core-light {
    0%,
    100% {
        box-shadow:
            inset -15px -10px 25px #0008,
            0 0 45px #67cdbb12;
    }
    50% {
        box-shadow:
            inset -15px -10px 25px #0008,
            0 0 75px #67cdbb30;
    }
}
@keyframes obs-selected-light {
    0%,
    100% {
        box-shadow: 0 0 10px #8debdc22;
    }
    50% {
        box-shadow: 0 0 28px #8debdc66;
    }
}
@keyframes obs-meteor {
    0%,
    82% {
        opacity: 0;
        left: -25%;
        top: 12%;
    }
    84% {
        opacity: 0.7;
    }
    91% {
        opacity: 0;
        left: 115%;
        top: 55%;
    }
    100% {
        opacity: 0;
        left: 115%;
        top: 55%;
    }
}
@keyframes obs-detail-reveal {
    from {
        opacity: 0.3;
        filter: blur(3px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}
@media (prefers-reduced-motion: reduce) {
    .projects-page .observatory *,
    .projects-page .observatory *::before,
    .projects-page .observatory *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Solar core and orbiting project satellites. */
.obs-core {
    overflow: visible;
    isolation: isolate;
    background: radial-gradient(circle at 28% 22%, #ffd995, #bd5d19 55%, #622b13);
    border-color: #f3c275;
    box-shadow:
        0 0 35px #fbb75b55,
        0 0 90px #e9832720;
}
.obs-sun-surface {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 50%;
    background-image:
        linear-gradient(125deg, #ffda6b18, #7f23004d),
        url('../../assets/images/planets/planet_texture.jpg');
    background-size: 200% 100%;
    background-repeat: repeat-x;
    animation: obs-texture 55s linear infinite;
    box-shadow: inset -10px -6px 25px #4a160a88;
}
.obs-core::before {
    border-color: #ffd08055;
    box-shadow: 0 0 18px #ffb43d22;
}
.obs-core::after {
    border-color: #ffc47733;
}
.obs-core strong,
.obs-core small {
    text-shadow:
        0 1px 6px #321004,
        0 0 10px #321004;
}
.obs-core small {
    color: #fff1cb;
}
.obs-project-node img {
    border-radius: 50%;
    animation: obs-project-spin var(--project-spin, 80s) linear infinite;
}
.obs-project-node:hover img,
.obs-project-node:focus-visible img {
    animation-play-state: paused;
}
.obs-project-node[aria-pressed='true'] img {
    animation:
        obs-project-spin var(--project-spin, 80s) linear infinite,
        obs-selected-light 3s ease-in-out infinite;
}
@keyframes obs-project-spin {
    to {
        rotate: 360deg;
    }
}
@media (prefers-reduced-motion: reduce) {
    .projects-page .obs-project-node img,
    .projects-page .obs-sun-surface {
        animation: none !important;
    }
}

/* Selected worlds keep their own texture and atmosphere. */
.projects-page .obs-category-core {
    background: radial-gradient(circle at 25% 20%, var(--core-color), #102037 80%);
    border-color: var(--core-color);
}
.projects-page .obs-category-core::before,
.projects-page .obs-category-core::after {
    border-color: var(--core-color);
    opacity: 0.35;
    box-shadow: none;
}
.projects-page .obs-category-core .obs-sun-surface {
    background-color: #142c41;
    box-shadow: inset -12px -8px 25px #0009;
}
.projects-page .obs-category-core small {
    color: #e1f7ff;
}
@media (hover: hover) and (pointer: fine) {
    .projects-page .observatory {
        cursor:
            url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cg%20stroke%3D%22%23091321%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20fill%3D%22%239ab9ce%22%20d%3D%22M7%2016h6v11H7z%22%2F%3E%3Cpath%20fill%3D%22%23eef6ff%22%20d%3D%22M12%2018h11l2%209-4%202-4-5-3%206-4-2z%22%2F%3E%3Cpath%20fill%3D%22%23eef6ff%22%20d%3D%22m11%2018-6%204%201%203%208-4m8-4%206%205-2%203-6-5%22%2F%3E%3Cellipse%20fill%3D%22%23edf6ff%22%20cx%3D%2217%22%20cy%3D%2211%22%20rx%3D%229%22%20ry%3D%229%22%2F%3E%3Cpath%20fill%3D%22%23244c68%22%20d%3D%22M11%208q6-5%2012%200v7q-6%204-12%200z%22%2F%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23a3efee%22%20d%3D%22m14%208%205-1%22%2F%3E%3Crect%20fill%3D%22%23a5d7e5%22%20x%3D%2215%22%20y%3D%2221%22%20width%3D%226%22%20height%3D%224%22%20rx%3D%221%22%2F%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23eac37c%22%20d%3D%22M9%2025q-7%205-6-2%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E')
                16 11,
            auto;
    }
    .projects-page .observatory button,
    .projects-page .observatory a {
        cursor:
            url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cg%20stroke%3D%22%23091321%22%20stroke-width%3D%221.4%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20fill%3D%22%239ab9ce%22%20d%3D%22M7%2016h6v11H7z%22%2F%3E%3Cpath%20fill%3D%22%23eef6ff%22%20d%3D%22M12%2018h11l2%209-4%202-4-5-3%206-4-2z%22%2F%3E%3Cpath%20fill%3D%22%23eef6ff%22%20d%3D%22m11%2018-6%204%201%203%208-4m8-4%206%205-2%203-6-5%22%2F%3E%3Cellipse%20fill%3D%22%23edf6ff%22%20cx%3D%2217%22%20cy%3D%2211%22%20rx%3D%229%22%20ry%3D%229%22%2F%3E%3Cpath%20fill%3D%22%23376c77%22%20d%3D%22M11%208q6-5%2012%200v7q-6%204-12%200z%22%2F%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23ffe08a%22%20d%3D%22m14%208%205-1%22%2F%3E%3Crect%20fill%3D%22%23a5d7e5%22%20x%3D%2215%22%20y%3D%2221%22%20width%3D%226%22%20height%3D%224%22%20rx%3D%221%22%2F%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23eac37c%22%20d%3D%22M9%2025q-7%205-6-2%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E')
                16 11,
            pointer;
    }
    .projects-page .observatory input {
        cursor: text;
    }
}

/* Occasional visitors: decorative, with no pointer or keyboard interaction. */
.obs-space-visitors {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 4;
}
.obs-visitor {
    position: absolute;
    left: -30%;
    opacity: 0;
    display: block;
    width: 72px;
    pointer-events: none;
    will-change: left, top;
}
.obs-visitor svg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 7px #75cbd04d);
}
.obs-visitor-ufo {
    top: 16%;
    width: 72px;
    animation: obs-ufo-flight 38s linear 6s infinite;
}
.obs-visitor-ship {
    top: 75%;
    width: 95px;
    animation: obs-ship-flight 53s linear 20s infinite;
}
.obs-visitor-scout {
    top: 35%;
    width: 43px;
    animation: obs-scout-flight 67s linear 35s infinite;
}
@keyframes obs-ufo-flight {
    0% {
        left: -25%;
        top: 15%;
        opacity: 0;
        transform: rotate(-8deg);
    }
    2% {
        opacity: 0.85;
    }
    6% {
        left: 30%;
        top: 20%;
        transform: rotate(6deg);
    }
    10% {
        left: 75%;
        top: 12%;
        transform: rotate(-6deg);
        opacity: 0.85;
    }
    14% {
        left: 125%;
        top: 18%;
        opacity: 0;
        transform: rotate(4deg);
    }
    100% {
        left: 125%;
        top: 18%;
        opacity: 0;
    }
}
@keyframes obs-ship-flight {
    0% {
        left: -30%;
        top: 78%;
        opacity: 0;
        transform: rotate(-14deg);
    }
    1% {
        opacity: 0.8;
    }
    7% {
        left: 125%;
        top: 44%;
        opacity: 0;
        transform: rotate(-14deg);
    }
    100% {
        left: 125%;
        top: 44%;
        opacity: 0;
    }
}
@keyframes obs-scout-flight {
    0% {
        left: 125%;
        top: 32%;
        opacity: 0;
        transform: rotate(12deg);
    }
    2% {
        opacity: 0.6;
    }
    8% {
        left: 55%;
        top: 48%;
        transform: rotate(-10deg);
    }
    16% {
        left: -25%;
        top: 25%;
        opacity: 0;
        transform: rotate(8deg);
    }
    100% {
        left: -25%;
        top: 25%;
        opacity: 0;
    }
}
@media (max-width: 430px) {
    .obs-visitor-ufo {
        width: 54px;
    }
    .obs-visitor-ship {
        width: 75px;
    }
    .obs-visitor-scout {
        width: 34px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .obs-space-visitors {
        display: none;
    }
}

/* Shared signature and digital identity across the portfolio. */
body .navbar[aria-label='Main navigation'] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    padding: 15px 28px;
}
.navbar .nav-signature {
    justify-self: start;
    min-width: 0;
    color: #e4f4ef;
    font-family: 'Allura', 'Brush Script MT', cursive;
    font-size: 30px;
    font-weight: 400;
    line-height: 1.15;
    text-decoration: none;
    white-space: nowrap;
    text-shadow: 0 2px 12px #83dac91a;
}
.navbar .nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}
.navbar .nav-digital-life {
    justify-self: end;
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 2.5px;
    white-space: nowrap;
    color: #8debdc;
    text-shadow: 0 0 16px #63d7df33;
}
.navbar .nav-digital-life::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    background: #8debdc;
    box-shadow: 0 0 9px #8debdc66;
}
@media (max-width: 1200px) {
    body .navbar[aria-label='Main navigation'] {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px 18px;
        padding: 14px 20px;
    }
    .navbar .nav-signature {
        font-size: 29px;
    }
    .navbar .nav-menu {
        grid-row: 2;
        grid-column: 1/-1;
    }
    .navbar .nav-digital-life {
        grid-row: 1;
        grid-column: 2;
        font-size: 13px;
    }
}
@media (max-width: 540px) {
    body .navbar[aria-label='Main navigation'] {
        padding: 12px 10px;
        gap: 12px 8px;
    }
    .navbar .nav-signature {
        font-size: clamp(19px, 4.9vw, 26px);
        white-space: normal;
    }
    .navbar .nav-digital-life {
        font-size: 10px;
        letter-spacing: 1px;
    }
    .navbar .nav-digital-life::before {
        width: 4px;
        height: 4px;
        margin-right: 5px;
    }
    .navbar .nav-menu {
        gap: 2px;
    }
    body .navbar .nav-menu .nav-btn {
        padding: 9px 10px;
        font-size: 11px;
    }
}

.navbar .nav-digital-life {
    color: #8debdc;
    animation: digital-life-neon 7s ease-in-out infinite;
}
@keyframes digital-life-neon {
    0%,
    100% {
        color: #80fff0;
        text-shadow:
            0 0 8px #43e8cf88,
            0 0 22px #43e8cf44;
    }
    33% {
        color: #f6a4ff;
        text-shadow:
            0 0 8px #ed65ff88,
            0 0 22px #ed65ff44;
    }
    66% {
        color: #a6bcff;
        text-shadow:
            0 0 8px #708aff88,
            0 0 22px #708aff44;
    }
}
body footer .tesla-reflection {
    max-width: 740px;
    margin: 24px auto 0;
    padding: 20px 16px 0;
    border-top: 1px solid #7e9aac33;
    text-align: center;
}
body footer .tesla-reflection blockquote {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
}
body footer .tesla-reflection blockquote p {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.8;
    color: #c6d9e5;
}
body footer .tesla-reflection figcaption {
    margin-top: 10px;
    font-size: 11px;
    color: #92aabd;
}
body footer .tesla-reflection a {
    color: #91dfd2;
    text-decoration: underline;
    text-underline-offset: 4px;
}
body footer .tesla-reflection .tesla-history {
    display: inline-block;
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.7;
}
@media (prefers-reduced-motion: reduce) {
    .navbar .nav-digital-life {
        animation: none;
    }
}

/* Keep the existing footer centered; place the reflection in its own corner. */
body footer {
    position: relative;
    padding-bottom: 145px;
}
body footer .tesla-reflection {
    position: absolute;
    right: 22px;
    bottom: 14px;
    width: min(300px, calc(100% - 44px));
    max-width: 300px;
    margin: 0;
    padding: 0;
    border: 0;
    text-align: right;
}
body footer .tesla-reflection blockquote p {
    margin: 0;
    font-size: 11px;
    line-height: 1.6;
    color: #91a6b8;
}
body footer .tesla-reflection figcaption {
    margin-top: 5px;
    font-size: 9px;
    line-height: 1.5;
}
body footer .tesla-reflection .tesla-history {
    margin-top: 5px;
    font-size: 9px;
    line-height: 1.5;
}
body footer .tesla-reflection a {
    color: #83b4b0;
    text-underline-offset: 2px;
}
@media (max-width: 540px) {
    body footer {
        padding-bottom: 150px;
    }
    body footer .tesla-reflection {
        right: 16px;
        width: min(280px, calc(100% - 32px));
    }
}

.projects-page .hero-model-wrap {
    position: relative;
    align-self: flex-end;
    flex: 0 0 300px;
    width: 300px;
    height: 320px;
    margin-right: -36px;
    margin-bottom: -48px;
}
.projects-page .hero-model-wrap model-viewer {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    --poster-color: transparent;
}
.projects-page .hero-model-status {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 24px;
    text-align: center;
    font-size: 12px;
    color: #aebed3;
    pointer-events: none;
}
.projects-page .hero-model-status[hidden] {
    display: none;
}
@media (max-width: 800px) {
    .projects-page .hero-model-wrap {
        flex-basis: 200px;
        width: 200px;
        height: 250px;
        margin-right: -18px;
        margin-bottom: -26px;
    }
}
@media (max-width: 520px) {
    .projects-page .hero-layout {
        flex-wrap: wrap;
    }
    .projects-page .hero-model-wrap {
        flex: 0 0 180px;
        width: 180px;
        height: 210px;
        margin: -8px -14px -24px auto;
    }
}

.projects-page .hero-stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.projects-page .hero-star {
    position: absolute;
    right: var(--x);
    top: var(--y);
    width: var(--size);
    height: var(--size);
    opacity: 0;
    background: #fff6ce;
    clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%);
    filter: drop-shadow(0 0 5px #96ecff);
    animation: fantasy-star var(--duration) linear var(--delay) infinite;
}
@keyframes fantasy-star {
    0% {
        transform: translate(0, 0) scale(0.35);
        opacity: 0;
    }
    12% {
        opacity: 0.8;
    }
    72% {
        opacity: 0.65;
    }
    100% {
        transform: translate(-40vw, 85px) scale(1);
        opacity: 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .projects-page .hero-star {
        animation: none;
        opacity: 0.35;
    }
}

/* ==========================================================================
   Galaxy v2: elliptical orbits, ringed planets, asteroid belt, planet zoom.
   Worlds and satellites are positioned with transforms from js/projects.js.
   ========================================================================== */
.obs-map #mapNodes {
    position: absolute;
    inset: 0;
}
.obs-orbit-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: opacity 0.6s;
}
.obs-belt {
    position: absolute;
    left: 50%;
    top: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%) rotate(-14deg) scaleY(0.6);
    transition: opacity 0.6s;
}
.obs-belt canvas {
    display: block;
    width: 100%;
    height: 100%;
    animation: obs-belt-spin 420s linear infinite;
}
@keyframes obs-belt-spin {
    to {
        transform: rotate(360deg);
    }
}
.obs-map .obs-world {
    left: 0;
    top: 0;
    width: var(--globe-size, 78px);
    height: var(--globe-size, 78px);
    display: block;
    z-index: 5;
    transition: opacity 0.5s;
}
.obs-map .obs-world .obs-globe {
    width: 100%;
    height: 100%;
}
.obs-map.obs-zooming .obs-world {
    transition:
        transform 0.95s cubic-bezier(0.55, 0.05, 0.2, 1),
        width 0.95s cubic-bezier(0.55, 0.05, 0.2, 1),
        height 0.95s cubic-bezier(0.55, 0.05, 0.2, 1),
        opacity 0.5s;
}
.obs-map.obs-snap .obs-world,
.obs-map.obs-snap .obs-world * {
    transition: none !important;
}
.obs-map .obs-world-label,
.obs-map .obs-world-count {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    transition: opacity 0.3s;
}
.obs-map .obs-world-label {
    top: calc(100% + 8px);
    margin: 0;
}
.obs-map .obs-world-count {
    top: calc(100% + 27px);
    margin: 0;
}
.obs-world.is-away {
    opacity: 0;
    pointer-events: none;
}
.obs-world.is-focus {
    z-index: 4;
    cursor: default;
}
.obs-world.is-focus .obs-world-label,
.obs-world.is-focus .obs-world-count {
    opacity: 0;
}
.obs-world.is-focus .obs-surface {
    animation: none;
}
.obs-world.is-focus .obs-globe {
    box-shadow:
        0 0 60px color-mix(in srgb, var(--world-color) 35%, transparent),
        0 0 140px color-mix(in srgb, var(--world-color) 18%, transparent);
    filter: none;
}
/* only the worlds flagged with a ring get one */
.obs-world:nth-of-type(even):not(.has-ring) .obs-globe::before {
    content: none;
}
.obs-world.has-ring .obs-globe::before {
    content: '';
    position: absolute;
    inset: 33% -44%;
    border: 3px solid color-mix(in srgb, var(--world-color) 75%, #fff);
    border-radius: 50%;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--world-color) 22%, transparent);
    transform: rotate(-24deg);
    opacity: 0.8;
}
.obs-world.is-focus .obs-globe::before {
    opacity: 0;
}
.observatory.obs-focus .obs-core,
.observatory.obs-focus .obs-belt,
.observatory.obs-focus .obs-orbit-canvas,
.observatory.obs-focus .obs-space-visitors,
.observatory.obs-focus .obs-coordinate {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s;
}
.obs-core {
    transition: opacity 0.6s;
}

/* places on a planet (pins) and projects that orbit it (moons) */
.obs-focus-layer {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}
.obs-focus-layer.is-ready {
    opacity: 1;
}
.obs-pin,
.obs-moon {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 8;
    padding: 0;
    border: 0;
    background: transparent;
    color: #e8f6ff;
    pointer-events: auto;
}
.obs-pin i {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--obs-accent, #8debdc);
    box-shadow:
        0 0 0 4px #8debdc33,
        0 0 16px var(--obs-accent, #8debdc);
    transition: transform 0.2s;
    animation: obs-pin-pulse 2.6s ease-out infinite;
}
.obs-pin:hover i,
.obs-pin:focus-visible i,
.obs-pin[aria-pressed='true'] i {
    transform: scale(1.4);
}
.obs-pin[aria-pressed='true'] i {
    background: #fff;
}
@keyframes obs-pin-pulse {
    0% {
        box-shadow:
            0 0 0 0 #8debdc88,
            0 0 14px var(--obs-accent, #8debdc);
    }
    100% {
        box-shadow:
            0 0 0 14px #8debdc00,
            0 0 14px var(--obs-accent, #8debdc);
    }
}
.obs-moon img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--obs-accent, #8debdc);
    background: #14283e;
    box-shadow: 0 5px 16px #000a;
    transition: transform 0.2s;
}
.obs-moon:hover img,
.obs-moon:focus-visible img,
.obs-moon[aria-pressed='true'] img {
    transform: scale(1.18);
    box-shadow: 0 0 22px var(--obs-accent, #8debdc);
}
.obs-pin-label {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    padding: 4px 9px;
    border: 1px solid #8debdc55;
    border-radius: 7px;
    background: #08121fe6;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition:
        opacity 0.2s,
        transform 0.2s;
    pointer-events: none;
}
.obs-pin:hover .obs-pin-label,
.obs-pin:focus-visible .obs-pin-label,
.obs-pin[aria-pressed='true'] .obs-pin-label,
.obs-moon:hover .obs-pin-label,
.obs-moon:focus-visible .obs-pin-label,
.obs-moon[aria-pressed='true'] .obs-pin-label {
    opacity: 1;
    transform: translate(-50%, 0);
}
.obs-pin:focus-visible,
.obs-moon:focus-visible,
.obs-back:focus-visible,
.obs-music:focus-visible {
    outline: 2px solid #f6a4ff;
    outline-offset: 4px;
}
.obs-place {
    margin: 4px 0 10px;
    font-size: 12px;
    color: #8debdc;
}

/* back button + music toggle */
.obs-back,
.obs-music {
    position: absolute;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border: 1px solid #8debdc55;
    border-radius: 999px;
    background: #08121fcc;
    color: #cfeee9;
    font: 500 11px/1 'DM Sans', sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.obs-back {
    left: 22px;
    top: 44px;
}
.obs-back[hidden] {
    display: none;
}
.obs-music {
    right: 18px;
    bottom: 16px;
    max-width: calc(100% - 36px);
}
.obs-music span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.obs-music i::before {
    content: '♪';
    font-style: normal;
    color: #8995a3;
}
.obs-music.is-on i::before {
    color: #8debdc;
    display: inline-block;
    animation: obs-note 1.2s ease-in-out infinite;
}
@keyframes obs-note {
    50% {
        transform: translateY(-3px) scale(1.2);
    }
}
.obs-back:hover,
.obs-music:hover {
    border-color: #8debdc;
    color: #fff;
}
@media (max-width: 760px) {
    .obs-pin i {
        width: 14px;
        height: 14px;
    }
    .obs-moon img {
        width: 34px;
        height: 34px;
    }
    .obs-back {
        left: 12px;
        top: 38px;
    }
    .obs-music {
        right: 10px;
        bottom: 10px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .obs-belt canvas,
    .obs-pin i,
    .obs-music.is-on i::before {
        animation: none !important;
    }
    .obs-map.obs-zooming .obs-world {
        transition: opacity 0.2s;
    }
}

/* ==========================================================================
   3D planets (relief + moving shadow) and a proper sun.
   ========================================================================== */
.obs-surface {
    background-blend-mode: overlay;
    background-size: 200% 100%;
    background-repeat: repeat-x;
    opacity: 1;
}
.obs-map .obs-world .obs-globe {
    border: 0;
    overflow: visible;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--world-color) 40%, transparent),
        0 0 26px color-mix(in srgb, var(--world-color) 22%, transparent);
}
/* highlight + terminator + limb darkening, steered by --hx/--hy (set from the sun's direction) */
.obs-map .obs-world .obs-globe::after {
    background:
        radial-gradient(circle at var(--hx, 30%) var(--hy, 26%), #ffffff55 0, #ffffff1a 9%, transparent 26%),
        radial-gradient(circle at var(--hx, 30%) var(--hy, 26%), transparent 30%, #0006 56%, #000d 84%, #000f 100%);
    box-shadow:
        inset 0 0 calc(var(--globe-size, 78px) * 0.07) 1px color-mix(in srgb, var(--world-color) 55%, transparent),
        inset calc(var(--globe-size, 78px) * -0.06) calc(var(--globe-size, 78px) * -0.05) calc(var(--globe-size, 78px) * 0.16) #000b;
}
.obs-map .obs-world.is-focus .obs-globe::after {
    box-shadow:
        inset 0 0 40px 2px color-mix(in srgb, var(--world-color) 40%, transparent),
        inset -60px -50px 120px #000c;
}

/* the sun: bright surface, pulsing corona, turning rays and flickering prominences */
.obs-core {
    background: radial-gradient(circle at 50% 50%, #fff3b0 0, #ffc34d 38%, #f0781f 72%, #b83a0c 100%);
    border: 0;
    box-shadow:
        0 0 40px 10px #ffb34766,
        0 0 110px 30px #ff7a1a33;
    overflow: visible;
}
.obs-core::before {
    inset: -7px;
    border: 1px solid #ffd58a33;
}
.obs-core::after {
    inset: -16px;
    border: 1px dashed #ffb35f22;
}
.obs-sun-surface {
    z-index: 0;
    background-image:
        radial-gradient(circle at 50% 50%, #fff4b800 40%, #8f2a0599 100%),
        linear-gradient(125deg, #ffe08a30, #7f230055),
        url('../../assets/images/planets/planet_texture.jpg');
    background-blend-mode: normal, normal, soft-light;
    box-shadow:
        inset 0 0 22px #ffeaa8aa,
        inset -8px -5px 22px #6a1c0888;
}
.obs-core > small,
.obs-core > strong {
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 8px #5a1a05;
    color: #fff8e6;
}
.obs-sun-corona,
.obs-sun-rays {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.obs-sun-corona {
    inset: -58px;
    z-index: -2;
    background: radial-gradient(circle, #ffd88a99 0 34%, #ff9433 44%, #ff6a1a22 56%, transparent 70%);
    animation: obs-corona 5.5s ease-in-out infinite;
}
.obs-sun-rays {
    inset: -105px;
    z-index: -3;
    background: repeating-conic-gradient(from 0deg, #ffdf9a55 0 1.6deg, transparent 1.6deg 14deg);
    -webkit-mask: radial-gradient(circle, transparent 0 24%, #000 30%, transparent 68%);
    mask: radial-gradient(circle, transparent 0 24%, #000 30%, transparent 68%);
    animation: obs-turn 90s linear infinite;
}
.obs-sun-rays-b {
    inset: -80px;
    background: repeating-conic-gradient(from 8deg, #ff9d4a50 0 1deg, transparent 1deg 9.5deg);
    animation-duration: 60s;
    animation-direction: reverse;
}
.obs-sun-flare {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    transform: rotate(var(--a, 0deg));
}
.obs-sun-flare i {
    position: absolute;
    left: 50%;
    top: -26px;
    width: 52px;
    height: 34px;
    margin-left: -26px;
    border: 4px solid #ffc15ccc;
    border-bottom: 0;
    border-radius: 52px 52px 0 0;
    filter: blur(0.6px) drop-shadow(0 0 7px #ff8a2e);
    transform-origin: 50% 100%;
    animation: obs-flare 4.2s ease-in-out infinite;
    animation-delay: var(--d, 0s);
}
@keyframes obs-corona {
    50% {
        transform: scale(1.08);
        opacity: 0.8;
    }
}
@keyframes obs-flare {
    0%,
    100% {
        transform: scale(0.55, 0.35);
        opacity: 0.25;
    }
    45% {
        transform: scale(1.1, 1);
        opacity: 1;
    }
}
.observatory.obs-focus .obs-core *,
.observatory.obs-focus .obs-core::before,
.observatory.obs-focus .obs-core::after {
    animation-play-state: paused !important;
}
@media (max-width: 760px) {
    .obs-sun-rays {
        inset: -70px;
    }
    .obs-sun-corona {
        inset: -40px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .obs-sun-corona,
    .obs-sun-rays,
    .obs-sun-flare i {
        animation: none !important;
    }
}

/* Galaxy effects (js/galaxy-fx.js): twinkling stars and particle serpent flares. */
.obs-twinkle {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.obs-map.obs-fx #starCanvas,
.obs-map.obs-fx .obs-sun-flare {
    display: none;
}
.obs-flare-canvas {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: -1;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ===== 3D skin (js/galaxy3d.js): desktop only. The DOM stays; its painted surfaces step aside. ===== */
.obs-gl {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.obs-map.obs-gl-on .obs-world .obs-surface,
.obs-map.obs-gl-on .obs-world .obs-globe::after,
.obs-map.obs-gl-on .obs-world.has-ring .obs-globe::before {
    display: none;
}
.obs-map.obs-gl-on .obs-world .obs-globe {
    background: none;
    box-shadow: 0 0 26px color-mix(in srgb, var(--world-color) 22%, transparent);
}
.obs-map.obs-gl-on .obs-world.is-focus .obs-globe {
    box-shadow:
        0 0 60px color-mix(in srgb, var(--world-color) 28%, transparent),
        0 0 140px color-mix(in srgb, var(--world-color) 14%, transparent);
}
.obs-sun-gl {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    pointer-events: none;
}
.obs-core.obs-sun-3d {
    background: none;
}
.obs-core.obs-sun-3d .obs-sun-surface {
    display: none;
}
.obs-map.obs-gl-on .obs-moon img {
    opacity: 0;
}
.obs-map.obs-gl-on .obs-moon::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 21px;
    width: 50px;
    height: 50px;
    border: 2px solid var(--obs-accent, #8debdc);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition:
        opacity 0.2s,
        transform 0.2s;
    pointer-events: none;
}
.obs-map.obs-gl-on .obs-moon:hover::before,
.obs-map.obs-gl-on .obs-moon:focus-visible::before,
.obs-map.obs-gl-on .obs-moon[aria-pressed='true']::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
