/* ============================================================
   VESPER — a living interface
   Scroll-driven WebGL landing page. Layout is a 1440x800
   artboard scaled proportionally: every desktop measurement
   is the artboard pixel value / 14.4, expressed in vw.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
    --background: #170a2b;
    --foreground: #fdfdfd;
    --void: #170a2b;
    --chalk: #fdfdfd;
    --signal: #6cf3a3;
    --surface: #100823;
    --surface-raised: #17102e;
    --font-display: 'General Sans', system-ui, -apple-system, sans-serif;
    --font-tag: 'Mulish', system-ui, -apple-system, sans-serif;
}

/* ---------- root ladder ---------- */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 1920px) {
    html {
        font-size: 0.833333vw;
    }
}

@media (max-width: 1440px) {
    html {
        font-size: 1.111111vw;
    }
}

@media (max-width: 1023.98px) {
    html {
        font-size: 16px;
    }
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: clip;
    margin: 0;
    padding: 0;
}

body {
    background: var(--background);
    color: var(--foreground);
    overscroll-behavior-y: none;
    font-family: var(--font-display);
    font-weight: 400;
}

    body::-webkit-scrollbar {
        width: 0;
    }

img {
    display: block;
    max-width: 100%;
}

button, input {
    font: inherit;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 4px;
}

/* Blazor plumbing must never paint over the scene. */
#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
    padding: 0.6rem 1.25rem;
    background: #ffe6b3;
    color: #000;
    font-family: var(--font-tag);
    font-size: 0.875rem;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        float: right;
    }

/* ---------- text reveal scaffolding ---------- */
.split {
    display: flex;
    flex-wrap: wrap;
    column-gap: 0.25em;
}

.split--center {
    justify-content: center;
}

.split--end {
    justify-content: flex-end;
}

.split-word {
    display: inline-flex;
    white-space: pre;
}

.split-char,
.split-word > span {
    display: inline-block;
    will-change: opacity, filter, transform;
}

/* ============================================================
   CANVAS
   ============================================================ */
.v-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

/* ============================================================
   LOADER
   ============================================================ */
.v-loader {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: #000;
    color: var(--chalk);
    font-family: var(--font-tag);
    font-size: 1.111vw;
    text-transform: uppercase;
    will-change: opacity, transform;
}

.v-loader__stars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.v-loader__mark {
    position: absolute;
    top: 0;
    left: 0;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35em;
    letter-spacing: 0.04em;
}

.v-loader__sub {
    opacity: 0.35;
}

.v-loader__bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem 1.5rem;
}

.v-loader__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.v-loader__status {
    font-size: 0.972vw;
    opacity: 0.4;
    letter-spacing: 0.06em;
}

.v-loader__count {
    display: flex;
    align-items: baseline;
}

.v-loader__num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
    opacity: 0.8;
}

.v-loader__pct {
    opacity: 0.35;
}

.v-loader__track {
    position: relative;
    height: 1px;
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
}

.v-loader__bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: #fff;
    transition: width 220ms cubic-bezier(0.33, 1, 0.68, 1);
}

@media (max-width: 1023.98px) {
    .v-loader {
        font-size: 0.8125rem;
    }

    .v-loader__status {
        font-size: 0.75rem;
    }
}

/* ============================================================
   FIXED SCENE OVERLAYS
   ============================================================ */
.v-overlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    will-change: opacity;
}

.v-next {
    position: absolute;
    left: auto;
    right: 2.5rem;
    z-index: 2;
    width: 3.25rem;
    height: 3.25rem;
    padding: 0;
    border: 2px solid rgba(45, 45, 48, 0.65);
    border-radius: 50%;
    background: rgba(45, 45, 48, 0.28);
    box-shadow: 0 0 0 0 rgba(45, 45, 48, 0.3);
    cursor: pointer;
    pointer-events: auto;
    animation: v-next-pulse 1.8s ease-in-out infinite;
}

.v-next span {
    position: absolute;
    top: 42%;
    left: 50%;
    width: 0.65rem;
    height: 0.65rem;
    border-right: 4px solid #fff;
    border-bottom: 4px solid #fff;
    transform: translate(-50%, -50%) rotate(45deg);
}

