* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body{ background: #5f5e5e;}
h1{
text-shadow: 2px 2px 8px rgba(0,0,0,0.4);}

#home{
    background:url("fon/7.jpg") center/cover no-repeat;

    min-height:100vh;

    display:flex;
    justify-content:flex-start;
    align-items:center;

}
#text_home {
    color: #e5e5e5;
    font-size: 25pt;
    font-family: 'Times New Roman', Times, serif;

   margin-left: auto;
    margin-right: 6%;
    margin-top: 12vh;
    padding-top: 0;
}




#about {
  background: url("fon/5.jpg") center/cover no-repeat;
  min-height: 100vh;
  justify-content: center;
  padding-top: 10px;
  position: relative;
}
.about-text {
    max-width: 50%;
    margin: 90px 0 0 30px ;
    color: #e5e5e5;
    text-align: left;
}

.about-text h2 {
    font-size: 26px;
    margin-bottom: 15px;
}
.about-text h3 {
    font-size: 36px;
    margin-bottom: 40px;
}
.about-text p {
    font-size: 20px;
    line-height: 1.1;
    margin-bottom: 25px;
}
#experience{
 position: absolute;
  top: 100px;
  right: 100px;
  width: 30%;
  margin-left: 0;
}
#experience h3{
  font-size: 24px;
    margin-bottom: 30px;
}
#education h3{
  font-size: 24px;
    margin-bottom: 30px;
     margin-top: 20px;

}
#education {
   position: absolute;
  top: 380px;
  right: 100px;
  width: 30%;
  margin-left: 0;
}

#experience,
#education {
  

 display: block;
  width: 30%;
  margin-left: 55%;
  margin-top: 10px;

  color: #e5e5e5;
  font-size: 18px;
  line-height: 1.6;

  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 20px;
}

#serteficat {
    display: grid;
    grid-template-columns: repeat(4, 200px);
    gap: 40px;
    margin-top: 150px;
    margin-left: 35px;
}


#serteficat img {
    width: 200px;
    height: auto;
    transition: transform 0.3s ease;
    cursor: pointer;
}


#serteficat img:hover {
    transform: scale(2);
    z-index: 10;
}


#portfolio {
  background: linear-gradient(to bottom, #514c50, #bdbcbc);
    min-height: 110vh;
  margin: 0 auto;
 }

.title-portfolio {
  text-align: center;
  font-size: 35px;
  font-weight: 600;
  color: #e5e5e5;
  margin-top: 40px;
  letter-spacing: 1px;
}

.portfolio-intro {
  max-width: 700px;
  margin: 20px auto 40px auto;

  font-size: 20px;
  line-height: 1.6;
  color: #e5e5e5;

  text-align: center;
  opacity: 0.9;
}

  .portfolio-grid {
  display: flex;
  justify-content: center;   /* центр по горизонтали */
  align-items: center;
  gap: 30px;

  flex-wrap: wrap;

  margin-top: 40px;
}


.post-wrap {
    max-width: 1200px;
    margin: 0 auto;

    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    gap: 30px;
    padding: 0;
}

.post-item {
    width: min(300px, 30%);
    min-width: 180px;
    padding: 0;
}

.post-link {
    text-decoration: none;
    display: block;
}

.post-item-wrap {
    overflow: hidden;
    position: relative;
}

.post-item img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 5;
    height: auto;
    object-fit: cover;
}

.text-wrapper {
    position: absolute;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 10;
    width: 86%;
    padding: 20px;
    background: #F5F5F5;
    transform: translate3d(-100%, 0, 0);
    transition: transform .5s cubic-bezier(.33, .02, 0, .93);
}

.post-item:hover .text-wrapper {
    transform: translate3d(0, 0, 0);
    transition: transform .5s cubic-bezier(.33, .02, 0, .93) .3s;
}

.overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 5;
    background: #636262;
    transform: translate3d(-100%, 0, 0);
    transition: transform .4s cubic-bezier(.33, .02, 0, .93) .2s;
}

