* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0f;
    --bg-alt: #101018;
    --surface: #15151f;
    --surface-hover: #1c1c28;
    --glass: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #f5f5f8;
    --text-dim: #9797a6;
    --text-dimmer: #64646f;
    --accent: #7e88d8;
    --accent-rgb: 126, 136, 216;
    --accent-soft: #a3addf;
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

html.portfolio-data-loading body > :not(#portfolioPageLoader) {
    visibility: hidden;
}

.portfolio-page-loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg);
    color: var(--text-dim);
    font-size: 0.9em;
}

.portfolio-page-loader[hidden] {
    display: none;
}

.portfolio-page-loader .media-loader-spinner {
    width: 28px;
    height: 28px;
    border-width: 2px;
}

/* Декоративные градиентные пятна фона */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
}

.bg-glow-1 {
    width: 560px;
    height: 560px;
    top: -220px;
    left: -160px;
    background: var(--accent);
    opacity: 0.14;
}

.bg-glow-2 {
    width: 520px;
    height: 520px;
    bottom: -240px;
    right: -160px;
    background: var(--accent);
    opacity: 0.1;
}

.procedural-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.62;
}

/* ============ HEADER ============ */

.header-sentinel {
    position: absolute;
    top: 82px;
    left: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.65);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--border);
}

.site-header.is-scrolled {
    transform: none;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.25s ease;
}

.mobile-language-switch {
    display: none;
}

.brand-name {
    font-family: 'Unbounded', 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.82em;
    letter-spacing: 0.2px;
    color: var(--text);
}

.brand:hover .brand-name {
    color: var(--accent);
}

.brand-suffix {
    font-size: 0.62em;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(10, 10, 15, 0.62);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.language-menu {
    position: relative;
    flex-shrink: 0;
}

.language-current {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 62px;
    padding: 0 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: rgba(10, 10, 15, 0.78);
    color: var(--text);
    font-size: 0.74em;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 3px 8px rgba(0, 0, 0, 0.42);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.language-flag {
    display: inline-block;
    width: 16px;
    height: 12px;
    flex: 0 0 16px;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.language-flag-ru {
    background: linear-gradient(to bottom, #fff 0 33.33%, #2455a4 33.33% 66.66%, #d52b1e 66.66%);
}

.language-flag-en {
    background:
        linear-gradient(33deg, transparent 40%, #fff 40% 46%, #c8102e 46% 51%, #fff 51% 57%, transparent 57%),
        linear-gradient(-33deg, transparent 40%, #fff 40% 46%, #c8102e 46% 51%, #fff 51% 57%, transparent 57%),
        linear-gradient(90deg, transparent 42%, #fff 42% 58%, #c8102e 58% 68%, #fff 68% 84%, transparent 84%),
        linear-gradient(0deg, #012169 0 40%, #fff 40% 47%, #c8102e 47% 55%, #fff 55% 62%, #012169 62%);
}

.language-current:hover,
.language-current[aria-expanded="true"] {
    border-color: rgba(var(--accent-rgb), 0.58);
    background: rgba(var(--accent-rgb), 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 5px 12px rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.18);
}

.language-chevron {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 0.7;
    transform: translateY(-1px);
}

.language-options {
    position: absolute;
    z-index: 100;
    top: calc(100% + 7px);
    right: 0;
    display: grid;
    min-width: 126px;
    gap: 3px;
    padding: 4px;
    border: 1px solid var(--border-strong);
    border-radius: 13px;
    background: rgba(10, 10, 15, 0.96);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.language-options[hidden] {
    display: none;
}

.language-option {
    display: flex;
    min-height: 32px;
    align-items: center;
    gap: 8px;
    padding: 0 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-dim);
    font-size: 0.68em;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease;
}

.language-option span {
    color: var(--text-dimmer);
    font-size: 0.92em;
    font-weight: 600;
}

.language-option .language-flag {
    color: transparent;
    font-size: 0;
}

.language-option .language-option-label {
    color: var(--text-dim);
    font-size: 0.92em;
    font-weight: 600;
}

.language-option:hover,
.language-option.active,
.language-option:focus-visible {
    background: rgba(var(--accent-rgb), 0.14);
    color: var(--text);
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0.12));
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    color: var(--text);
    font-weight: 700;
    font-size: 0.84em;
    text-decoration: none;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 5px rgba(0, 0, 0, 0.28), 0 4px 10px rgba(0, 0, 0, 0.18), 0 2px 10px rgba(var(--accent-rgb), 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.contact-btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.contact-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.3), rgba(var(--accent-rgb), 0.18));
    border-color: rgba(var(--accent-rgb), 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 10px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(var(--accent-rgb), 0.1);
}

/* ============ CONTAINER / HERO ============ */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 60px;
    position: relative;
    z-index: 1;
}

.intro {
    padding: 96px 0 32px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.intro-name {
    font-family: 'Unbounded', 'Manrope', sans-serif;
    font-weight: 700;
    font-size: clamp(1.6em, 3.2vw, 2.1em);
    letter-spacing: -0.3px;
}

.intro-role {
    margin-top: 8px;
    font-size: 1.05em;
    font-weight: 700;
    color: var(--accent);
}

.intro-desc {
    margin-top: 6px;
    font-size: 1em;
    color: var(--text-dim);
    font-weight: 500;
    max-width: 640px;
}

.intro-meta {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.meta-label {
    flex-shrink: 0;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dimmer);
    min-width: 88px;
}

.company-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.company-chip {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 10px 20px 10px 10px;
    background: var(--glass);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.92em;
    font-weight: 600;
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 4px 12px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.company-chip:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    background: var(--glass-hover);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 8px 18px rgba(0, 0, 0, 0.38);
}

.company-chip-logo {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Unbounded', 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.5em;
    letter-spacing: 0.1px;
    color: #fff;
    flex-shrink: 0;
}

.skill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-dot-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 18px;
    background: var(--glass);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 4px 12px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.skill-dot-tag:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    background: var(--glass-hover);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 8px 18px rgba(0, 0, 0, 0.38);
}

.skill-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}

/* ============ TABS ============ */

.tabs-menu {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 48px;
    flex-wrap: wrap;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(10, 10, 15, 0.68));
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid var(--border-strong);
    padding: 5px;
    border-radius: 999px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 8px 24px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(0, 0, 0, 0.28);
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.tab-button {
    padding: 10px 25px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text-dim);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.22s ease, color 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
    font-family: 'Manrope', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--text);
    transform: translateY(-1px);
    border-color: rgba(var(--accent-rgb), 0.42);
    background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.09));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 10px rgba(0, 0, 0, 0.42);
}

