* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #141414;
    color: #FAFAFA;
    font-family: "Courier New", Courier, monospace;
}

.page {
    width: min(100% - 32px, 980px);
    margin: 0 auto;
    padding: 18px 0 96px;
}

.top-controls {
    display: flex;
    justify-content: flex-end;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(250, 250, 250, 0.24);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(22, 22, 22, 0.92);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.lang-btn {
    min-width: 64px;
    height: 36px;
    border: 0;
    margin: 0;
    padding: 0 14px;
    background: transparent;
    color: rgba(250, 250, 250, 0.9);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}

.lang-btn + .lang-btn {
    border-left: 1px solid rgba(250, 250, 250, 0.18);
}

.lang-btn:hover {
    background: rgba(119, 89, 255, 0.14);
    color: #FAFAFA;
}

.lang-btn.is-active {
    background: rgba(119, 89, 255, 0.2);
    color: #FAFAFA;
}

.lang-btn:focus-visible {
    outline: 2px solid #7759FF;
    outline-offset: -2px;
}

.hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow-x: auto;
}

.hexsd {
    margin: 0;
    max-width: 100%;
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(5px, 1.05vw, 14px);
    line-height: 1.15;
    font-weight: 700;
    white-space: pre;
    color: #FAFAFA;
    background: linear-gradient(
        90deg,
        #FAFAFA 0%,
        #7759FF 30%,
        #B9AAFF 50%,
        #7759FF 70%,
        #FAFAFA 100%
    );
    background-size: 240% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hexsd-shimmer 8s ease-in-out infinite;
}

.terminal-block {
    margin: 0 auto 18px;
    padding: 18px 20px;
    background: rgba(22, 22, 22, 0.92);
    border: 1px solid rgba(250, 250, 250, 0.18);
    border-radius: 6px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
}

.terminal-block h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    color: #FAFAFA;
}

.terminal-block h2::before {
    content: "#";
    color: #7759FF;
}

.terminal-block p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: rgba(250, 250, 250, 0.74);
}

.terminal-block a {
    color: #FAFAFA;
    text-decoration-color: #7759FF;
    text-underline-offset: 4px;
    transition: color 160ms ease, text-decoration-color 160ms ease;
}

.terminal-block a:hover {
    color: #7759FF;
    text-decoration-color: #FAFAFA;
}

.contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contacts-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.contacts .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid rgba(250, 250, 250, 0.24);
    background: rgba(250, 250, 250, 0.02);
    color: #FAFAFA;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.contacts .social-link i {
    font-size: 17px;
}

.contacts .social-link:hover {
    color: #FAFAFA;
    border-color: #7759FF;
    background: rgba(119, 89, 255, 0.12);
    transform: translateY(-1px);
}

.contacts .social-link:focus-visible {
    outline: 2px solid #7759FF;
    outline-offset: 2px;
}

@keyframes hexsd-shimmer {
    0% {
        background-position: 0% center;
    }

    50% {
        background-position: 100% center;
    }

    100% {
        background-position: 0% center;
    }
}

@media (max-width: 620px) {
    .page {
        padding-top: 14px;
    }

    .lang-btn {
        min-width: 56px;
        height: 34px;
        padding: 0 12px;
        font-size: 12px;
    }

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