@font-face {
    font-family: "MyPixelFont";
    src: url("../fonts/ari.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    letter-spacing: 1px;
}

@font-face {
    font-family: "Exo2";
    src: url("../fonts/exo_2.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Exo2";
    src: url("../fonts/exo_2_700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
}

* {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
    padding: 0;
}

body {
    flex-direction: column;
    font-family: "Exo2", sans-serif;
    background-color: var(--RedHeader);
    line-height: 1.5;
    z-index: 0;
    --blur: 45px;
    --small_font: 15px;
    --midl_font: 18px;
    --label_font: 11px;
    --title_font: 24px;
    --title_Main_font: 28px;
    --title_Second_font: 16px;
    --title_color: rgb(255, 255, 255);
    --text_color: rgba(255, 255, 255, 0.75);

    font-size: var(--small_font);
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100svh;
    z-index: -1;
    background: var(--RedBackground);
    image-rendering: pixelated;
}

.resume {
    width: calc(min(1590px, 100%) - 60px);
    position: relative;
    display: flex;
    flex-direction: row;
    margin: 30px auto 0;
    border-radius: 45px;
    box-shadow: 1px 1px 20px 10px rgba(0, 0, 0, 0.4);
    outline: 1px solid var(--RedOutline);
}

main {
    width: min(1300px, 100%);
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 30px;
    color: var(--text_color);
}

.id-wrapper {
    position: relative;
    width: 100%;
    image-rendering: pixelated;
}

.id {
    position: absolute;
    width: 100%;
    z-index: 1;
}

.student_id {
    background: var(--RedBackground);
    background-size: cover;
    width: 100%;
    aspect-ratio: 223/59;
    filter: saturate(1.25);
    -webkit-mask: url('../img/ID_mask.svg') no-repeat center / cover;
    mask: url('../img/ID_mask.svg') no-repeat center / cover;
    z-index: -1;
}

header {
    width: 300px;
    position: relative;
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 45px;
    box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.2), 0 8px 32px rgba(0, 0, 0, 0.25);
    outline: 1px solid var(--RedOutline);
}

.resume::before,
header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 45px;
    backdrop-filter: blur(12px) saturate(110%);
}

header::before {
    backdrop-filter: blur(24px) saturate(110%);
}

section,
.custom-select,
.avatar,
.links,
.name_info,
footer p,
.switchTheme {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.005), rgba(255, 255, 255, 0.05)),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.15), transparent 60%), rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(var(--blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
    box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.2), 0 8px 32px rgba(0, 0, 0, 0.25);
    outline: 1px solid var(--RedOutline);

}

.trr,
.edu-info,
.skills_list,
.summary_text,
.projects-body,
article,
.social_media,
.contact_information,
footer p {
    flex: 1;
    padding: 15px 35px;
    border-radius: 0px 0px 45px 45px;
    background: rgba(0, 0, 0, 0.4);
}

.switchTheme {
    border-radius: 45px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    line-height: 1;
}

footer {
    text-align: center;
    font-size: var(--small_font);
    color: var(--text_light_color);
    width: calc(min(1590px, 100%) - 60px);
    position: relative;
    margin: 10px auto;
}

footer p {
    padding: 10px 0;
    border-radius: 45px;
}

a[data-i18n="GitHub"]::before {
    background-image: url("../img/social_media/GitHub.webp");
}

a[data-i18n="Telegram"]::before {
    background-image: url("../img/social_media/Telegram.webp");
}

a[data-i18n="LinkedIn"]::before {
    background-image: url("../img/social_media/LinkedIn.webp");
}

a[data-i18n="phone"]::before {
    background-image: url("../img/contact_information/Phone.webp");
}

a[data-i18n="mail"]::before {
    background-image: url("../img/contact_information/Mail.webp");
}

a[data-i18n="address"]::before {
    background-image: url("../img/contact_information/Address.webp");
}

li[data-i18n="ukrainian"]::before {
    background-image: url("../img/languages_ico/UA.webp");
}

li[data-i18n="russian"]::before {
    background-image: url("../img/languages_ico/RU.webp");
}

li[data-i18n="polish"]::before {
    background-image: url("../img/languages_ico/PL.webp");
}

li[data-i18n="english"]::before {
    background-image: url("../img/languages_ico/EN.webp");
}

.skills_list li.html::before {
    background-image: url("../img/skills/html.svg");
}

