/*--------
|
| Setting Variables
|
|-------
*/
:root{

    /*.Fonts */
    --font-family-primary: "area-variable", Arial, sans-serif;
    
    /*.Font Sizes */
    --font-size-h1: 121.25px;
    --font-size-h2: 81px;
    --font-size-h3: 54px;
    --font-size-h4: 24px;
    --font-size-h5: 20px;
    --font-size-subh: 36px;
    --font-size-body: 16px; 
    --font-size-small: 14px;

    /*.Font Weights */
    --font-weight-thin: 100;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;

    --font-slant-regular: "slnt" -14;

    /*.Colors */
    --color-black: #000;
    --color-white: #ffffff;
    --color-purple: #8277FF;
    --color-yellow: #EFFF42;
    --color-grey-dark: #A6A09B;
    --color-grey-light: #F5F5F4;

    /*.Buttons
    --btn-font-size: 16px;
    --btn-padding: 8px 16px;*/
}

/*
|----------------------
|
|General styling
|
|----------------------
*/

body{
    font-family: var(--font-family-primary);
}


.btn {
    font-weight: var(--font-weight-medium);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 16px;
    border: 1.5px solid var(--color-black);
    width: fit-content;
    border-radius: 999px;
}

.btn--small {
    --btn-font-size: 14px;
    --btn-padding: 6px 14px;
}

.btn--large {
    --btn-font-size: 20px;
    --btn-padding: 10px 20px;
}

.btn svg {
    flex-shrink: 0;
}

.btn:hover {
    background-color: var(--color-purple);
    border: 1.5px solid var(--color-purple);
    color: var(--color-white);
}

.btn:hover svg path {
    stroke: var(--color-white);
}

.btn-right{
    padding: 8px 12px 8px 16px;
}

.btn-transition{
    transition: all 0.3s ease-in-out;
}



/*
|----------------------
 Mobile Design settings General
|----------------------
*/
.mobile-only {
    display: none;
}

.no-mobile {
    display: block;
}

@media (max-width: 850px) {

    .mobile-only {
        display: block;
    }

    .no-mobile {
        display: none;
    }
}


/*
|----------------------
|
Loading Screen
|
|----------------------
*/
.loading-screen {
    position: fixed;
    inset: env(safe-area-inset-top) 0 0 0;
    background: var(--color-purple);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;

    transition: opacity 0.3s ease-in-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#loading-text {
    color: var(--color-white);
    font-size: clamp(4rem, 12vw, 10rem);
    line-height: 1;
}

.loading-screen {
    opacity: 1;
}

#loading-text {
    visibility: hidden;
}

/*
|----------------------
|
|Nav bar
|
|----------------------
*/

/*
|----------------------
|
|Nav bar HOME
|
|----------------------
*/
.nav-home{
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 32px;

}

.nav-home-pages{
    color: var(--color-grey-dark);
    list-style:none;
    display: flex;
    gap: 16px;     

}

.nav-page-link-active{
    color: var(--color-black);
}

.nav-home-page-link:hover{
    color: var(--color-purple);
}

/* .nav-home-cta-button{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    text-decoration: underline;
}
 */
.nav-home-cta-button {
    position: relative;
    display: flex;
    align-items: center;


    text-decoration-line: underline;
        text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
        /* THIS is the important property */
        text-decoration-skip-ink: auto;
   

    padding-bottom: 4px;
}

.nav-home-cta-button svg {
    min-height: 20.5px;
    min-width: 28px;
 padding-right: 8px;
    border-bottom: 1.5px solid var(--color-black);
}

.nav-home-cta-button:hover{
    color: var(--color-purple);
    font-variation-settings: var(--font-slant-regular);
}

.nav-home-cta-button:hover svg{
    border-color: var(--color-purple);
    transform: translateX(2px);
}

.nav-home-cta-button:hover svg path{
    stroke: var(--color-purple);
}


/*
|----------------------
|
|Nav bar MAIN
|
|----------------------
*/
.nav-main {
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 32px;
    transition: all 0.3s ease;

}

