/*===== GOOGLE FONTS =====*/
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap");


/*===== VARIABLES CSS =====*/
:root{
    --header-height: 3rem;
    --font-medium: 500;
}
@media screen and (min-width: 768px) {
  :root {
    --header-height: 4rem; /* меняем переменную, а не сам стиль */
  }
}


/*===== Colores =====*/
:root{
    /*--first-color: #5361FF;*/
    --first-color: #F0FE01;
    --white-color: #FAFAFF;
    --dark-color: #2A3B47;
    --text-color: #697477;
    --text-color-hls: 194 6% 44%; /* hsl */
}

/*===== Fuente y tipografia =====*/
:root{
    --body-font: 'Montserrat', sans-serif;
    --big-font-size: 6.25rem;
    --h2-font-size: 1.25rem;
    --normal-font-size: .938rem;
    --small-font-size: .813rem;
}
@media screen and (min-width: 768px){
    :root{
        --big-font-size: 10.5rem;
        --h2-font-size: 2rem;
        --normal-font-size: 1rem;
        --small-font-size: .875rem;
    }
}

/*===== Margenes =====*/
:root{
    --mb-1: .5rem;
    --mb-2: 1rem;
    --mb-3: 1.5rem;
    --mb-4: 2rem;
}

/*===== z index =====*/
:root{
    /*--z-fixed: 100;*/
    --z-fixed: 1;
}

/*===== BASE =====*/
*,::before,::after{
    box-sizing: border-box;
}
html{
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    overflow-y: auto;
}
body{
    /*margin: var(--header-height) 0 0 0;*/
    margin: 0;
    overflow-y: auto;
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
    color: var(--text-color);
    line-height: 1.6;
}
.content-with-scroll {
  z-index: 200;
  position: relative; /* нужен position для работы z-index */
}
h1,h2,p{
    margin: 0;
}
ul{
    margin: 0;
    padding: 0;
    list-style: none;
}
a{
    text-decoration: none;
    color: var(--text-color);
}
img{
    max-width: 100%;
    height: auto;
    display: block;
}

/*===== CLASS CSS ===== */
.section{
	display: block;
    padding: 0;
    min-height: calc(100vh - var(--header-height));
    height: auto;
}
.section-title{
    position: relative;
    width: fit-content; /* Or width: max-content; */
    margin: var(--mb-4) auto 0 auto;
    font-size: var(--h2-font-size);
    color: var(--dark-color);
    text-align: center;
}
.section-title::after{
    position: absolute;
    content: "";
    height: .18rem;
    left: 0;
    right: 0;
    margin: auto;
    top: 2rem;
    background-color: var(--first-color);
}

/*===== LAYOUT =====*/
.bd-grid{
    max-width: 1024px;
    display: grid;
    grid-template-columns: 100%;
    grid-column-gap: 2rem;
    width: calc(100% - 2rem);
    margin-left: var(--mb-2);
    margin-right: var(--mb-2);
}
.l-header{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
	max-width: 100%;
    height: var(--header-height);
    z-index: var(--z-fixed);
    background-color: var(--first-color);
}

