:root {
    color-scheme: dark;
    --bg: #080910;
    --panel: #11111b;
    --text: #f0eee9;
    --muted: #a6a4b5;
    --line: #292839;
    --accent: #c7a5ff;
    --shell-width: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background:
        radial-gradient(ellipse at 50% 0%, #29203d55, transparent 48%),
        var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body,
button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.site-shell {
    width: min(var(--shell-width), calc(100% - 64px));
    min-height: 100vh;
    min-height: 100svh;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 3vw, 40px);
    min-height: 84px;
    border-bottom: 1px solid var(--line);
}

.logo {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    min-width: 0;
}

.logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(180px, 38vw);
    max-height: 48px;
    object-fit: contain;
}

.menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(10px, 1.8vw, 25px);
}

.menu a {
    position: relative;
    padding: 12px 0;
    color: var(--muted);
    font-size: clamp(11px, .95vw, 13px);
    font-weight: 650;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color .2s ease;
}

.menu a:hover,
.menu a.active {
    color: var(--accent);
}

.menu a.active::after {
    position: absolute;
    right: 0;
    bottom: 3px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    content: "";
}

.nav-toggle {
    display: none;
    flex: 0 0 44px;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: transparent;
    color: var(--accent);
    font-size: 20px;
    cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
    border-color: var(--accent);
    background: #c7a5ff12;
}

/* Identity */
main {
    flex: 1 0 auto;
}

.identity {
    padding: clamp(44px, 7vw, 82px) 16px 12px;
    text-align: center;
}

.description {
    margin: 0 0 24px;
    color: var(--accent);
    font-size: clamp(11px, 1.5vw, 13px);
    font-weight: 750;
    letter-spacing: .18em;
    line-height: 1.5;
    text-transform: uppercase;
}

.avatar {
    width: clamp(124px, 18vw, 164px);
    aspect-ratio: 1;
    margin: 0 auto 24px;
    padding: 5px;
    overflow: hidden;
    border: 1px solid #c7a5ff80;
    border-radius: 50%;
    background: #c7a5ff0b;
    box-shadow: 0 0 42px #c7a5ff16;
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.name {
    margin: 0;
    color: var(--text);
    font-size: clamp(2.25rem, 7.4vw, 5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
}

.username {
    margin: 12px 0 12px;
    color: var(--accent);
    font-size: clamp(15px, 2.2vw, 19px);
    font-weight: 650;
    letter-spacing: .04em;
}

.profession {
    margin: 0;
    padding: 8px 0;
    color: var(--muted);
    font-size: clamp(13px, 1.8vw, 15px);
    font-weight: 500;
}

.profession span {
    padding-inline: 5px;
    color: var(--accent);
}

.identity-summary {
    max-width: 620px;
    margin: 14px auto 0;
    color: var(--muted);
    font-size: clamp(13px, 1.7vw, 15px);
    line-height: 1.75;
    text-wrap: pretty;
}

.services {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 10px;
    max-width: 760px;
    margin: 24px auto 0;
    padding-inline: 8px;
    color: var(--text);
    font-size: clamp(12px, 1.6vw, 14px);
    font-weight: 600;
    line-height: 1.8;
}

.service-separator {
    color: var(--accent);
}

/* Social links */
.social-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.2vw, 12px);
    width: min(100%, 660px);
    margin: clamp(32px, 5vw, 52px) auto 56px;
    padding-inline: 12px;
}

.social-section a {
    display: grid;
    flex: 0 0 46px;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff04;
    color: var(--muted);
    font-size: 20px;
    transition:
        color .2s ease,
        border-color .2s ease,
        background .2s ease,
        transform .2s ease;
}

.social-section a:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    background: #c7a5ff12;
    color: var(--accent);
}

.social-section a:active {
    transform: translateY(0);
}

/* Contact and footer */
.contact-section {
    padding: 0 16px 36px;
    text-align: center;
}

.contact-section a {
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
    transition: color .2s ease;
}

.contact-section a:hover {
    color: var(--accent);
}

.site-footer {
    flex: 0 0 auto;
    padding: 18px 12px max(18px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

/* Tablet and mobile navigation */
@media (max-width: 900px) {
    .site-shell {
        width: min(100% - 40px, 700px);
    }

    .site-header {
        min-height: 72px;
        gap: 16px;
    }

    .nav-toggle {
        display: grid;
        margin-left: auto;
    }

    .menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 2px;
        width: min(300px, calc(100vw - 32px));
        max-height: min(70vh, 480px);
        overflow-y: auto;
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: var(--panel);
        box-shadow: 0 18px 50px #0008;
    }

    .menu.is-open {
        display: flex;
    }

    .menu a {
        padding: 13px 12px;
        border-radius: 8px;
        font-size: 13px;
        white-space: normal;
    }

    .menu a:hover,
    .menu a.active {
        background: #c7a5ff12;
    }

    .menu a.active::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .site-shell {
        width: calc(100% - 32px);
    }

    .site-header {
        min-height: 64px;
    }

    .logo img {
        max-width: min(156px, 48vw);
        max-height: 42px;
    }

    .identity {
        padding: 44px 4px 8px;
    }

    .description {
        margin-bottom: 20px;
        letter-spacing: .14em;
    }

    .avatar {
        margin-bottom: 22px;
    }

    .name {
        letter-spacing: -.04em;
    }

    .services {
        max-width: 340px;
        column-gap: 7px;
        row-gap: 2px;
    }

    .social-section {
        gap: 8px;
        margin-top: 28px;
        margin-bottom: 40px;
        padding-inline: 0;
    }

    .social-section a {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        border-radius: 11px;
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