.post-item:hover .overlay {
    transform: translate3d(0, 0, 0);
    transition: transform .5s cubic-bezier(.33, .02, 0, .93);
}

.post-cat {
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #2A2A2A;
    font-weight: 500;
     font-size: 24px;
}

.post-title {
    font-size: 20px;
    font-weight: 400;
    color: #2A2A2A;
    font-style: italic;
}
.more-btn {
    display: block;
    width: fit-content;
    margin: 50px auto 0;
    padding: 14px 28px;

    color: #e5e5e5;
    text-decoration: none;
    font-size: 18px;

    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: rgba(0,0,0,0.4);

    transition: .3s;
}

.more-btn:hover {
    background: rgba(255,255,255,0.15);
}


#contact {
  background: url("fon/41.jpg") center/cover no-repeat;
  min-height: 110vh;
  margin: 0 auto;

  display: flex;
  justify-content: center;
  align-items: center;


}

#contact::after {
  content: "";
  position: absolute;
  inset: 0;

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(8px);

  background: rgba(0,0,0,0.6);
}
.contact1{
    width:45%;
    height:60vh;

    max-width:1200px;
    min-height:400px;

    background:rgba(255,255,255,.7);
    border-radius:20px;
    padding:60px;
    box-sizing:border-box;

    display:flex;
    flex-direction:column;
    justify-content:center; /* центр по вертикали */
    align-items:center;     /* центр по горизонтали */

    text-align:center;      /* текст по центру */

    font-size:26px;
    line-height:2;

    box-shadow:0 20px 50px rgba(0,0,0,.35);
    z-index:2;
}

.contact1 a:hover {
  opacity: 1;

}
section {

  background-repeat: no-repeat;
  background-position: center;
  padding: 80px 50px;
  position: relative;
}

section::after {
  content: "";
  position: absolute;
  inset: 0;

  background: rgba(0,0,0,0.5);}

  
section > * {
  position: relative;
  z-index: 2;
}
.game-button {
    width: 100%;
    margin-top: 10px;
    padding: 12px;

    background: rgba(0,0,0,0.5);
    color: #e5e5e5;

    border: 1px solid #e5e5e5;
    border-radius: 8px;

    font-size: 16px;
    cursor: pointer;

    transition: 0.3s;
}

/* HEADER СВЕРХУ */
.header {
  width: 100%;
  height: 70px;
  background-color: #808080;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #e5e5e5;
}

/* MENU */
.menu {
  display: flex;
  gap: 25px;
}

.menu a {
  text-decoration: none;
  color: #2B2B2B;
  font-size: 18px;
  padding: 6px 12px;
}
#serteficat {
    display: grid;
    grid-template-columns: repeat(4, 200px);
}


/* меньше 1700px */
@media (max-width:1700px){

    #serteficat{
        grid-template-columns:repeat(3,200px);
    }

}


/* ========================= */
/* Ноутбуки */
/* ========================= */
@media (max-width:1260px){
 #serteficat{
        grid-template-columns:repeat(2,200px);
        gap:30px;
    }
}
@media (max-width:1200px){

    /* HOME */

    #home{
       background-position:60% center;

    }

    #text_home{
        max-width:520px;
        margin-left:auto;
        margin-right:6%;

        font-size:30px;
    }

    #text_home h1{
        font-size:54px;
    }
 .post-cat{
        font-size:18px;
        margin-bottom:6px;
    }

    .post-title{
        font-size:16px;
        line-height:1.4;
    }



    .header{
    height:50px;
}

.menu{
    gap:25px;
}

.menu a{
    font-size:18px;
}


    /* ABOUT */

    .about-text{
        max-width:55%;
    }

    .about-text h2{
        font-size:26px;
    }

    .about-text h3{
        font-size:34px;
    }

    .about-text p{
        font-size:18px;
    }

    #experience,
    #education{
        width:35%;
        right:50px;
        font-size:18px;
    }

    #experience h3,
    #education h3{
        font-size:22px;
    }

}