.nav-main-annapospelov {
    font-weight: var(--font-weight-semibold);
}
.nav-main-annapospelov:hover {
    color: var(--color-purple);
    font-weight: var(--font-weight-medium);
}

.nav-main-pages {
    color: var(--color-grey-dark);
    list-style: none;
    display: flex;
    gap: 16px;

}

.nav-main-page-link:hover {
    color: var(--color-purple);
}

/* .nav-home-cta-button{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    text-decoration: underline;
}
 */
.nav-main-cta-button {
    position: relative;
    display: flex;
    align-items: center;


    text-decoration-line: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
    /* THIS is the important property */
    text-decoration-skip-ink: auto;


    padding-bottom: 4px;
}

.nav-main-cta-button svg {
    min-height: 20.5px;
    min-width: 28px;
    padding-right: 8px;
    border-bottom: 1.5px solid var(--color-black);
}

.nav-main-cta-button:hover {
    color: var(--color-purple);
    font-variation-settings: var(--font-slant-regular);
}

.nav-main-cta-button:hover svg {
    border-color: var(--color-purple);
    transform: translateX(2px);
}

.nav-main-cta-button:hover svg path {
    stroke: var(--color-purple);
}

.nav-hamburger {
    display: none;
}

@media (max-width: 700px) {

    /* show hamburger */
    .nav-hamburger {
        display: flex;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    /* hide normal nav items */
    .nav-main-pages,
    .nav-main-cta-button {
        display: none;
    }

    /* keep nav clean */
    .nav-main {
        justify-content: space-between;
    }

    /* FULL SCREEN MENU when open */
    .nav-main.open {
        position: fixed;
        inset: 0;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: 100vh;
        gap: 24px;
        z-index: 1000;
    }

    .nav-main.open .nav-main-pages {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    .nav-main.open .nav-main-annapospelov,
    .nav-main.open .nav-main-cta-button,
    .nav-main.open .nav-hamburger {
        display: none;
    }
}

/*
|
|
|
FOOTER 
|
|
|
*/


footer {
    padding: 0 32px;
    margin-top: 200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.footer-top {
    font-size: clamp(1.5rem, 0.1186rem + 6.907vw, 7.578125rem);
    font-weight: var(--font-weight-semibold);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(0.875rem, 0.8466rem + 0.142vw, 1rem);
}

.footer-bottom-socials {
    display: flex;
    align-items: center;
    gap: 16px;
}

@media (max-width: 600px) {
    .footer {
        margin-top: clamp(7.5rem, 6.0795rem + 7.1023vw, 13.75rem);
    }
}


/*
|----------------------
|
|Home Hero
|
|----------------------
*/

.home-hero{
        padding: 0 32px;
        padding-top: 16px;
}
.home-hero-top{
    display: flex;
    flex-direction: column;
    align-items: end;
    gap: 12px;
}
.home-hero-img {
    width: 100%;
    max-width: 288px;

    aspect-ratio: 3 / 4;

    height: auto;
    object-fit: contain;

    display: block;
}

.home-hero-expertise{
    list-style: none;
    text-align: right;
    font-weight: var(--font-weight-regular);

    line-height: 140%;
    color: var(--color-grey-dark);
}


.home-hero-bottom h1{
    font-size: clamp(2.25rem, 1.9943rem + 1.2784vw, 3.375rem);/* TO DO: ADJUST FONT SIZES DEPENDING ON SMALLEST SCREEN DESIGN*/
    font-weight: var(--font-weight-medium);
    margin-top:  8px;
    margin-bottom: clamp(0rem, 3.75rem - 4.2614vw, 3.75rem);
}

.home-hero-bottom h1 span{
    font-variation-settings: var(--font-slant-regular);
}



/*
|----------------------
|



|Home Work Overview


|
|----------------------
*/
.work-overview{
    display: flex;
    flex-direction: column;
    align-items: end;
    padding: 0 32px;
    gap: 20px;
}

.work-overview-gallery{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    gap: 16px;
}

.work-overview-gallery-item video,
.work-overview-gallery-item img{
    width: 100%;
    margin-bottom: 8px;
}

.work-overview-gallery-item {
    font-size: var(--font-size-h5);
    font-weight: var(--font-weight-regular);
    position: relative;
        overflow: hidden;
    line-height: 1.5;
    }

.work-overview-gallery-item img,
.work-overview-gallery-item video {
    width: 100%;
    display: block;
    margin-bottom: 8px;
    transition: opacity 0.3s ease;
}
.img-hover,
.video-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.work-overview-gallery-item:hover .video-default,
.work-overview-gallery-item:hover .img-default {
    opacity: 0;
}

.work-overview-gallery-item:hover .video-hover,
.work-overview-gallery-item:hover .img-hover {
    opacity: 1;
}

.work-overview-gallery-item span{
    font-size: var(--font-size-body);
    color: var(--color-grey-dark);
}


/*
|----------------------
Home Mobile Design settings|
|----------------------
*/

@media (max-width: 500px) {
    .nav-home-cta-button {
        display: none;
    }

    .nav-home {
        justify-content: center;
    }

    .nav-home-pages {
        width: 100%;
        justify-content: space-between;
    }

    .home-hero-img {
        max-width: 100%;
        width: 100%;
    }

    .home-hero {
        padding: 0 16px;
    }

    .work-overview {
        padding: 0 16px;
    }

    .footer {
       padding: 0 16px;
    }
}

@media (max-width: 1000px) {
    .work-overview-gallery {
        grid-template-columns: repeat(4, 1fr);
}
}
@media (max-width: 850px) {

    .home-hero-top {
        padding-bottom: 16px;
        align-items: start;

    }
    .work-overview-gallery { 
        grid-template-columns: repeat(3, 1fr);
}
}
@media (max-width:600px) {
    .work-overview-gallery {
        grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 370px){
    .work-overview-gallery {
        grid-template-columns: repeat(1, 1fr);
}
}
/*
|
|
|
|
|
|
|
WORK PROJECT PAGE
|
|
|

|
|
|

*/
.projects-page {

    padding: 100px 32px 0 32px;

}

.project-switcher {

    max-width: 684px;
    margin-bottom: 140px;

}

/*
|
PROJECT LIST
|
*/

#project-list {

    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    padding: 0;
    margin: 0;

    list-style: none;

    font-size: clamp(1.25rem, 1.1932rem + 0.2841vw, 1.5rem);
    line-height: 100%;

    font-weight: var(--font-weight-medium);

}

/* ITEM */
#project-list li {

    cursor: pointer;

}

/* INNER WRAPPER */
.project-list-inner {

    display: inline-flex;
    align-items: baseline;
    gap: 6px;

    color: var(--color-black);

}


.project-list-title {
    color: inherit;
}


.project-list-year {

    font-size: calc(clamp(1.25rem, 1.1932rem + 0.2841vw, 1.5rem) - 4px);
    color: var(--color-grey-dark);


}

/* COMMA */
#project-list li::after {

    content: ",";
    color: var(--color-black);


}

#project-list li:last-child::after {
    content: ".";
}