.skills_list li.javascript::before {
    background-image: url("../img/skills/javascript.svg");
}

.skills_list li.react::before {
    background-image: url("../img/skills/react.svg");
}

.skills_list li.winforms::before {
    background-image: url("../img/skills/wpf.svg");
}

.skills_list li.csharp::before {
    background-image: url("../img/skills/csharp.svg");
}

.skills_list li.telegram::before {
    background-image: url("../img/skills/tg.svg");
}

.skills_list li.git::before {
    background-image: url("../img/skills/git.svg");
}

/* Right */
main h2 {
    font-size: var(--title_font);
    padding: 15px 35px;
    font-family: "MyPixelFont", sans-serif;
    color: var(--title_color);
    font-optical-sizing: auto;
    font-style: normal;
}

.education,
.skills,
.projects {
    display: flex;
    flex-direction: column;
    border-radius: 45px;
}

.skills {
    text-align: center;
}

.skills_list {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    text-align: start;
}

.midl {
    display: grid;
    grid-template-columns: 2fr 3fr;
    grid-template-rows: auto auto;
    gap: 30px;
}

.experience,
.languages {
    grid-column: 1;
    border-radius: 45px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.separator {
    height: 1px;
    background: var(--RedOutline);
    border: none;
}

.experience {
    grid-row: 1;
}

.experience p {
    font-size: var(--small_font);
    margin-top: 8px;
}

.period {
    font-size: var(--midl_font);
    font-weight: 700;
    color: var(--text_light_color);
    display: block;
}

.experience h3 {
    font-size: var(--midl_font);
    margin-bottom: 12px;
    color: var(--title_color);
}

.languages {
    grid-row: 2;
}

.summary {
    display: flex;
    flex-direction: column;
    grid-column: 2;
    grid-row: 1 / 3;
    border-radius: 45px;
    text-align: center;
}

.summary_text p {
    font-size: var(--midl_font);
    text-align: left;
}

article {
    border-radius: 0;
}

article ul {
    font-size: var(--title_font);
}

article li {
    position: relative;
    padding-left: 50px;
    line-height: 50px;
}

article li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 40px;
    height: 40px;
    background-size: cover;
    background-repeat: no-repeat;
}

.edu-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edu-item {
    position: relative;
    border-left: 3px solid var(--RedBorder);
    padding: 0px 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.edu-item::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: var(--RedBorder);
    border-radius: 50%;
}

.edu-item h3 {
    font-size: var(--midl_font);
    color: var(--title_color);
}

.edu-item p {
    font-size: var(--small_font);
    margin: 0;
}

.Hobbies {
    display: flex;
    gap: 30px;
}

.tr {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-radius: 45px;
}

.projects-body {
    padding: 30px;
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.projects-body li {
    flex: 1;
}

.project-card {
    border-radius: 20px;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    outline: 1px solid var(--RedOutline);
    background: rgba(255, 255, 255, 0.03);
}

.project-card img {
    width: 100%;
    border-radius: 20px;
    outline: 1px solid var(--RedOutline);
}

.project-info {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-type-label,
.project-badge {
    font-size: var(--label_font);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.project-badge {
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: 10px;
}

.badge-uni {
    background: #c6f12918;
    color: #C4F129;
    border: 1px solid #c6f1294b;
}

.badge-pers {
    background: rgba(19, 129, 255, 0.089);
    color: #4ab8ff;
    border: 1px solid rgba(19, 129, 255, 0.4);
}

.project-name {
    font-size: var(--midl_font);
    color: var(--title_color);
    font-weight: 700;
}

.project-desc {
    font-size: var(--small_font);
    line-height: 1.6;
}

.project-desc strong {
    color: var(--title_color);
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
}

.stack-tag,
.year {
    font-size: var(--label_font);
    color: var(--text_light_color);
    padding: 3px 10px;
    border-radius: 6px;
    outline: 1px solid var(--RedOutline);
}

.year {
    font-weight: 700;
    width: max-content;
}

/* Left */
.info_stiky {
    flex-direction: column;
    top: 20px;
}

.social_media,
.contact_information {
    padding: 10px 25px;
    flex: 1;
}

.info_stiky,
.links {
    display: flex;
    position: sticky;
    gap: 12px;
    margin: 20px;
    border-radius: 45px;
}

.links {
    flex-direction: row;
    padding: 10px;
    bottom: 20px;
    gap: 10px;
}

.links a {
    display: flex;
    flex: 1;
    aspect-ratio: 1 / 1;
}

.round {
    width: 100%;
}

header h2,
header p,
h1 {
    font-family: "MyPixelFont", sans-serif;
    font-size: var(--title_Main_font);
    padding-top: 8px;
    line-height: 1;
    color: var(--title_color);
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.1), 0 0 10px rgba(255, 255, 255, 0.1);
}

header h2 {
    font-size: var(--title_Second_font);
    padding: 15px 25px;
}

header p {
    font-size: var(--title_Second_font);
    padding-bottom: 8px;
    font-weight: bold;
    color: var(--text_light_color);
}

header section {
    border-radius: 45px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

header section li,
.skills_list li {
    position: relative;
    padding-left: 25px;
    line-height: 25px;
    color: var(--text_color);
    transition: scale 0.2s ease;
}

header section:has(li:hover) {
    transform: scale(1.05);
}

header section li:hover {
    color: var(--title_color);
    cursor: pointer;
}

header section li:active {
    transform: scale(0.95);
}

header section li a::before,
.skills_list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
}

.avatar {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 45px;
}

.name_info {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 45px;
}

.round:hover {
    scale: 1.15;
}

.round {
    transition: scale 0.2s ease;
}

.selectWrapper {
    font-family: "MyPixelFont", sans-serif;
    font-size: var(--title_Second_font);
    color: var(--text_light_color);
    position: relative;
    height: 50px;
    width: 100%;
    z-index: 2;
}

.custom-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 45px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: height 0.3s ease;
    z-index: 3;
}

.custom-select.active .options {
    bottom: 0px;
}

.custom-select.active {
    height: calc(100% + 153px);
}

.selected {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--title_color);
    z-index: 4;
    pointer-events: none;
}