.tab-button.active {
    background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.46), rgba(var(--accent-rgb), 0.25));
    border-color: rgba(var(--accent-rgb), 0.62);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 -2px 3px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.5), 0 5px 16px rgba(var(--accent-rgb), 0.2);
}

.tab-button.active:hover {
    background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.52), rgba(var(--accent-rgb), 0.3));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -2px 3px rgba(0, 0, 0, 0.2), 0 6px 13px rgba(0, 0, 0, 0.48), 0 6px 18px rgba(var(--accent-rgb), 0.24);
}

.tab-button:active {
    transform: translateY(0) scale(0.985);
}

/* ============ VIDEO GRID ============ */

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    width: 100%;
}

.portfolio-loading {
    grid-column: 1 / -1;
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-dim);
    font-size: 0.9em;
}

.portfolio-loading .media-loader-spinner {
    width: 28px;
    height: 28px;
    border-width: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-loading .media-loader-spinner,
    .portfolio-page-loader .media-loader-spinner {
        animation: none;
    }
}

/* Раздел "Моделирование" — водопад плиток (masonry), как в Pinterest */
.video-grid.square-grid {
    display: block;
    column-count: 3;
    column-gap: 22px;
}

.video-item {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.square-grid .video-item {
    aspect-ratio: auto;
    display: block;
    min-height: 160px;
    margin-bottom: 22px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    background: var(--surface);
}

.square-grid .video-item img {
    width: 100%;
    height: auto;
    display: block;
}

.video-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 24px 55px rgba(var(--accent-rgb), 0.22);
    border-color: var(--border-strong);
}

.video-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.45) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.video-item:hover::after {
    opacity: 1;
}

.video-item video,
.video-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

.video-item video {
    position: absolute;
    top: 0;
    left: 0;
}

.video-item img {
    pointer-events: auto;
    cursor: pointer;
}

/* Исключение для превью видео - они не должны быть кликабельными напрямую */
.video-item .video-thumbnail img {
    pointer-events: none;
}

