:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #edf0ed;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #edf0ed;
}

.bio-page {
    --page-bg: #cbd8c6;
    --text-color: #111111;
    --button-bg: #ffffff;
    --button-text: #111111;
    --logo-scale: 90%;
    position: relative;
    display: flex;
    width: min(100%, 580px);
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    flex-direction: column;
    color: var(--text-color);
    background-color: var(--page-bg);
    background-image: var(--background-image, none);
    background-position: center;
    background-size: cover;
    box-shadow: 0 0 40px rgba(28, 43, 31, 0.12);
}

.bio-page.has-background-image::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    background: var(--page-bg);
    content: "";
    opacity: 0.72;
}

.bio-page > * {
    position: relative;
    z-index: 1;
}

.bio-header {
    position: relative;
    height: 250px;
    flex: 0 0 auto;
}

.bio-header::after {
    position: absolute;
    z-index: 2;
    right: -10%;
    bottom: 0;
    left: -10%;
    height: 76px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: var(--page-bg);
    content: "";
}

.bio-header.no-banner {
    height: 170px;
}

.bio-header.no-banner::after {
    display: none;
}

.banner {
    display: block;
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.logo-wrap {
    position: absolute;
    z-index: 3;
    bottom: 18px;
    left: 50%;
    display: grid;
    width: 150px;
    height: 150px;
    padding: 8px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(22, 32, 24, 0.14);
    overflow: hidden;
    place-items: center;
}

.bio-header.no-banner .logo-wrap {
    bottom: 10px;
}

img.logo {
    display: block;
    width: var(--logo-scale);
    height: var(--logo-scale);
    object-fit: contain;
}

.logo-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    color: var(--text-color);
    background: var(--page-bg);
    font-size: 54px;
    font-weight: 800;
    place-items: center;
}

.bio-content {
    display: flex;
    width: 100%;
    padding: 0 clamp(22px, 7vw, 54px) 18px;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
}

h1 {
    max-width: 100%;
    margin: 0;
    font-size: 46px;
    line-height: 1.1;
    text-align: center;
    overflow-wrap: anywhere;
}

.subtitle {
    margin: 11px 0 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-align: center;
    text-transform: uppercase;
}

.socials {
    display: flex;
    margin-top: 22px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 13px;
}

.socials a {
    display: grid;
    width: 46px;
    height: 46px;
    border: 1px solid color-mix(in srgb, var(--text-color) 18%, transparent);
    border-radius: 50%;
    color: var(--text-color);
    background: color-mix(in srgb, var(--page-bg) 86%, #ffffff);
    place-items: center;
    transition: transform 160ms ease, background-color 160ms ease;
}

.socials a:hover,
.socials a:focus-visible {
    transform: translateY(-2px);
    background: color-mix(in srgb, var(--page-bg) 70%, #ffffff);
}

.socials svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.bio-links {
    display: grid;
    width: 100%;
    margin-top: 28px;
    gap: 16px;
}

.bio-links a {
    display: grid;
    min-height: 68px;
    padding: 16px 22px;
    border: 1px solid color-mix(in srgb, var(--button-text) 10%, transparent);
    border-radius: 14px;
    color: var(--button-text);
    background: var(--button-bg);
    box-shadow: 0 8px 22px rgba(24, 34, 26, 0.09);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    place-items: center;
    overflow-wrap: anywhere;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.bio-video {
    display: flex;
    width: 100%;
    margin-top: 20px;
    justify-content: center;
}

.bio-video video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 720px;
    border-radius: 14px;
    background: #000000;
    box-shadow: 0 8px 22px rgba(24, 34, 26, 0.12);
    object-fit: contain;
}

.bio-video video.is-portrait {
    width: auto;
    max-width: 100%;
    height: min(70vh, 720px);
}

.bio-links a:hover,
.bio-links a:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 11px 26px rgba(24, 34, 26, 0.14);
}

a:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

footer {
    padding: 4px 24px 20px;
    text-align: center;
}

footer a {
    color: var(--text-color);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0.68;
    text-decoration: none;
}

@media (max-width: 640px) {
    .bio-header {
        height: 190px;
    }

    .banner {
        height: 190px;
    }

    .bio-header::after {
        height: 58px;
    }

    .logo-wrap {
        bottom: 28px;
        width: 140px;
        height: 140px;
        padding: 7px;
    }

    .bio-header.no-banner {
        height: 150px;
    }

    .bio-header.no-banner .logo-wrap {
        bottom: 5px;
    }

    .bio-content {
        padding: 0 clamp(20px, 7vw, 40px) 18px;
    }

    h1 {
        font-size: 28px;
        line-height: 1.12;
    }

    .subtitle {
        margin-top: 7px;
        font-size: 11.5px;
        letter-spacing: 0.06em;
    }

    .socials {
        margin-top: 18px;
        gap: 11px;
    }

    .socials a {
        width: 44px;
        height: 44px;
    }

    .bio-video,
    .bio-links {
        margin-top: 20px;
    }

    .bio-links {
        gap: 14px;
    }

    .bio-links a {
        min-height: 58px;
        padding: 12px 16px;
        font-size: 16px;
    }
}

@media (max-width: 420px) {
    .bio-header {
        height: 180px;
    }

    .banner {
        height: 180px;
    }

    .logo-wrap {
        bottom: 26px;
        width: 128px;
        height: 128px;
    }

    .bio-header.no-banner {
        height: 138px;
    }

    .bio-header.no-banner .logo-wrap {
        bottom: 5px;
    }

    .bio-content {
        padding-top: 0;
    }

    h1 {
        font-size: 26px;
    }

    .subtitle {
        font-size: 11px;
    }

    .socials {
        margin-top: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