#project-list li:not(.active):hover .project-list-inner,
#project-list li:not(.active):hover::after {

    color: var(--color-purple);

}

#project-list li:not(.active):hover .project-list-year {
    color: var(--color-purple);
}

/* ACTIVE STATE */
#project-list li.active .project-list-inner {

    color: var(--color-purple);
    text-decoration: line-through;

}

#project-list li.active .project-list-year {

    color: var(--color-purple);

}

#project-list li.active::after {

    color: var(--color-purple);

}


#project-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 180px;
    height: auto;
    pointer-events: none;
    transform: translate(20px, 20px);
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 9999;

}

#project-preview img {

    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;

}


/* 
|
Project Slide
|
*/


.project-hero {

    display: grid;
    grid-template-columns: 1fr 180px 1fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 3rem;

}

.project-hero h1 {

    margin: 0;
    font-size: 81px;
    font-weight: var(--font-weight-semibold);

}

.project-hero__meta {

    color: var(--color-grey-dark);
    font-size: 1.2rem;

}


#project-year {

    margin-top: 0;
    font-size: 16px;
    line-height: 160%;

}

#project-categories {

    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    line-height: 160%;
    font-size: 16px;

}

#project-description {

    margin: 0;
    max-width: 620px;
    font-size: 16px;
    line-height: 160%;

}

