.language-switcher {
    position: relative;
    z-index: 3;
    margin-left: 0;
    margin-right: 12px;
    font-family: var(--font-display-latin, system-ui, sans-serif);
    text-transform: uppercase;
}

.site-header .site-nav {
    margin-left: clamp(28px, 5vw, 96px);
    margin-right: auto;
}

html.has-custom-cursor,
html.has-custom-cursor * {
    cursor: none !important;
}

html[data-theme="light"] .cursor-dot__visual {
    background: #101217;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.62), 0 0 18px rgba(0, 0, 0, 0.16);
    mix-blend-mode: normal;
}

html[data-theme="dark"] .cursor-dot__visual {
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28), 0 0 18px rgba(255, 255, 255, 0.12);
    mix-blend-mode: difference;
}

.language-switcher__toggle {
    height: 46px;
    min-width: 92px;
    border: 1px solid rgba(231, 229, 223, 0.22);
    border-radius: 6px;
    background: rgba(9, 9, 11, 0.42);
    color: var(--off-white, #e5e5e5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-inline: 14px;
    font-size: 10px;
    font-weight: 700;
    transition:
        border-color 420ms cubic-bezier(.22, 1, .36, 1),
        background-color 420ms cubic-bezier(.22, 1, .36, 1),
        color 420ms cubic-bezier(.22, 1, .36, 1),
        transform 420ms cubic-bezier(.22, 1, .36, 1);
}

.language-switcher__toggle:hover,
.language-switcher.is-open .language-switcher__toggle {
    border-color: rgba(231, 229, 223, 0.62);
    background: rgba(231, 229, 223, 0.07);
    transform: translate3d(0, -1px, 0) scale(1.01);
}

.language-switcher__toggle small {
    color: rgba(229, 229, 229, 0.5);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.language-switcher__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 158px;
    border: 1px solid rgba(231, 229, 223, 0.14);
    border-radius: 8px;
    background: rgba(9, 9, 11, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(0, -8px, 0);
    transition:
        opacity 420ms cubic-bezier(.16, 1, .3, 1),
        transform 420ms cubic-bezier(.16, 1, .3, 1),
        visibility 420ms step-end;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

.language-switcher.is-open .language-switcher__menu {
    opacity: 1;
    visibility: visible;
    transform: translate3d(0, 0, 0);
    transition:
        opacity 420ms cubic-bezier(.16, 1, .3, 1),
        transform 420ms cubic-bezier(.16, 1, .3, 1),
        visibility 0s;
}

.language-switcher__menu button {
    width: 100%;
    height: 34px;
    color: rgba(231, 229, 223, 0.55);
    text-align: left;
    border-radius: 1px;
    padding-inline: 10px;
    font-size: 10px;
    font-weight: 700;
    transition:
        background-color 420ms cubic-bezier(.16, 1, .3, 1),
        color 420ms cubic-bezier(.16, 1, .3, 1),
        transform 420ms cubic-bezier(.16, 1, .3, 1);
}

.language-switcher__menu button:hover,
.language-switcher__menu button.is-active {
    background: rgba(231, 229, 223, 0.08);
    color: var(--off-white, #e5e5e5);
    transform: translate3d(2px, 0, 0);
}

.theme-toggle {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    min-width: 82px;
    margin-right: 12px;
    border: 1px solid rgba(231, 229, 223, 0.22);
    border-radius: 6px;
    background: rgba(9, 9, 11, 0.42);
    color: var(--off-white, #e5e5e5);
    font-family: var(--font-display-latin, system-ui, sans-serif);
    font-size: 10px;
    font-weight: 700;
    transition:
        border-color 420ms cubic-bezier(.22, 1, .36, 1),
        background-color 420ms cubic-bezier(.22, 1, .36, 1),
        color 420ms cubic-bezier(.22, 1, .36, 1),
        transform 420ms cubic-bezier(.22, 1, .36, 1);
}

.theme-toggle:hover {
    border-color: rgba(231, 229, 223, 0.62);
    background: rgba(231, 229, 223, 0.07);
    transform: translate3d(0, -1px, 0) scale(1.01);
}

.theme-toggle__mark {
    position: relative;
    width: 15px;
    height: 15px;
    border: 1px solid currentColor;
    border-radius: 50%;
    overflow: hidden;
}

.theme-toggle__mark::after {
    content: "";
    position: absolute;
    inset: 0 0 0 50%;
    background: currentColor;
    transition: transform 520ms cubic-bezier(.16, 1, .3, 1);
}

html[data-theme="light"] .theme-toggle__mark::after {
    transform: translateX(-100%);
}

.theme-toggle__label {
    letter-spacing: 0;
}

html[data-theme="light"] {
    --black: #f7f5ef;
    --ink: #ede9df;
    --off-white: #111318;
    --muted: rgba(17, 19, 24, 0.62);
    --quiet: rgba(17, 19, 24, 0.34);
    --line: rgba(17, 19, 24, 0.15);
    --line-soft: rgba(17, 19, 24, 0.08);
    background: #f7f5ef;
}

html[data-theme="light"] body {
    background: #f7f5ef;
    color: #111318;
}

html[data-theme="light"] #ambient-canvas {
    opacity: 0.22;
    mix-blend-mode: multiply;
}

html[data-theme="light"] .site-header.is-scrolled {
    background: rgba(247, 245, 239, 0.9);
}

html[data-theme="light"] .brand-mark {
    border-color: rgba(17, 19, 24, 0.76);
}

html[data-theme="light"] .language-switcher__toggle,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .mask-button {
    border-color: rgba(17, 19, 24, 0.18);
    background: rgba(255, 255, 255, 0.54);
    color: #111318;
}

html[data-theme="light"] .language-switcher__toggle small {
    color: rgba(17, 19, 24, 0.52);
}

html[data-theme="light"] .language-switcher__menu {
    border-color: rgba(17, 19, 24, 0.12);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 60px rgba(17, 19, 24, 0.13);
}

html[data-theme="light"] .language-switcher__menu button {
    color: rgba(17, 19, 24, 0.55);
}

html[data-theme="light"] .language-switcher__menu button:hover,
html[data-theme="light"] .language-switcher__menu button.is-active {
    background: rgba(17, 19, 24, 0.06);
    color: #111318;
}

html[data-theme="light"] .hero__sticky,
html[data-theme="light"] .philosophy,
html[data-theme="light"] .portrait-section,
html[data-theme="light"] .portrait-section__media,
html[data-theme="light"] .experience,
html[data-theme="light"] .principles,
html[data-theme="light"] .closing,
html[data-theme="light"] .site-footer {
    background: #f7f5ef;
}

html[data-theme="light"] .hero__media img,
html[data-theme="light"] .portrait-section__media img {
    opacity: 0.34;
    filter: contrast(1.04) saturate(0.28);
    mix-blend-mode: multiply;
}

html[data-theme="light"] .hero__shade {
    background: rgba(247, 245, 239, 0.24);
    box-shadow: inset 0 150px 130px rgba(247, 245, 239, 0.78), inset 0 -180px 150px rgba(247, 245, 239, 0.88);
}

html[data-theme="light"] .hero__line--bottom,
html[data-theme="light"] .hero__meta,
html[data-theme="light"] .hero__next,
html[data-theme="light"] .site-nav,
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .section-index,
html[data-theme="light"] .site-footer,
html[data-theme="light"] .closing__action p {
    color: rgba(17, 19, 24, 0.46);
}

html[data-theme="light"] .hero__intro,
html[data-theme="light"] .philosophy__note,
html[data-theme="light"] .principles__header p,
html[data-theme="light"] .chapter p {
    color: rgba(17, 19, 24, 0.62);
}

html[data-theme="light"] .statement .word {
    color: rgba(17, 19, 24, 0.18);
}

html[data-theme="light"] .mask-button--light {
    background: #111318;
    color: #f7f5ef;
}

html[data-theme="light"] .signal-window {
    border-color: rgba(17, 19, 24, 0.13);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 45px 120px rgba(17, 19, 24, 0.12);
}

html[data-theme="light"] .signal-message p,
html[data-theme="light"] .signal-message strong,
html[data-theme="light"] .signal-window__room span {
    color: rgba(17, 19, 24, 0.78);
}

html[data-theme="light"] .principle-row::before {
    background: rgba(17, 19, 24, 0.06);
}

html[data-theme="light"] .principle-row:hover {
    color: #111318;
}

html[data-theme="light"] .principle-row:hover p {
    color: rgba(17, 19, 24, 0.72);
}

@media (max-width: 760px) {
    .language-switcher {
        margin-left: auto;
        margin-right: 8px;
    }

    .language-switcher__toggle {
        width: 46px;
        min-width: 46px;
        height: 40px;
        padding-inline: 0;
    }

    .language-switcher__toggle small {
        display: none;
    }

    .language-switcher__menu {
        right: -64px;
        width: 148px;
    }

    .site-header > .language-switcher + .mask-button {
        min-width: 84px;
        padding-inline: 12px;
    }

    .theme-toggle {
        min-width: 46px;
        width: 46px;
        height: 40px;
        margin-right: 8px;
        padding-inline: 0;
    }

    .theme-toggle__label {
        display: none;
    }

    .site-header > .language-switcher + .mask-button .ui-arrow {
        display: none;
    }
}

@media (max-width: 390px) {
    .site-header > .language-switcher + .mask-button {
        min-width: 72px;
        padding-inline: 10px;
    }

    .language-switcher {
        margin-right: 6px;
    }
}