.v-next--hero {
    bottom: 1.5rem;
}

.v-next--galaxy {
    bottom: 1.5rem;
}

.v-next--brain {
    bottom: 1.5rem;
}

@keyframes v-next-pulse {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 0 0 0 rgba(45, 45, 48, 0.3);
    }

    50% {
        transform: translateY(0.4rem);
        box-shadow: 0 0 0 0.45rem rgba(45, 45, 48, 0);
    }
}

.v-display {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 5.556vw;
    line-height: 0.9;
    letter-spacing: -0.01em;
}

.v-tag {
    margin: 0;
    font-family: var(--font-tag);
    font-weight: 400;
    font-size: 1.111vw;
    line-height: 1.2;
    text-transform: uppercase;
}

.v-body {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.111vw;
    line-height: 1.2;
}

/* ---------- hero overlay ---------- */
.v-hero__identity {
    position: absolute;
    top: 2vw;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 3.334vw);
}

.v-hero__title {
    width: 100%;
    font-size: 4.722vw;
}

.v-hero__profession,
.v-hero__role {
    margin: 0;
    font-family: var(--font-tag);
    font-size: 1vw;
    line-height: 1.2;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.v-hero__profession {
    margin-bottom: 1vw;
    text-align: right;
}

.v-hero__role {
    margin-top: 1.25vw;
    text-align: left;
}

.v-hero__email {
    position: absolute;
    top: 8.4vw;
    left: 0;
    right: 0;
    z-index: 1;
    pointer-events: auto;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1vw;
    color: rgba(255, 255, 255, 0.78);
}

.v-hero__title.split,
.v-hero__title .split {
    justify-content: center;
}

.v-hero__type {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 3.5vw;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--signal);
    min-height: 1.4em;
    font-size: 1.8vw;
}

.v-type__caret {
    display: inline-block;
    width: 0.06em;
    height: 1em;
    margin-left: 0.18em;
    background: currentColor;
    animation: v-caret 1s steps(1, end) infinite;
}

@keyframes v-caret {
    0%, 50% {
        opacity: 1;
    }

    50.01%, 100% {
        opacity: 0;
    }
}

.v-tagrow {
    display: flex;
    align-items: center;
    gap: 1.667vw;
    font-family: var(--font-tag);
    font-size: 1.111vw;
    line-height: 1.2;
    text-transform: uppercase;
}

    .v-tagrow i {
        display: block;
        width: 0.208vw;
        height: 0.208vw;
        min-width: 3px;
        min-height: 3px;
        background: #fff;
    }

/* ---------- galaxy overlay ---------- */
.v-galaxy__title {
    position: absolute;
    top: 7.014vw;
    left: 50%;
    transform: translateX(-50%);
    width: 46.319vw;
    text-align: center;
}

.v-galaxy__title > span {
    display: flex;
    justify-content: center;
    width: 100%;
}

.v-galaxy__cluster {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 16.181vw;
}