.options {
    position: absolute;
    width: 100%;
    bottom: -153px;
    background: rgba(0, 0, 0, 0.3);
    transition: bottom 0.3s ease;
}

.options li {
    width: 100%;
    display: grid;
    place-items: center;
    height: 51px;
    cursor: pointer;
    transition: background 0.25s ease;
}

.options li:hover {
    background: rgba(160, 160, 160, 0.4);
}

.switch {
    font-size: 16px;
    margin: 10px;
    position: relative;
    display: inline-block;
    width: 3.5em;
    height: 2em;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    box-shadow: 0 0 0 2px var(--RedOutline);
    border: 4px solid transparent;
    overflow: hidden;
    transition: .4s;
    background: transparent;
}

.slider:before {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background-color: var(--RedBorder);
    transform: translateX(-50%);
    transition: .2s;
}

input:focus:checked+.slider {
    box-shadow: 0 0 0 2px var(--RedOutline);
}

input:checked+.slider:before {
    transform: translateX(1.5em);
}

.projects-body {
    overflow: hidden; 
    transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in-out, padding 0.3s ease-in-out;
    max-height: 2000px; 
    opacity: 1;
}
.projects.collapsed .projects-body {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: none; 
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 12px;
}

.section-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--RedOutline);
    color: var(--title_color);
    border-radius: 45px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.1s;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.projects.collapsed .section-toggle {
    transform: rotate(-180deg);
}

.projects.collapsed {
    transition: border-radius 0.1s ease;
}

/* Media Queries */
@media (max-width: 1535px) {
    .midl {
        grid-template-columns: 1fr 1fr;
    }

    .experience {
        grid-column: 1;
        grid-row: 1;
    }

    .languages {
        grid-column: 2;
        grid-row: 1;
    }

    .summary {
        grid-column: 1 / 3;
        grid-row: 2;
    }

    .Hobbies {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }

    .Hobbies section:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1200px) {
    main h2 {
        font-size: 19px;
    }

    .projects-body {
        flex-direction: column;
    }

    .midl {
        grid-template-columns: 1fr;
    }

    .experience,
    .languages,
    .summary {
        grid-column: 1;
        grid-row: auto;
    }

    .summary {
        grid-row: 2;
    }
}

