:root {
    --bg: #0b0d10;
    --bg-elev: #11151a;
    --text: #e8edf2;
    --subtle: #9aa6b2;
    --accent: #86b7ff;
    --accent-2: #9ef0ff;
    --card: #12161c;
    --card-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5)
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, system-ui, sans-serif;
    color: var(--text);
    background: var(--bg) center / cover fixed no-repeat;
    background-image: url(images/bg.webp)
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgb(0 0 0 / .35), rgb(0 0 0 / .45));
    pointer-events: none
}

.scene {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 1.875em;
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center
}

.sphere {
    position: relative;
    width: min(95vmin, 1100px);
    height: min(95vmin, 1100px);
    transform-style: preserve-3d;
    will-change: transform
}

.core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    line-height: 1.15;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen
}

.core__hello {
    display: block;
    font-weight: 700;
    font-size: clamp(0.875rem, 2.5vmin, 1.25rem);
    letter-spacing: .06em;
    color: var(--accent-2);
    text-shadow: 0 2px 12px rgb(158 240 255 / .35)
}

.core__name {
    display: block;
    font-weight: 800;
    font-size: clamp(1.25rem, 4.2vmin, 2.5rem);
    line-height: 120%;
    letter-spacing: .01em;
    color: var(--accent);
    text-shadow: 0 3px 18px rgb(134 183 255 / .35)
}

.core__profession {
    display: block;
    font-weight: 600;
    font-size: clamp(0.875rem, 2.8vmin, 1.25rem);
    letter-spacing: .02em;
    color: var(--accent-2);
    text-shadow: 0 2px 12px rgb(158 240 255 / .3)
}

.core__contacts {
    margin-top: 1.25em;
    pointer-events: auto
}

.core__contacts-label {
    display: block;
    margin-bottom: .75em;
    font-weight: 600;
    font-size: clamp(0.875rem, 2.2vmin, 1.25rem);
    letter-spacing: .04em;
    color: var(--subtle);
    text-shadow: 0 1px 8px rgb(154 166 178 / .25)
}

.core__contacts-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: rgb(134 183 255 / .15);
    border: 1px solid rgb(134 183 255 / .3);
    color: var(--accent);
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgb(0 0 0 / .2)
}

.contact-icon:hover,
.contact-icon:focus-visible {
    background: rgb(134 183 255 / .25);
    border-color: var(--accent);
    color: var(--accent-2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgb(134 183 255 / .3)
}

.contact-icon svg {
    width: 1.25rem;
    height: 1.25rem
}

@media (prefers-reduced-motion:reduce) {
    .sphere {
        animation: none
    }
}

.node {
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
    width: 0;
    height: 0;
    opacity: 1;
    transform: scale(1);
    transition: opacity 1.5s ease, transform 1s ease
}

.node.hidden {
    opacity: 0;
    transform: scale(.5);
    transition: opacity 1.5s ease, transform 1s ease
}

.tag,
.card {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    color: var(--text);
    text-shadow: 0 1px 0 rgb(0 0 0 / .35);
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    transform-origin: center center;
    will-change: transform, opacity
}

.tag {
    font-size: clamp(0.75rem, 1.1vw, 1rem);
    opacity: .95;
    pointer-events: none
}

.card {
    cursor: pointer;
    border-radius: .75em;
    background: rgb(134 183 255 / .2);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(6px) saturate(1.1);
    backdrop-filter: blur(6px) saturate(1.1);
    pointer-events: auto;
    z-index: 1
}

.card img {
    width: 6.25rem;
    object-fit: contain;
    filter: saturate(.9) brightness(1.1)
}

.node[data-depth] {
    opacity: .9
}

.card:focus-visible,
.card:hover {
    outline: none;
    border-color: color-mix(in oklab, var(--accent) 70%, white 30%);
    box-shadow: 0 0 0 2px rgb(134 183 255 / .25), var(--shadow)
}

.modal {
    position: fixed;
    inset: 0;
    display: none
}

.modal[aria-hidden="false"] {
    display: block
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / .6);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px)
}

.modal__dialog {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 86%;
    max-width: 68.75rem;
    height: 60%;
    background: var(--bg-elev);
    border: 1px solid var(--card-border);
    border-radius: 1em;
    box-shadow: var(--shadow);
    padding: 1.25em;
    color: var(--text);
    transform: translateY(.625em);
    animation: modal-in 250ms ease-out both
}

.modal__layout {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "preview content";
    gap: 1.5rem
}

.modal__preview {
    grid-area: preview;
    position: relative;
    overflow: hidden;
    border-radius: .75em;
    border: 1px solid var(--card-border)
}