.video-item .video-thumbnail {
    transition: opacity 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
}

.video-item .video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play-icon {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-play-icon.hidden {
    opacity: 0;
    visibility: hidden;
}

.video-play-icon-shape {
    width: 62px;
    height: 62px;
    background: rgba(10, 10, 15, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.video-play-icon-shape::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

.video-item:hover .video-play-icon-shape {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(var(--accent-rgb), 0.55);
}

/* Индикатор загрузки */
.media-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.media-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.media-loader-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

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

.video-item:hover video,
.video-item:hover img {
    filter: brightness(1.08);
}

/* ============ FOOTER ============ */

.site-footer {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 40px auto 0;
    padding: 28px 24px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--text-dimmer);
    font-size: 0.9em;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #409cff;
}

.footer-version {
    position: fixed;
    left: calc(12px + env(safe-area-inset-left, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 50;
    color: var(--text-dimmer);
    font-size: 11px;
    letter-spacing: 0.04em;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(10, 10, 15, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
}

@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-grid.square-grid {
        column-count: 2;
    }
}

/* Модальное окно для полноэкранного просмотра изображений */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal.active {
    opacity: 1;
    visibility: visible;
}

.image-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.88);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.image-modal-content {
    position: relative;
    z-index: 10001;
    max-width: 90%;
    max-height: 90%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.image-modal-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.image-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10002;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.image-modal-close:hover {
    background: rgba(var(--accent-rgb), 0.25);
    border-color: rgba(var(--accent-rgb), 0.5);
    color: var(--text);
    transform: rotate(90deg);
}

@media (max-width: 640px) {
    .site-header {
        top: 0;
        transform: translateY(0);
        background: rgba(10, 10, 15, 0.58);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
        backdrop-filter: blur(18px) saturate(150%);
        -webkit-backdrop-filter: blur(18px) saturate(150%);
    }

    .site-header.is-scrolled {
        transform: translateY(0);
    }

    .header-inner {
        width: 100%;
        padding: 11px 16px;
        justify-content: space-between;
        gap: 12px;
    }

    .mobile-brand {
        display: flex;
        flex-shrink: 0;
    }

    .mobile-brand .brand-name {
        font-size: 0.86em;
    }

    .mobile-brand .brand-suffix {
        font-size: 0.68em;
    }

    .header-actions {
        padding: 0;
        gap: 8px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .language-menu {
        display: none;
    }

    .mobile-language-switch {
        display: flex;
        align-items: center;
        gap: 3px;
        padding: 3px;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.055);
        box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.38), 0 4px 12px rgba(0, 0, 0, 0.28);
    }

    .mobile-language-button {
        min-width: 38px;
        height: 34px;
        padding: 0 10px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: var(--text-dim);
        font: 800 0.72em 'Manrope', sans-serif;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    }

    .mobile-language-button.active {
        background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.46), rgba(var(--accent-rgb), 0.28));
        color: var(--text);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 3px 8px rgba(0, 0, 0, 0.34);
    }

    .contact-btn span:last-child {
        display: none;
    }

    .contact-btn {
        order: 2;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .intro {
        padding: 86px 0 24px;
        margin-bottom: 24px;
    }

    .meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .company-chip,
    .skill-dot-tag {
        font-size: 0.85em;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }

    .video-grid.square-grid {
        column-count: 1;
    }

    .tabs-menu {
        justify-content: center;
        gap: 4px;
        margin-bottom: 36px;
        padding: 4px;
        border-radius: 999px;
    }

    .tab-button {
        padding: 8px 11px;
        border-radius: 999px;
        font-size: 0.78em;
        font-weight: 700;
    }

    .image-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }

    .image-modal-content {
        max-width: 95%;
        max-height: 95%;
    }
}
.company-chip-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.skill-dot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.contact-btn[hidden] {
    display: none;
}

.custom-contact-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    margin-right: 7px;
    vertical-align: middle;
}

.custom-button-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex: 0 0 auto;
}

.custom-link-mark {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    margin-right: 7px;
    font-weight: 800;
}

@media (max-width: 640px) {
    .custom-contact-btn .custom-link-label {
        display: none;
    }
}

.custom-links {
    display: contents;
}

.custom-contact-btn {
    text-decoration: none;
    white-space: nowrap;
}