@media (max-width: 992px) {
    .resume {
        width: calc(min(1590px, 100%) - 4vw);
        margin: 2vw auto 0;
        flex-direction: column;
    }

    header {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(10, 1fr);
        grid-template-rows: auto auto auto;
        gap: 20px;
        padding: 30px;
        grid-template-areas:
            "name name name name name name kont kont kont kont"
            "name name name name name name media media media media"
            "link link link link lang lang lang lang lang lang";
    }

    .links {
        grid-area: link;
        margin: 0;
        position: unset;
        bottom: unset;
    }

    .name_info {
        grid-area: name;
    }

    header section:nth-of-type(2) {
        grid-area: kont;
    }

    header section:nth-of-type(3) {
        grid-area: media;
    }

    .info_stiky {
        display: contents;
    }

    .selectWrapper {
        grid-area: lang;
        height: 100%;
    }

    .options {
        bottom: -30vw;
    }

    .custom-select.active {
        height: calc(100% + 30vw);
    }

    .options li {
        height: 10vw;
    }

    .social_media,
    .contact_information {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }

    .contact_information {
        font-size: 2vw;
    }

    .skills,
    .summary {
        text-align: left;
    }

    .summary p {
        font-size: 3vw;
    }

    header section li a::before,
    .skills_list li::before {
        top: 0vw;
        width: 4vw;
        height: 4vw;
    }

    article li {
        padding-left: 7vw;
        line-height: 7vw;
    }

    article li::before {
        top: 0.5vw;
        width: 6vw;
        height: 6vw;
    }

    .skills_list li::before {
        top: 0.4vw;
    }

    header section li,
    .skills_list li {
        padding-left: 5vw;
        line-height: 4vw;
    }

    .skills_list li {
        line-height: 5vw;
    }

    header h2,
    main h2 {
        padding: 3vw 4vw;
    }

    h1 {
        padding-top: 2vw;
        line-height: 5vw;
    }

    header p {
        line-height: 3vw;
        padding: 2vw;
    }

    main h2 {
        font-size: var(--title_font);
    }

    footer {
        margin: 2vw;
        width: calc(min(1590px, 100%) - 4vw);
    }

    footer p {
        padding: 2vw;
    }

    body {
        --title_Main_font: 6vw;
        --title_Second_font: 4vw;
        --small_font: 2.5vw;
        --title_font: 4.5vw;
        --label_font: 1.5vw;
        --midl_font: 3.8vw;
        --title_font: 4vw;
    }

    .experience p {
        margin-top: 2vw;
    }

    .experience h3 {
        margin-bottom: 2.5vw;
    }

    header {
        width: 100%;
        gap: 2vw;
        padding: 3vw;
    }

    .name_info,
    header section,
    .education,
    .skills,
    .projects,
    .experience,
    .languages,
    .custom-select,
    .avatar,
    .links,
    footer p,
    .summary,
    .resume,
    header,
    .tr,
    .resume::before,
    header::before {
        border-radius: 8vw;
    }

    .trr,
    .edu-info,
    .skills_list,
    .summary_text,
    .projects-body,
    .social_media,
    .contact_information {
        padding: 2vw 4vw;
        border-radius: 0px 0px 8vw 8vw;
    }

    .project-card,
    .project-card img {
        border-radius: 6.5vw;
    }

    .projects-body,
    .project-info {
        padding: 2vw;
    }

    .project-info {
        gap: 1vw;
    }

    article {
        padding: 2vw 4vw;
    }

    .links {
        padding: 1vw;
        gap: 1vw;
    }

    .midl,
    .projects-body,
    .Hobbies {
        gap: 3vw;
    }

    main {
        gap: 3vw;
        padding: 3vw;
    }

    .project-stack {
        gap: 2vw;
        padding-top: 2vw;
    }

    .stack-tag,
    .year,
    .project-badge {
        padding: 0.7vw 2vw;
        border-radius: 1.5vw;
    }

    .edu-info {
        gap: 3vw;
    }

    .edu-item {
        padding: 0px 2vw;
        gap: 1vw;
        border-left: 0.4vw solid var(--RedBorder);
    }

    .edu-item::before {
        left: -1.1vw;
        top: 0.4vw;
        width: 2vw;
        height: 2vw;
    }

    .switch {
        font-size: 3.5vw;
        margin: 2vw;
    }

    .slider {
        border-radius: 8vw;
        box-shadow: 0 0 0 0.5vw var(--RedOutline);
        border: 1vw solid transparent;
    }

    .slider:before {
        border-radius: 8vw;
    }

    input:focus:checked+.slider {
        box-shadow: 0 0 0 0.5vw var(--RedOutline);
    }

    .section-header {
        padding-right: 2vw;
    }

    .section-toggle {
        border-radius: 8vw;
        font-size: 3vw;
        width: 8vw;
        height: 8vw;
    }
}