#project-preview img,
#project-preview video,
.project-section img,
.project-section video {
    width: 100%;
    object-fit: cover;
    display: block;
}

.project-section video {
    autoplay: true;
}

.project-section {

    margin-bottom: 2rem;

}

.project-section--image-full {

    background: #ddd;

}

.project-section--image-full img {

    width: 100%;
    object-fit: cover;

}

.project-section--text-right {

width: 100%;
display: grid;
grid-template-columns: repeat(12, 1fr);
grid-template-areas: ". . . . . . . text text text text .";
}

.project-section--text-left {

    width: 100%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-areas: ". text text text text . . . . . . .";
}

.project-section--text-center {

    width: 100%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-areas: ". . . . text text text text . . . .";
}

.project-section--text-center .project-section--text-content{
    align-items: center;
    text-align: center;
}

.project-section--text-content{
    grid-area: text;
    display: flex;
    flex-direction: column;
    line-height: 160%;
}

.project-section--text h2 {

    margin: 0 0 1rem;

    font-size: 2rem;

}

.project-section--text-center,
.project-section--text-left,
.project-section--text-right {

    margin: 0;
    font-size: 16px;
    line-height: 160%;
    padding-bottom: 80px;
    padding-top: 48px;

}

.project-section--grid {

    display: grid;
    gap: 2rem;

}

.project-section--grid img {

    width: 100%;
    object-fit: cover;
    background: #ddd;

}

.project-section--grid-2 {

    grid-template-columns: repeat(2, 1fr);

}

.project-section--grid-3 {

    grid-template-columns: repeat(3, 1fr);

}

.project-section--grid-4 {
    grid-template-columns: repeat(4, 1fr);

}

.project-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: var(--font-weight-medium);
    padding-top: 48px;
}


.project-pagination.only-prev {
    justify-content: flex-start;
}


.project-pagination.only-next {
    justify-content: flex-end;
}

.project-pagination-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;

    text-decoration-line: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
    text-decoration-skip-ink: auto;

    padding-bottom: 4px;

    transition: all 0.2s ease;
}

.project-pagination-button svg {
    min-height: 20px;
    min-width: 28px;

    transition: all 0.2s ease;
}

.project-pagination-button svg path {
    transition: all 0.2s ease;
}

.project-pagination-button:hover {
    color: var(--color-purple);
    font-variation-settings: var(--font-slant-regular);
}

.project-pagination-button:hover svg path {
    stroke: var(--color-purple);
}

.project-pagination-button.prev:hover svg {
    transform: translateX(-2px);
}

.project-pagination-button.next:hover svg {
    transform: translateX(2px);
}

.mobile-text {
    display: none;
}



@media (max-width: 900px) {

    .nav {
        grid-template-columns: 1fr;
        gap: 1rem;

    }

    .nav__cta {
        justify-self: start;

    }

    .projects-page {
        padding-inline: 24px;
    }

    .project-list {
        line-height: 120%;
    }
    .project-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-title {
        font-size: clamp(3.375rem, 2.9915rem + 1.9176vw, 5.0625rem);
        line-height: 0.8;
    }


    .project-section--grid-2,
    .project-section--grid-3,
    .project-section--grid-4 {
        grid-template-columns: 1fr;

    }

    .project-section--text-center,
    .project-section--text-left,
     .project-section--text-right {
        grid-template-columns: 1fr;
        font-size: var(--font-size-body);
        line-height: 140%;
        padding-bottom: 80px;
        padding-top: 48px;
    }
}


@media (max-width:550px) {

    .nav-main,
    .projects-page {
        padding-inline: 16px;
            }

    .desktop-text {
        display: none;
    }

    .mobile-text {
        display: inline;
    }

}
        