.modal__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block
}

.modal__content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    min-width: 0
}

.modal__title {
    margin: 0 0 .625em 0;
    font-size: clamp(1.125rem, 2.5vw, 2rem);
    letter-spacing: .05em
}

.modal__body {
    color: var(--subtle);
    line-height: 1.6;
    font-size: .9375rem
}

.modal__body span {
    font-size: .9375rem;
    color: var(--accent)
}

.modal__body ul {
    list-style: none;
    padding-left: 0
}

.modal__body ul li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: .375em
}

.modal__body ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--subtle);
    font-weight: 500;
    font-size: 1rem
}

.modal__cta {
    align-self: flex-start;
    margin-top: 1em;
    padding: .75em 1.125em;
    border-radius: .75em;
    border: 1px solid rgb(134 183 255 / .6);
    background: linear-gradient(180deg, rgb(134 183 255 / .25), rgb(134 183 255 / .12));
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .02em;
    position: relative;
    transition: all .3s ease
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(1.25em)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.modal__close {
    position: absolute;
    top: .5em;
    right: .625em;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    background: #fff0;
    color: var(--text);
    cursor: pointer;
    font-size: 1.625rem;
    transition: all .3s ease
}

.modal__cta:hover,
.modal__cta:focus-visible,
.modal__close:hover,
.modal__close:focus-visible {
    color: var(--accent)
}

.modal__cta:hover,
.modal__cta:focus-visible {
    border: 1px solid var(--accent)
}

@media (max-width:900px) {
    .sphere {
        animation-duration: 26s
    }
}

@media (max-width:820px) {
    .modal__layout {
        grid-template-columns: 1fr;
        height: auto;
        grid-template-areas: "title" "preview" "cta" "content";
        gap: 1rem
    }

    .modal__content {
        display: contents
    }

    .modal__title {
        grid-area: title;
        margin: 0
    }

    .modal__dialog {
        height: auto;
        max-height: 80vh;
        overflow: auto;
        -webkit-overflow-scrolling: touch
    }

    .modal__dialog::-webkit-scrollbar,
    .modal__dialog::-webkit-scrollbar-track,
    .modal__dialog::-webkit-scrollbar-thumb {
        background-color: #fff0;
        width: .0625em
    }

    .modal__preview {
        height: clamp(13.75rem, 38vh, 21rem)
    }

    .modal__cta {
        grid-area: cta;
        justify-self: start;
        width: 100%;
        text-align: center
    }
}

@media (max-width:600px) {
    .tag {
        font-size: clamp(0.75rem, 3.4vw, 1rem)
    }

    .card {
        font-size: clamp(0.75rem, 3.8vw, 1rem)
    }

    .card img {
        width: 3.125rem
    }
}

@media (max-width:550px) {
    .scene {
        height: 100%;
        min-height: 95vh;
        padding: 1.25em 1em
    }

    .sphere {
        position: relative;
        width: 90vw;
        height: 90vh;
        margin: 1.875em auto 2.5em;
        flex: 1
    }

    .core {
        top: 0%;
        left: 0%;
        transform: none;
        width: 100%;
        mix-blend-mode: normal
    }

    .core__hello,
    .core__name,
    .core__profession {
        display: block;
        text-align: center
    }

    .core__hello {
        font-size: clamp(1rem, 4.2vw, 2rem);
        margin-bottom: .25em
    }

    .core__name {
        font-size: clamp(2rem, 6.5vw, 3rem);
        margin-bottom: .5em
    }

    .core__profession {
        font-size: clamp(1.125rem, 4.2vw, 1.5rem);
        margin: 0
    }

    .core__contacts {
        position: fixed;
        bottom: 2em;
        left: 0;
        right: 0;
        margin-top: 0;
        padding: 0 1em .625em;
        z-index: 10
    }

    .core__contacts-label {
        font-size: clamp(1rem, 4vw, 1.275rem);
        margin-bottom: 1em
    }

    .core__contacts-links {
        gap: 1.25em
    }

    .contact-icon {
        width: 2.375rem;
        height: 2.375rem
    }

    .contact-icon svg {
        width: 1.125rem;
        height: 1.125rem
    }

    .modal__dialog {
        padding: 1.25em .9375em
    }

    .modal__close {
        top: .25em;
        right: 0;
        width: 1.875em;
        height: 1.875em
    }

    .tag {
        font-size: clamp(0.625rem, 2.8vw, 0.875rem)
    }

    .card {
        font-size: clamp(0.6875rem, 3.2vw, 0.9375rem)
    }
}