/*===== NAV =====*/
.nav{
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
@media screen and (max-width: 768px){
    .nav__menu{
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 80%;
        height: 100%;
        padding: 2rem;
        background-color: rgba(255,255,255,.3);
        transition: .5s;
        backdrop-filter: blur(10px);
    }
}
.nav__item{
    margin-bottom: var(--mb-4);
}
.nav__link{
    position: relative;
    color: var(--dark-color);
}
.nav__link:hover{
    color: var(--first-color);
}
.nav__logo{
	font-size: var(--h2-font-size);
    color: var(--dark-color);
    font-weight: bold;
    font-style: italic;
    /*font-style: oblique;*/
    font-family: 'Montserrat', Arial, sans-serif;
}
.nav__toggle{
    color: var(--dark-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/*=== Show menu ===*/
.show{
    right: 0;
}

/*Active menu*/
.active::after{
    position: absolute;
    content: "";
    width: 100%;
    height: .18rem;
    left: 0;
    top: 2rem;
    background-color: var(--first-color);
}

/*===== HOME =====*/
.home{
    position: relative;
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
    min-height: calc(100vh - var(--header-height));
    background-color: var(--first-color);
    overflow: hidden;
}
.home__container{
    row-gap: 5rem;
    height: 100%;
}
.home__title{
    align-self: center;
    font-size: var(--big-font-size);
    color: var(--text-color);
    line-height: .8;
}
.home__title span{
    text-shadow: 0 20px 25px rgba(0,0,0,.5);
}
.home__scroll{
    align-self: flex-end;
    padding-bottom: var(--mb-2);
}
.home__scroll-link{
    writing-mode: vertical-lr;
    transform: rotate(-180deg);
    color: var(--dark-color);
}
.home__img{
    position: absolute;
    right: 0;
    bottom: 0;
    width: 295px;
    
    will-change: opacity, transform;
	opacity: 0;
    /*transition: opacity 0.4s ease, transform 0.4s ease;*/
    transform: translateX(80px);
    transition: opacity 2s cubic-bezier(0.5, 0, 0, 1), transform 2s cubic-bezier(0.5, 0, 0, 1);
}
.home__img.visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 2s cubic-bezier(0.5, 0, 0, 1) 0.4s, transform 2s cubic-bezier(0.5, 0, 0, 1) 0.4s;
}

/* ===== ABOUT =====*/
.about__container{
    row-gap: 2rem;
    text-align: center;
}
.about__img{
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    width: 120px;
    height: 120px;
    background-color: var(--first-color);
    border-radius: 50%;
    overflow: hidden;
}
.about__img img{
    width: auto;
}

.about__subtitle{
    font-size: var(--h2-font-size);
    color: var(--text-color);
    margin-bottom: var(--mb-1);
}
.about__text{
    margin-bottom: var(--mb-4);
}
.about__profession{
    display: block;
    margin-bottom: var(--mb-4);
}
.about__social-icon{
    font-size: 1.4rem;
    margin: 0 var(--mb-1);
}
.about__social-icon:hover{
    color: var(--first-color);
}

/* ===== SKILLS =====*/
.skills__container{
    row-gap: 2rem;
}
.skills__subtitle{
    color: var(--first-color);
    margin-bottom: var(--mb-3);
    text-shadow: 1px 1px 0 hsl(var(--text-color-hls) / 0.2);
}
.skills__name{
    display: inline-block;
    font-size: var(--small-font-size);
    margin-right: var(--mb-2);
    margin-bottom: var(--mb-3);
    padding: .25rem .5rem;
    background-color: var(--white-color);
    border-radius: .25rem;
}
.skills__name:hover{
    background-color: var(--first-color);
    color: var(--white-color);
}
.skills__img img{
	margin-bottom: var(--mb-3);
    border-radius: .5rem;
}


/* ===== Modal default styles =====*/
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0); /* Black background with opacity */
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    position: relative;
    background-color: #f4f4f4;
	margin: 10% auto;
	padding: 20px;
	border-radius: 10px;
	width: 60%;
	max-width: 900px;
	box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.image-gallery {
    display: flex; /* Use flexbox to display images side by side */
    justify-content: space-between; /* Space between images */
    margin-top: 10px;
}

.gallery-image {
    width: 48%; /* Set width to a percentage to allow space between images */
    height: auto; /* Maintain aspect ratio */
    transition: transform 0.5s ease; /* Optional: add transition for effects */
}

/* Modal Content */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
}

/* Close Button */
.close {
	position: absolute;
	top: 15px;
	right: 20px;
	font-size: 30px;
	cursor: pointer;
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.experiences {
    margin: 2rem 0;
}

.experience {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid #ccc; /* Pour ajouter une bordure */
    border-radius: 5px; /* Pour arrondir les coins */
}

.experience__title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.experience__text {
	font-size: 1.1em;
	line-height: 1.6;
	margin-bottom: 20px;
}

.experience .section-title {
	font-size: 24px;
	font-weight: bold;
	margin-bottom: 15px;
	text-align: center;
}

.icon-text {
	display: flex;
	align-items: center;
	font-size: 1.1em;
}

.icon-text i {
	margin-right: 10px;
	font-size: 1.3em;
	color: #007bff;
}

/* Styles pour centrer la vidéo */
.video-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 20px;
}

.video-container h3 {
	margin-bottom: 15px;
	font-size: 20px;
}