/*
|
|
|
|
|
| ABOUT PAGE
|
|
|
|
|
*/
.about-page {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    padding: 16px 32px;
    align-items: start;
}

/* =========================
   TEXT COLUMN
========================= */

.about-page-content {
    grid-column: 1 / span 4;

    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-page-title {
    font-size: clamp(5.0625rem, 4.4872rem + 2.8764vw, 7.59375rem);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 8px;
}

.about-page-text {
    line-height: 1.6;
    font-size: var(--font-size-body);
}


.about-page-buttons {
    padding-top: clamp(1.25rem, -0.1705rem + 7.1023vw, 7.5rem);;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.about-page-image {
    grid-column: 8 / span 5;
}

.about-page-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 5;
}

/* CV SECTION */

.about-page-cv {
    grid-column: 8 / span 5;
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding-top: 20px;
}

.cv-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 24px;
    align-items: start;
}

.cv-title {
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-regular);
    margin: 0;
    line-height: 1.6;
}

.cv-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    line-height: 1.6;
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-regular);
}

.cv-content p{
    margin-bottom: 8px;
}

.cv-content span{
    color: var(--color-grey-dark);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-thin);
}

.cv-content-language {
    line-height: 1.6;
    font-size: var(--font-size-body);
}

.cv-content-language span{
    color: var(--color-grey-dark);
    font-weight: var(--font-weight-thin);
    font-size: var(--font-size-body);
}



@media (max-width: 1500px) {

    .about-page-content {
        grid-column: 1 / span 5;
    }
}

@media (max-width: 1150px) {
    .about-page-content {
        grid-column: 1 / span 6;
    }
}




@media (max-width: 800px) {

    .about-page {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .about-page-content,
    .about-page-image,
    .about-page-cv {
        grid-column: auto;
    }

    .about-page-image {
        order: -1;
    }

    .about-page-h1 {
        display: none;
    }

    .about-page-text {
        display: block;
    }

    .about-page-buttons {
        display: flex;
    }

    .btn--large {
        padding: 8px 12px 8px 16px;
        font-size: 14px;
    }

    .about-page-cv {
        width: 100%;
        order: 1;
        gap: 48px;
        margin-top: 60px;

    }

    .cv-section {
        grid-template-columns: 1fr;
        row-gap: 16px;
    }

    .cv-title {
        font-weight: var(--font-weight-semibold);
    }

    .cv-content {
        display: flex;
        flex-direction: column;
       
    }
}


/*
|
|
|
CONTACT PAGE
|
|
|
*/


.contact-page {
    padding: clamp(3rem, 1.9773rem + 5.1136vw, 7.5rem) 32px 48px 32px;
}

.contact-title {
    grid-area: title;
    font-size: clamp(5.0625rem, 4.4872rem + 2.8764vw, 7.59375rem);
    font-weight: var(--font-weight-semibold);
    line-height: 100%;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    padding-block: 48px 200px;
}

.contact-content-text {
    grid-column: 2 / span 4;
    line-height: 150%;
    font-size: var(--font-size-body);
}

.contact-content-text p {
    padding-top: 20px;
}

.contact-content-socials {
    grid-column: 7 / span 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (max-width: 1000px) {
    .contact-content {
        grid-template-columns: 12, 1fr;
        gap: 48px;
        padding: 32px 0;
    }

    .contact-content-text {
        grid-column: 1 / span 6;
        order: 1;
    }

    .contact-content-socials {
        grid-column: 1;
        order: 2;
    }
}





/*
|
|
|
|
SNAKE GAME
|
|
|
|
|
*/

/*
#gameContainer {
    display: flex;
    flex-direction: column;
    text-align: center;
}

*/

#gameContainer {
    position: relative;
    width: 100%;
}

#gameBoard {
    width: 100%;
    display: block;
    background: var(--color-purple);
}

#scoreText {
    position: absolute;
    top: 20px;
    left: 20px;

    color: var(--color-black);
    font-size: var(--font-size-h4);
    font-weight: var(--font-weight-medium);
    z-index: 10;
}

@media (max-width: 1000px){
    #gameContainer {
        display: none;
    }
}