/* ========================= */
/* Планшеты и телефоны */
/* ========================= */

@media (max-width:900px){

    section{
        padding:40px 20px;
    }

  
    #about,
    #portfolio{
        min-height:auto;
        height:auto;
    }


    /* HEADER */

   .header{
    height:50px;
}

.menu{
    gap:25px;
}

.menu a{
    font-size:18px;
}
    /* HOME */

   #home{
        background-position:65% center;
        min-height:100vh;

        justify-content:center;
        align-items:center;
    }

    #text_home{
        width:90%;
        max-width:500px;

        margin:0 auto;
        padding-top:0;

        text-align:center;
        font-size:22px;
    }

    #text_home h1{
        font-size:52px;
        margin-bottom:20px;
    }

 .post-cat{
        font-size:16px;
    }

    .post-title{
        font-size:14px;
        line-height:1.35;
    }


    /* ABOUT */

    .about-text{
        max-width:90%;
        margin:40px auto;
    }

    .about-text h2{
        font-size:28px;
    }

    .about-text h3{
        font-size:36px;
    }

    .about-text p{
        font-size:18px;
        line-height:1.5;
    }

    #experience,
    #education{
        position:static;
        width:90%;
        margin:20px auto;
        font-size:18px;
    }

    #experience h3,
    #education h3{
        font-size:22px;
    }


    /* CERTIFICATES */

    #serteficat{
        grid-template-columns:repeat(2,1fr);
        width:90%;
        max-width:500px;
        gap:20px;
        margin:40px auto;
    }

    #serteficat img{
        width:100%;
    }


    /* PORTFOLIO */

    .title-portfolio{
        font-size:32px;
    }

    .portfolio-intro{
        font-size:18px;
    }


    /* CONTACT */
#contact{
    min-height:100vh;

    display:flex;
    justify-content:center;
    align-items:center;
}
    .contact1{
        width:70%;
max-width:650px;
        height:auto;
        padding:35px;
        font-size:24px;
        line-height:2;
    }

    .contact1 h2{
        font-size:30px;
    }

}
@media (max-width:900px) and (orientation:landscape){

   .header{
        height:55px;
    }

    .menu{
        gap:12px;
    }

    .menu a{
        font-size:16px;
        padding:4px 0;
    }
 
    #home{
        min-height:100vh;
    }



    #text_home{
         margin-left:auto;
    margin-right:6%;
    }

}
@media (min-width:801px) and (max-width:900px){

    #home{
        min-height:90vh;

        justify-content:center;
        align-items:center;

        background-position:60% center;
    }

    #text_home{
        width:80%;
        max-width:700px;

        margin:0 auto;
        padding-top:0;

        text-align:center;

        font-size:25pt;
    }

    #text_home h1{
        font-size:54px;
        margin-bottom:20px;
    }
}
@media (max-width:700px){

    #text_home{
        width:90%;
        max-width:420px;

        margin:0 auto;

        text-align:center;

        font-size:18px;
    }

    #text_home h1{
        font-size:40px;
    }
 .contact1{
        width:70%;
max-width:470px;
        height:auto;
        padding:35px;
        font-size:24px;
        line-height:2;
    }
     .post-cat{
        font-size:15px;
    }

    .post-title{
        font-size:13px;
        line-height:1.3;
    }


}
@media (max-width:460px){

    #home{
        min-height:85svh;
         background-position:45% center;

    }
   .header{
        height:55px;
    }

    .menu{
        gap:16px;
    }

    .menu a{
        font-size:15px;
        padding:0;
    }
 .contact1{
        width:70%;
        height:auto;
        padding:35px;
        font-size:17px;
        line-height:2;
    }
.contact1 h2{
  font-size:24px;
}
  .post-cat{
        font-size:14px;
    }

    .post-title{
        font-size:12px;
        line-height:1.25;
    }
}