video {
	max-width: 100%;
	border-radius: 10px;
	box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* Adaptation pour les écrans plus petits */
@media screen and (max-width: 768px) {
	.modal-content {
		width: 90%;
	}
}


/* ===== PORTFOLIO =====*/
.portfolio{
    background-color: var(--white-color);
}
.portfolio__container{
    justify-items: center;
    row-gap: 2rem;
}
.portfolio__img{
    position: relative;
    overflow: hidden;
}
.portfolio__img img{
    border-radius: .5rem;
}
.portfolio__link{
    position: absolute;
    bottom: -100%;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255,255,255,.3);
    border-radius: .5rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: .3s;
}
.portfolio__img:hover .portfolio__link{
    bottom: 0;
}
.portfolio__link-name{
    color: var(--dark-color);
}

/* ===== CONTACT =====*/
.contact__container{
    row-gap: 2rem;
}
.contact__subtitle{
    font-size: var(--normal-font-size);
    color: var(--first-color);
}
.contact__text{
    display: inline-block;
    margin-bottom: var(--mb-2);
}
.contact__inputs{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1rem;
}
.contact__input{
    width: 100%;
    padding: .8rem;
    outline: none;
    border: 1.5px solid var(--dark-color);
    font-size: var(--normal-font-size);
    margin-bottom: var(--mb-4);
    border-radius: .5rem;
}
.contact__button{
    display: block;
    background-color: var(--first-color);
    color: var(--white-color);
    padding: .75rem 2.5rem;
    margin-left: auto;
    border-radius: .5rem;
    border: none;
    outline: none;
    font-size: var(--normal-font-size);
    cursor: pointer;
}

/* ===== FOOTER=====*/
.footer{
    background-color: var(--dark-color);
}
.footer__container{
    row-gap: 2rem;
}
.footer__title{
    font-size: var(--normal-font-size);
    color: var(--white-color);
    margin-bottom: var(--mb-2);
}
.footer__link{
    padding: .25rem 0;
}
.footer__link:hover{
    color: var(--first-color);
}
.footer__social{
    font-size: 1.4rem;
    margin-right: var(--mb-1);
}
.footer__social:hover{
    color: var(--first-color);
}

/* ===== MEDIA QUERIES =====*/
/* For small devices */
@media screen and (max-width: 320px) {
  .home__img {
    width: 230px;
  }
}

@media screen and (min-width: 768px){
    body{
        margin: 0;
    }
    .section{
        padding-top: 4rem;
        min-height: calc(100vh - var(--header-height));
    }
    .section-title{
        margin-bottom: 3rem;
    }
    .section-title::after{
        top: 3rem;
    }

	.l-header{
		position: fixed;
		left: 0;
		right: 0;
		/*width: 100vw; /* 100vw учитывает scrollbar */
		max-width: 100%;
        height: var(--header-height);
    }
    .nav{
        height: var(--header-height);
    }
    .nav__list{
        display: flex;
    }
    .nav__item{
        margin-left: var(--mb-4);
        margin-bottom: 0;
    }
    .nav__toggle{
        display: none;
    }
    .nav__link{
        color: var(--text-color);
    }
    .nav__link:hover{
        color: var(--text-color);
    }
    .active::after{
        background-color: var(--text-color);
    }

	.home{
		margin-top: var(--header-height);
		height: calc(100vh - var(--header-height));
	}

    .home__container{
        grid-template-rows: 1.7fr 1fr;
        row-gap: 0;
        height: 100%;
    }
    .home__img{
        width: 524px;
        right: 10%;
    }

    .about__container{
        grid-template-columns: 1fr 3fr;
        align-items: start;
        text-align: initial;
        padding: 4rem 0;
    }
    .about__img{
        width: 200px;
        height: 200px;
    }
    .about__img img{
        width: auto;
    }

    .skills__container{
        grid-template-columns: repeat(2, 1fr);
        /*align-items: center;*/
    }

    .portfolio__container{
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        column-gap: 2rem;
    }

    .contact__container{
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
    }
    .contact__form{
        width: 380px;
    }

    .footer__container{
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
    }
}

@media screen and (min-width: 1024px){
    .bd-grid{
        margin-left: auto;
        margin-right: auto;
    }
}

/* For tall screens on mobiles y desktop*/
@media screen and (min-height: 721px) {
    .home__container {
        height: 640px;
    }
    .home__img {
        width: 500px;
        right: 24%;
    }
}
