:root {
    /* Typography */
    --font-family: "Manrope", "Roboto", sans-serif;
    --font-size-base: 16px;
    --font-size-sm: .75rem;
    --font-size-md: 1.25rem;
    --font-size-lg: 1.5rem;
    --font-size-xl: 2rem;

    /* Colors */
    --color-gray-50: #f7f8fc;
    --color-gray-100: #ececec;
    --color-gray-500: #767676;

    /* Layout */
    --space-m: 1rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    --space-xxxl: 4rem;

    --card-border-radius: 18px;

    --transition-easing-base: cubic-bezier(.22, 1, .36, 1);

    --transition-base: .5s var(--transition-easing-base);
    --transition-slow: .7s var(--transition-easing-base);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100svh;
    background: #161616;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-gray-50);
    line-height: 1.4;
}

.flex__column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
}

.flex__row {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: var(--space-xl);
}

.grid__two__column {
    display: grid;
    justify-content: center;
    grid-template-columns: 0.5fr 0.2fr;
    gap: var(--space-xl);
}

.auth {
    align-items: center;
    min-height: 100svh;
}

.auth-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    min-width: 320px;
    max-width: 420px;
    padding: clamp(2rem, 4vw, 4rem);
    border-radius: var(--card-border-radius);
    overflow: clip;
}

.auth-card__header {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: var(--space-m);
    justify-content: center;
}

.auth-card__title {
    flex: 1;
    font-size: clamp(1rem, 3vw, 3rem);
    line-height: 1.2;
    margin-top: 0;
    color: #fff;
    text-align: center;
    letter-spacing: -0.05rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.logo {
    width: 4rem;
    height: 4rem;
    justify-self: center;
}

.logo > svg {
    height: 100%;
    width: 100%;
}

.footer {
    padding: var(--space-xxl) var(--space-m);
    color: var(--color-gray-500);
    font-size: var(--font-size-sm);
    text-align: center;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    text-decoration: underline;
}

/* Скрытый, но доступный контент */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
    border: 0;
}

.header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: var(--space-xxxl);
    gap: 3rem;
}

.menu {
    text-transform: uppercase;
    cursor: pointer;
}

.menu > a {
    position: relative;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease-in-out;
    overflow: clip;
}


.menu > a:hover, .menu > a:focus {
    background: #FFFFFF;
    color: #000000;
}

.menu > a.active::after {
    content: "";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    height: 2px;
    background-color: #FFFFFF;
    border-radius: 16px;
    transition: background-color 0.2s ease;
}

.menu > a.active:hover::after,
.menu > a.active:focus::after {
    background-color: transparent;
}

.menu-left {
    justify-self: end;
    display: flex;
    gap: 2rem;
}

.menu-right {
    justify-self: start;
    display: flex;
    gap: 2rem;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(1300px, 1fr));
    gap: 8rem;
    padding: 4rem;
    justify-items: center;
    margin: auto;
}

.project {
    align-items: center;
}

.project-card {
    position: relative;
    width: 100%;
    max-width: 1473px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.project .project-card {
    border-radius: 16px;
    background: #000;
    box-shadow: -6px 6px hsla(var(--card-hue), 86.61%, 56.08%, 0.4);
}

.project-card__accent {
    background: hsla(var(--card-hue), 86.61%, 56.08%, 0.4);
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--card-border-radius);
    transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.project-card:hover > .project-card__accent {
    background: hsla(var(--card-hue), 67.46%, 40.98%);
}

.project-card:nth-of-type(odd) > .project-card__accent {
    left: -6px;
    top: 6px;
}

.project-card:nth-of-type(even) > .project-card__accent {
    left: 6px;
    top: 6px;
}

.project-card:nth-of-type(odd):hover > .project-card__accent {
    box-shadow: hsla(var(--card-hue), 86.61%, 56.08%, 0.3) -6px 6px,
    hsla(var(--card-hue), 86.61%, 56.08%, 0.2) -11px 11px,
    hsla(var(--card-hue), 86.61%, 56.08%, 0.1) -16px 16px,
    hsla(var(--card-hue), 86.61%, 56.08%, 0.05) -21px 21px;
}

.project-card:nth-of-type(even):hover > .project-card__accent {
    box-shadow: hsla(var(--card-hue), 86.61%, 56.08%, 0.3) 6px 6px,
    hsla(var(--card-hue), 86.61%, 56.08%, 0.2) 11px 11px,
    hsla(var(--card-hue), 86.61%, 56.08%, 0.1) 16px 16px,
    hsla(var(--card-hue), 86.61%, 56.08%, 0.05) 21px 21px;
}

.project-card__overlay {
    position: absolute;
    inset: -1px;
    background: linear-gradient(to right, #000 40%, #000000a3 65%, transparent 100%);
    border-radius: var(--card-border-radius);
}

.project-card__content {
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: var(--space-xl);
    padding: clamp(2rem, 4vw, 4rem);
    position: relative;
    overflow: clip;
}

.project-card__title {
    font-size: clamp(2rem, 5vw, 5rem);
    line-height: 1.2;
    margin-top: 0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: -0.05rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.project-card__description {
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: .2rem;
    line-height: 1.3;
}

.project-card__media {
    position: absolute;
    inset: 0 0 0 auto;
    width: 100%;
    overflow: hidden;
    border-radius: var(--card-border-radius);
}

.project-card__image {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: transform 1.2s var(--transition-easing-base);
}

.project-card:hover .project-card__image {
    transform: scale(1.06);
}

.button {
    display: inline-block;
    padding: 0 3rem;
    line-height: 3rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .1rem;
    border: 2px solid #fff;
    border-radius: 16px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
}

.button:hover, .button:focus {
    background: #FFFFFF;
    color: #000000;
    text-decoration: none;
}

.footer__copyright {
    line-height: 1.6;
    font-size: 1rem;
    color: #ffffff33;
}

.error-card {
    max-width: fit-content;
    padding: 10rem;
    background: #0f0e0e;
    border-radius: 18px;
    border: 5px outset hsl(355deg 87% 56% / 40%);
}

.content {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 22px;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(40px) scale(.96);
    filter: blur(10px);
    transition: opacity var(--transition-slow),
    transform var(--transition-slow),
    filter var(--transition-slow),
    box-shadow var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

@media (max-width: 1420px) {
    .projects {
        min-width: 1000px;
        display: flex;
        flex-direction: column;
        padding: 0 0 4rem 0;
        gap: 8rem;
        margin: 0 6rem;
    }
}

@media (max-width: 1236px) {
    .projects {
        min-width: 700px;
        display: flex;
        flex-direction: column;
        padding: 0 0 4rem 0;
        gap: 8rem;
        margin: 0 6rem;
    }
}

@media (max-width: 788px) {
    .projects {
        min-width: 400px;
        display: flex;
        flex-direction: column;
        padding: 0 0 4rem 0;
        gap: 5rem;
        margin: 0 3rem;
    }
    .error-card {
        padding: 3rem;
    }
    .header {
        gap: 1rem;
        padding: 2rem 1rem;
    }

    .logo {
        width: 3rem;
        height: 3rem;
    }

    .menu-left,
    .menu-right {
        gap: .75rem;
    }
}

@media (max-width: 480px) {
    .projects {
        display: flex;
        flex-direction: column;
        padding: 0 2rem;
        gap: 4rem;
        margin: 0;
    }
    .error-card {
        padding: 2rem;
    }
}