.v-galaxy__marquee {
    position: absolute;
    top: 54%;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    font-size: 1.35vw;
    mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

.v-galaxy__marquee-track {
    display: flex;
    width: max-content;
    animation: v-marquee-left 32s linear infinite;
}

.v-galaxy__marquee-group {
    display: flex;
    align-items: center;
    gap: 1.667vw;
    padding-right: 1.667vw;
}

@keyframes v-marquee-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.v-galaxy__rule {
    position: absolute;
    top: 4.792vw;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.v-galaxy__divider {
    position: absolute;
    top: 4.792vw;
    height: 11.389vw;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.v-stat {
    position: absolute;
    top: 8.333vw;
    width: 11.111vw;
    border-left: 1px solid rgba(255, 255, 255, 0.8);
    padding-left: 1.111vw;
    display: flex;
    flex-direction: column;
    gap: 0.833vw;
}

.v-stat__value {
    font-family: var(--font-tag);
    font-weight: 300;
    font-size: 2.222vw;
    line-height: 1;
}

.v-stat__label {
    font-family: var(--font-tag);
    font-weight: 400;
    font-size: 1.111vw;
    line-height: 1.2;
    text-transform: uppercase;
}

.v-galaxy__stackhead {
    display: none;
}

/* ---------- brain overlay ---------- */
.v-brain__title-a {
    position: absolute;
    top: 4vw;
    left: 1.667vw;
    width: 41.875vw;
}

.v-brain__title-b {
    position: absolute;
    right: 1.667vw;
    bottom: 1.667vw;
    width: 40.972vw;
    text-align: right;
}

.v-brain__right {
    position: absolute;
    top: calc(50% + 2.361vw);
    right: 1.667vw;
    width: 14.583vw;
    text-align: right;
}

/* ---------- overlays: below 1024 ---------- */
@media (max-width: 1023.98px) {
    .v-canvas {
        opacity: 1;
    }

    .v-display {
        font-size: 3.5rem;
        line-height: 0.95;
    }

    .v-tag, .v-body, .v-tagrow, .v-stat__label {
        font-size: 1.0625rem;
        line-height: 1.35;
    }

    .v-overlay {
        display: flex;
        flex-direction: column;
        padding: 1.5rem 1.5rem 2rem;
        overflow: hidden;
    }

    .v-next {
        left: auto;
        right: 1.75rem;
        width: 3.75rem;
        height: 3.75rem;
    }

    .v-next--hero,
    .v-next--galaxy,
    .v-next--brain {
        bottom: 1rem;
    }

    .v-hero__title,
    .v-hero__identity,
    .v-hero__type,
    .v-galaxy__title,
    .v-galaxy__cluster,
    .v-brain__title-a,
    .v-brain__title-b,
    .v-brain__right {
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        height: auto;
        inset: auto;
        text-align: left;
    }

    .v-hero__identity {
        position: absolute;
        top: 0.75rem;
        left: 50%;
        right: auto;
        width: max-content;
        max-width: calc(100% - 3rem);
        transform: translateX(-50%);
    }

    .v-hero__title {
        position: static;
        width: 100%;
        font-size: clamp(2rem, 9vw, 2.625rem);
    }

    .v-hero__profession,
    .v-hero__role {
        position: static;
        width: 100%;
        font-size: 0.7rem;
    }

    .v-hero__profession {
        margin-bottom: 0.75rem;
        text-align: right;
    }

    .v-hero__role {
        margin-top: 1rem;
        text-align: left;
    }

    .v-hero__email {
        top: 8rem;
        font-size: 0.875rem;
    }

    .v-brain__title-a {
        position: absolute;
        top: 1.5rem;
        left: 1.5rem;
        right: 1.5rem;
        width: auto;
    }

    .v-hero__type {
        position: absolute;
        top: auto;
        left: 1.5rem;
        right: 1.5rem;
        bottom: 3.5rem;
        width: auto;
        font-size: clamp(1.25rem, 5vw, 1.5rem);
        font-weight: 400;
        color: var(--signal);
        justify-content: center;
        text-align: center;
    }

    .v-brain__title-b {
        position: absolute;
        left: 1.5rem;
        right: 1.5rem;
        bottom: 2rem;
        width: auto;
        text-align: center;
    }

    .v-brain__title-b.split,
    .v-brain__title-b .split {
        justify-content: center;
    }

    .v-hero__title.split,
    .v-hero__title .split {
        justify-content: center;
    }

    .v-overlay > * {
        margin-bottom: 1.25rem;
    }

    .v-brain__title-b .split {
        justify-content: flex-start;
    }

    .v-galaxy__title .split {
        justify-content: center;
    }

    .v-galaxy__rule,
    .v-galaxy__divider {
        display: none;
    }

    .v-galaxy__stackhead {
        display: block;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 0.5rem;
    }

    .v-galaxy__stats {
        position: absolute;
        left: 1.5rem;
        right: 1.5rem;
        bottom: 2rem;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
        margin-top: 0;
    }

    .v-galaxy__marquee {
        position: absolute;
        left: 0;
        right: 0;
        top: 54%;
        bottom: auto;
        width: 100%;
        font-size: 1.25rem;
    }

    .v-galaxy__marquee-group {
        gap: 1.25rem;
        padding-right: 1.25rem;
    }

    .v-stat {
        position: static;
        width: auto;
        padding-left: 0.75rem;
        gap: 0.375rem;
    }

    .v-stat__value {
        font-size: 1.5rem;
    }

}

@media (max-width: 639.98px) {
    .v-display {
        font-size: clamp(2.625rem, 12vw, 3.25rem);
    }

    .v-galaxy__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============================================================
   IN-FLOW CONTENT
   ============================================================ */
.v-flow {
    position: relative;
    z-index: 10;
}

.v-cardwrap {
    margin: 0 auto;
    width: 96.667vw;
    perspective: 1400px;
}

#about {
    height: 44.167vw;
    margin-bottom: 1.667vw;
}

#about .v-card {
    background: #0f0f10;
    color: #fdfdfd;
}

.v-card {
    position: relative;
    height: 100%;
    width: 100%;
    transform-origin: bottom;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #fff;
    color: #000;
    overflow: hidden;
    will-change: opacity, transform, filter;
}

.v-card__title {
    position: absolute;
    top: 2.222vw;
    left: 2.222vw;
    width: 41.875vw;
}

.v-card__stack {
    position: absolute;
    top: 2.222vw;
    right: 5vw;
    height: 39.722vw;
    width: 27.361vw;
    background: #0f0f10;
    color: #fdfdfd;
    padding: 2.222vw 1.944vw;
    display: flex;
    flex-direction: column;
    will-change: clip-path;
}

.v-card__stack-head {
    font-family: var(--font-tag);
    font-size: 1.111vw;
    line-height: 1.2;
    text-transform: uppercase;
    color: var(--signal);
    margin: 0 0 1.667vw;
}

.v-card__stack ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.v-card__stack li {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.458vw;
    line-height: 1.15;
    padding-bottom: 0.625vw;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

    .v-card__stack li:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

.v-card__copy {
    position: absolute;
    top: 10vw;
    left: 2.222vw;
    width: 43vw;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2.25vw;
}

.v-card__body {
    position: static;
    width: 100%;
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.667vw;
    line-height: 1.35;
}

/* ---------- footer ---------- */
.v-footer {
    padding-top: 4.444vw;
    color: #fff;
}

.v-footer__bottom {
    margin: 0 auto;
    width: 96.667vw;
    padding-bottom: 4.444vw;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25vw;
}

.v-footer__email {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.667vw;
    line-height: 1;
    letter-spacing: -0.01em;
    color: #fff;
    transition: color 260ms cubic-bezier(0.23, 1, 0.32, 1);
}

.v-footer__email:hover {
    color: var(--signal);
}

.v-footer__separator {
    color: rgba(255, 255, 255, 0.35);
}

.v-footer__link {
    font-family: var(--font-display);
    font-size: 1.111vw;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.7);
    transition: color 260ms cubic-bezier(0.23, 1, 0.32, 1);
}

.v-footer__link:hover {
    color: #fff;
}

/* ---------- in-flow: below 1024 ---------- */
@media (max-width: 1023.98px) {
    .v-cardwrap {
        width: calc(100% - 3rem);
    }

    #about {
        height: auto;
        margin-bottom: 1.5rem;
    }

    #about .v-card {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .v-card__title,
    .v-card__stack,
    .v-card__copy,
    .v-card__body {
        position: static;
        width: 100%;
        inset: auto;
    }

    .v-card__copy {
        row-gap: 1.5rem;
    }

    .v-card__stack {
        height: auto;
        padding: 1.5rem;
    }

    .v-card__stack-head {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
    }

    .v-card__stack li {
        font-size: 1.125rem;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .v-card__body {
        font-size: 0.9375rem;
    }

    .v-footer {
        padding-top: 3rem;
    }

    .v-footer__bottom {
        width: calc(100% - 3rem);
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        padding-bottom: 3rem;
        text-align: center;
    }

    .v-footer__separator {
        display: none;
    }

    .v-footer__email,
    .v-footer__link {
        font-size: 1rem;
    }

    .v-footer__email {
        font-size: 1.5rem;
    }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .v-next {
        animation: none;
        transform: none;
    }

    .v-galaxy__marquee-track {
        animation-play-state: paused;
    }

    *, *::before, *::after {
        transition-duration: 0.001ms !important;
    }
}
