html{
  scroll-behavior: smooth;
}

.burger{
  display: none;
  position: relative;
  background: none;
  border: none;
  color: black;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.burger_icon,
.burger_icon::before,
.burger_icon::after{
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.burger_icon{
  position: relative;
  margin: auto;
  transition: background-color 0.18s ease;
}

.burger_icon::before,
.burger_icon::after{
  content: "";
  position: absolute;
  left: 0;
  transition: top 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.burger_icon::before{
  top: -7px;
}

.burger_icon::after{
  top: 7px;
}

.burger[aria-expanded="true"]{
  color: #f59e0b;
  transform: rotate(90deg);
}

.burger[aria-expanded="true"] .burger_icon{
  background: transparent;
}

.burger[aria-expanded="true"] .burger_icon::before,
.burger[aria-expanded="true"] .burger_icon::after{
  top: 0;
}

.burger[aria-expanded="true"] .burger_icon::before{
  transform: rotate(45deg);
}

.burger[aria-expanded="true"] .burger_icon::after{
  transform: rotate(-45deg);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

nav{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    backdrop-filter: blur(10px);      
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 300px;
    box-sizing: border-box;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    font-weight: bold;
    transition: all 0.3s;
}


body{
    margin: 0px;
    background-color: whitesmoke;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select{
    font: inherit;
}

.logo{
    width: 40%;
}

.navigation{
    display: flex;
    align-items: center;
    gap: 30px;
}

.navigation a{
    color: black;
    text-decoration: none;
    font-size: 20px;
    transition: color 0.5s ease, border-bottom-color 0.3s ease;
}

section{
    color: black;
    padding:  100px 300px;
    width: 100%;
    box-sizing: border-box;
}

section:nth-child(2n){
    background-color: white;
}

#home{
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    background: #020617;
}

.main_button:hover {
    background-color: white;
    color: orange;
}

.main_button{
    background-color: orange;
    font-size: x-large;
    border-radius: 5px;
    padding: 14px 5px;
    border: 2px solid orange;
    color: white;
    width: 20%;

    transition: background-color 0.3s, color 0.3s;
}

.main_button,
.secondary_button{
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.secondary_button{
    background-color: whitesmoke;
    font-size: x-large;
    border-radius: 5px;
    padding: 14px 5px;
    border: 2px solid orange;
    color: orange;
    width: 21%;
    transition: background-color 0.3s, color 0.3s;
    margin-left: 40px;
}

#downloadCV{
  white-space: nowrap;
}

.secondary_button:hover{
    background-color: orange;
    color: whitesmoke;
}

.navigation a:hover,
.navigation a:focus {
    color: #fec110;
}

.default_text{
    margin: 0 0 14px;
    font-size: 16px;
}

.text h1{
    max-width: 11ch;
    font-size: clamp(72px, 7.5vw, 120px);
    line-height: 0.95;
    margin-bottom: 0;
    margin-top: 0;
    color: white;
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    animation: heroNameFade 1.25s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.services_text h2{
    font-size: 40px;
    margin-bottom: 0;
    margin-top: 0;
    color: #32333c;
}

.services_text{
    text-align: center;
    width: 50%;
    font-size: 18px;
    color: #84828d;
    margin-bottom: 50px;
}

hr{
    width: 80px;
    background-color: orange;
    filter: drop-shadow(0 0 5px orange);
}

.secondary{
    font-size: clamp(24px, 2.2vw, 34px);
    width: 100%;
    max-width: 760px;
    color: rgb(212, 201, 201);
    opacity: 0;
    transform: translateX(-100px);
    animation: slideSide 1.5s ease forwards;
}

.text{
    position: relative;
    z-index: 1;
    bottom: 0;
    width: min(100%, 1050px);
    min-height: clamp(420px, 62vh, 620px);
    padding: clamp(40px, 5vw, 80px) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.circle_wrapper {
    position: relative;
    flex: 0 0 400px;
    width: 400px;
    height: 400px;
    border: 5px solid #ff9d00;
    border-radius: 50%;
    box-shadow:
      0 0 8px rgba(255, 157, 0, 0.95),
      0 0 20px rgba(255, 157, 0, 0.72),
      0 0 42px rgba(255, 136, 0, 0.42);
    display: grid;
    place-items: center;
}

.circle_text{
    position: absolute;
    inset: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 70px;
    color: #32333c;
    line-height: 1.05;
    white-space: nowrap;
    pointer-events: none;
}



#about{
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.me_text{
    width: 40vw;           
    color: #475569;                 
    letter-spacing: 0.02em;  
    transform: translateY(100px) scale(1);
    padding-left: 12px;
    border-left: 3px solid rgba(245,179,1,0.25);
    opacity: 0;
    border-left-width: 2px;
}

.me_text p{
  font-size: 25px;
}

.buttons{
    transform: translateY(100px) scale(1);
    opacity: 0;
    margin-top: 50px;
}


#services{
    flex-direction: column;
    display: flex;
    align-items: center;
}

.cards{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    width: 1030px;
    max-width: 1200px;
    justify-content: space-between;
}



.cards div img{
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  padding: 10px;
  margin-bottom: 22px;
}

.cards h1{
  font-size: 35px;
  margin: 16 0 10px;
  letter-spacing: 0.03em;
  padding-top: 20px;
}

.cards p{
  font-size: 20px;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
  opacity: 0.9;
}


.cards div{
  text-align: center;
  position: relative;
  padding: 32px 34px;
  height: 300px;
  width: 500px;
  border-radius: 18px;

  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.08),
    rgba(255,255,255,0.02)
  );
  backdrop-filter: blur(12px);

  color: #fff;
  transform: translateY(30px) scale(0.96);
  opacity: 0;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

/* hover */
.cards div:hover{
  box-shadow:
    80px 80px 80px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.35);

}

.cards div:nth-child(1){
  background:
    linear-gradient(135deg, #05cebd, #048aa0);
}

.cards div:nth-child(2){
  background:
    linear-gradient(135deg, #f97316, #c2410c);
}

.cards div:nth-child(3){
  background:
    linear-gradient(135deg, #eab308, #a16207);
}

.cards div:nth-child(4){
  background:
    linear-gradient(135deg, #6366f1, #4338ca);
}

@keyframes slideSide {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heroNameFade {
    from {
        opacity: 0;
        transform: translate3d(0, 28px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes heroBadgeFade {
    from {
        opacity: 0;
        transform: translate3d(-24px, 0, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes heroButtonFade {
    from {
        opacity: 0;
        transform: translate3d(0, 18px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes scaleIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.scaleInAnimation div{
    animation: scaleIn 2s ease forwards;
}

.slideSideAnimation{
    animation: slideSide 1s ease forwards;
}


#myworks{
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 1430px;
}

.awesome_head{
  text-align: center;
  max-width: 800px;
  margin-bottom: 35px;
}

.awesome_head h2{
  font-size: 52px;
  color: #32333c;
  margin: 0;
}

.awesome_hr{
  width: 90px;
  height: 2px;
  border: none;
  background: orange;
  margin: 12px auto 18px;
  filter: drop-shadow(0 0 5px orange);
}

.awesome_sub{
  color: #84828d;
  font-size: 18px;
  line-height: 1.6;
}

/* filters */
.awesome_filters{
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 35px;
}

.filter_btn{
  background: transparent;
  border: 0;
  padding: 8px 6px;
  cursor: pointer;
  font-size: 16px;
  color: #84828d;
  position: relative;
  transition: color .25s ease;
}

.filter_btn:hover{
  color: #32333c;

}

.filter_btn.active{
  color: orange;
}

.filter_btn.active::after{
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  width: 24px;
  height: 2px;
  background: orange;
}

/* grid */
.works_grid{
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 230px;
  gap: 22px;
}


.work_item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.work_overlay{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
  opacity: 0;
  transition: opacity .25s ease;
}

.work_title{
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.work_tag{
  color: rgba(255,255,255,.85);
  font-size: 14px;
  margin-top: 4px;
}

.work_item:hover img{
  transform: scale(1.06);
}

.work_item:hover .work_overlay{
  opacity: 1;
}

/* sizes */
.work_item.big,
.work_item.tall,
.work_item.wide{
  grid-column: span 1;
  grid-row: span 2;
}

.work_item{
  transition:
  opacity 0.45s ease,
  transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform-origin: center;
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #eee;
  transform: translateZ(0);
}

.work_item.is_hidden{
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}


.work_item.is_gone{
  display: none;
}

/*  CONTACT SECTION  */
#contact{
  padding: 100px 300px;
}

.contact_head{
  text-align: center;
  margin-bottom: 55px;
}

.contact_head h2{
  font-size: 60px;
  margin: 0;
  color: #0f172a;
}

.contact_underline{
  width: 95px;
  height: 3px;
  background: #f5b301; 
  margin: 14px auto 0;
  filter: drop-shadow(0 0 6px orange);
}

.contact_grid{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 60px;
  align-items: start;
}

/* LEFT */
.contact_left h3{
  margin: 0 0 18px;
  font-size: 22px;
  color: #0f172a;
}

.contact_item{
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: #64748b;
  font-size: 16px;
}

.ci_icon{
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: .9;
}

.contact_item a{
  color: #64748b;
  text-decoration: none;
}

.contact_item a:hover{
  color: #0f172a;
  text-decoration: underline;
}

.follow_block{
  margin-top: 38px;
}

.follow_block h4{
  margin: 0 0 12px;
  font-size: 18px;
  color: #0f172a;
}

.socials{
  display: flex;
  gap: 14px;
}

.social_btn{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #64748b;
  font-weight: 700;
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}

.social_btn:hover{
  transform: translateY(-2px);
  border-color: #f5b301;
  color: #0f172a;
}

/* RIGHT FORM */
.contact_form{
  width: 100%;
}

.field{
  display: block;
  margin-bottom: 34px;
}

.label{
  display: block;
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
}

.field input,
.field textarea{
  width: 100%;
  border: 0;
  outline: none;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
  padding: 16px 18px;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(15,23,42,.08);
}

.field input::placeholder,
.field textarea::placeholder{
  color: #94a3b8;
}

.two_cols{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.send_btn{
  background: #f5b301;
  border: 0;
  color: white;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 18px 34px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(245,179,1,.25);
  transition: transform .2s ease, filter .2s ease;
}

.send_btn:hover{
  transform: translateY(-2px);
  filter: brightness(0.98);
}

@media (max-width: 1200px){
  #contact{ padding: 80px 120px; }
}

@media (max-width: 900px){
  #contact{ padding: 70px 40px; }
  .contact_grid{ grid-template-columns: 1fr; gap: 40px; }
  .two_cols{ grid-template-columns: 1fr; }
  .contact_head h2{ font-size: 46px; }
}


.social_btn svg{
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social_btn[aria-label="Instagram"]:hover{
  color: #E1306C;
  border-color: #E1306C;
}

.social_btn[aria-label="Telegram"]:hover{
  color: #229ED9;
  border-color: #229ED9;
}

.social_btn[aria-label="WhatsApp"]:hover{
  color: #25D366;
  border-color: #25D366;
}

.navigation a.active{
  color: orange;
  position: relative;
}

.navigation a.active::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 22px;
  height: 2px;
  background: orange;
  border-radius: 2px;
}

.home_bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;          
  pointer-events: none;
  z-index: 0;
}



.hero_badge{
  width: fit-content;
  margin: 0 0 clamp(20px, 3vh, 28px);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 18px);
  color: #56e6ff;
  font-family: inherit;
  font-size: clamp(11px, 0.7vw, 13px);
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1.2;
  text-shadow: 0 0 18px rgba(86,230,255,0.34);
  opacity: 0;
  transform: translate3d(-24px, 0, 0);
  animation: heroBadgeFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.hero_badge::before{
  content: "";
  width: clamp(32px, 5vw, 72px);
  height: 1px;
  background: linear-gradient(90deg, transparent, #56e6ff);
  box-shadow: 0 0 16px rgba(86,230,255,0.72);
}

.hero_contact_btn{
  align-self: flex-start;
  margin-top: clamp(24px, 4vh, 38px);
  padding: 18px 36px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 6px;
  background: rgba(2,6,23,0.28);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  animation: heroButtonFade 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.85s both;
  transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}

.hero_contact_btn:hover,
.hero_contact_btn:focus-visible{
  background: rgba(245,179,1,0.95);
  border-color: rgba(245,179,1,0.95);
  color: #020617;
  transform: translateY(-2px);
}



.navigation.active {
  display: flex;
}

nav.active{
  padding-bottom: 270px;
}

@media (max-width: 1140px) {
  nav{ 
  padding: 10px 100px;
  }
  #home{
    padding: 10px 150px;
  }
  #about{
    padding: 40px 80px;
  }
  .main_button, .secondary_button{
    width: 40%;
  }
  .services_text{
    width: 100%;
  }
  #services{
    padding: 40px 80px;
  }
  .cards{
    width: auto;
  }
  .cards div{
    width: 300px;
    height: 330px;
  }
  .awesome_head{
    width: 1000px;
  }
  #myworks{
    padding: 70px 100px;
  }
  .contact_left{
    width: 250px;
  }
  .contact_grid{
    grid-template-columns: 200px 1fr;
  }
}


@media (max-width: 760px) {

#home{
  padding: 230px 21px 10px;
  flex-direction: column;
}

.burger {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
}

nav{ padding: 10px 16px; }

.navigation{
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 25px;
  display: none;
}

.logo{ width: 60%; }

.text h1{
  font-size: clamp(44px, 15vw, 60px);
}

.hero_badge{
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.17em;
}

.hero_badge::before{
  width: 28px;
}

.secondary{
  width: 100%;
  max-width: 400px;
  font-size: 20px;
}

.text{
  min-height: clamp(300px, 58vh, 460px);
  padding: 24px 0;
  top: -150px;
}

.hero_contact_btn{

  margin-top: 24px;
  padding: 16px 28px;
}

#about{
  flex-direction: column;
  padding: 40px 0px;
  padding-left: 10px;
  padding-top: 20px;
}

.circle_wrapper{
  flex: 0 0 145px;
  width: 145px;
  height: 145px;
  margin: 0 0 10px;
  z-index: 1;
}

.circle_text{
  font-size: 28px;
}

}

/* Tablet layout: shared rules for portrait and landscape devices. */
@media (min-width: 761px) and (max-width: 1200px) {
  html{
    scroll-padding-top: 76px;
  }

  body{
    overflow-x: hidden;
  }

  nav{
    min-height: 64px;
    padding: 10px clamp(32px, 5vw, 64px);
    backdrop-filter: blur(14px);
  }

  nav > a.logo{
    width: clamp(140px, 16vw, 190px);
    min-height: 44px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
  }

  nav > a.logo > img.logo{
    width: 100%;
    height: auto;
    display: block;
  }

  .navigation{
    flex: 1;
    justify-content: flex-end;
    gap: clamp(10px, 1.5vw, 22px);
  }

  .navigation a{
    min-height: 44px;
    font-size: clamp(14px, 1.45vw, 17px);
    white-space: nowrap;
    display: flex;
    align-items: center;
  }

  section,
  #contact{
    padding: clamp(72px, 8vw, 96px) clamp(48px, 6vw, 72px);
  }

  #home{
    height: 100svh;
    min-height: 700px;
    padding: 92px clamp(48px, 6vw, 72px) 48px;
    align-items: center;
  }

  .text{
    width: 100%;
    max-width: 900px;
    min-height: min(64vh, 580px);
    padding: 28px 0;
  }

  .text h1{
    font-size: clamp(64px, 8vw, 96px);
  }

  .secondary{
    max-width: 680px;
    font-size: clamp(21px, 2.5vw, 28px);
  }

  .hero_contact_btn{
    margin-top: 28px;
    padding: 16px 32px;
  }

  #about{
    gap: clamp(40px, 6vw, 72px);
  }

  .circle_wrapper{
    flex: 0 0 280px;
    width: 280px;
    height: 280px;
  }

  .circle_text{
    font-size: clamp(48px, 4.2vw, 62px);
  }

  .me_info{
    min-width: 0;
    flex: 1;
  }

  .me_text{
    width: 100%;
    max-width: none;
  }

  .me_text p{
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.65;
  }

  .buttons{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: min(100%, 520px);
    margin-top: 34px;
  }

  .main_button,
  .secondary_button{
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 13px 16px;
    font-size: clamp(17px, 2vw, 21px);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .services_text{
    width: min(100%, 720px);
  }

  .cards{
    width: min(100%, 1000px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .cards > div{
    width: 100%;
    height: auto;
    min-height: 310px;
    padding: 28px 24px;
  }

  .cards h1{
    font-size: clamp(27px, 3vw, 34px);
  }

  .cards p{
    font-size: clamp(17px, 1.85vw, 19px);
  }

  #myworks{
    height: auto;
  }

  .awesome_head{
    width: 100%;
    max-width: 800px;
  }

  .awesome_filters{
    gap: clamp(16px, 2.5vw, 26px);
  }

  .filter_btn{
    min-height: 44px;
    padding: 10px 12px;
  }

  .works_grid{
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 250px;
    gap: 18px;
    overflow: visible;
  }

  .work_item.big,
  .work_item.wide,
  .work_item.tall{
    grid-column: auto;
    grid-row: auto;
  }

  .work_overlay{
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0) 68%);
  }

  .contact_grid{
    grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr);
    gap: clamp(32px, 4vw, 48px);
  }

  .contact_left{
    width: auto;
    min-width: 0;
  }

  .contact_form{
    min-width: 0;
  }

  .contact_item a{
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    overflow-wrap: anywhere;
  }

  .social_btn{
    width: 44px;
    height: 44px;
  }

  .two_cols{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

/* Portrait tablets use a compact navigation sheet and stacked content. */
@media (min-width: 761px) and (max-width: 1100px) and (orientation: portrait) {
  nav{
    padding-inline: clamp(28px, 5vw, 52px);
  }

  nav.active{
    padding-bottom: 10px;
  }

  .burger{
    width: 46px;
    height: 46px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 50%;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .navigation{
    position: absolute;
    top: 10%;
    right: clamp(24px, 5vw, 48px);
    left: clamp(24px, 5vw, 48px);
    max-height: calc(100svh - 84px);
    margin-top: 30px;
    padding: 0px 17px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
    flex-direction: column;
    align-items: center;
    gap: 0px;
    overflow-y: auto;
    display: none;
  }

  .navigation.active{
    display: flex;
  }

  .navigation a{
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 16px;
    display: flex;
    align-items: center;
  }

.navigation.active {
  display: flex;
}

nav.active{
  padding-bottom: 270px;
}

  .navigation a:hover,
  .navigation a:focus,
  .navigation a.active{
    background: rgba(245, 179, 1, 0.1);
  }

  #home{
    padding-top: 112px;
  }

  .text{
    max-width: 760px;
    margin-inline: auto;
    top: -150px;
  }

  #about{
    flex-direction: column;
    align-items: stretch;
    gap: 72px;
  }

  .circle_wrapper{
    width: 250px;
    height: 250px;
    margin: 36px auto 18px;
    flex: 0 0 250px;
  }

  .me_info{
    width: min(100%, 760px);
    margin-inline: auto;
  }

  .cards{
    max-width: 820px;
  }

  .works_grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 260px;
  }

  .contact_grid{
    width: min(100%, 760px);
    margin-inline: auto;
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .contact_left{
    width: 100%;
  }
}

/* Landscape tablets keep denser multi-column layouts. */
@media (min-width: 761px) and (max-width: 1200px) and (orientation: landscape) {
  #home{
    padding-top: 84px;
    padding-bottom: 42px;
  }

  #about{
    align-items: center;
  }

  .circle_wrapper{
    flex: 0 0 260px;
    width: 260px;
    height: 260px;
  }

  .works_grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 230px;
  }

  .contact_grid{
    grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr);
    gap: 40px;
  }
}

@media (max-width: 760px) {

.me_info{
  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;
}

.me_text{
  width: 100%;
  padding-left: 14px;
  line-height: 1.6;
  text-align: left;
  overflow-wrap: anywhere;
}


.buttons{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  margin: 18px auto 0;
  transform: translateY(100px);
  opacity: 0;
  margin-top: 12px;
}

.main_button,
.secondary_button{
  width: 100%;
  margin-left: 0;
  padding: 14px 12px;
  font-size: 16px;
  line-height: 1.2;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 10px;
}


.buttons.slideSideAnimation{
  animation-duration: 2s;
}

.cards{
  grid-template-columns: 1fr;
  gap: 20px;
  justify-items: center;
}

.cards .fourth_card{
  padding-top: 70px;
}

.cards div{
  width: 100%;
  max-width: 360px;
  height: 400px;
}

.cards div h1{ margin-top: -10px; }

#myworks{
  padding: 60px 16px;
  height: auto;
}

.awesome_head{
  width: 100%;
  max-width: 800px;
  margin: 0 auto 35px;
  padding: 0 16px;
  box-sizing: border-box;
}

.works_grid{
  grid-template-columns: 1fr;
  grid-auto-rows: 220px;
  gap: 18px;

  transition: height 0.35s ease;
  overflow: hidden;
}

.work_item.big,
.work_item.wide,
.work_item.tall{
  grid-column: auto;
  grid-row: auto;
}

#contact{ padding: 60px 16px; }

.contact_head{ margin-bottom: 32px; }

.contact_head h2{
  font-size: 38px;
  line-height: 1.1;
}

.contact_underline{ width: 70px; }

.contact_grid{
  grid-template-columns: 1fr;
  gap: 28px;
}

.contact_left h3{ font-size: 18px; }

.contact_item{
  font-size: 15px;
  margin: 12px 0;
  gap: 10px;
}

.two_cols{
  grid-template-columns: 1fr;
  gap: 16px;
}

.field{ margin-bottom: 18px; }

.field input,
.field textarea{
  padding: 14px 14px;
  font-size: 16px;
}

.send_btn{
  width: 100%;
  padding: 16px 18px;
}

.socials{
  flex-wrap: wrap;
  gap: 12px;
}

.contact_item a{
  overflow-wrap: anywhere;
}
.me_text p{
  font-size: 17px;   /* было ~16px */
  line-height: 1.7;  /* читаемее */
}
}

/* Phone-only Home redesign. Kept last so it cleanly overrides legacy mobile rules. */
@media (max-width: 760px) {
  #home{
    isolation: isolate;
    height: 100svh;
    min-height: 560px;
    padding: 84px clamp(20px, 6vw, 28px) max(24px, env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: #030712;
  }

  #home::before{
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      radial-gradient(circle at 86% 28%, rgba(86, 230, 255, 0.16), transparent 35%),
      linear-gradient(180deg, rgba(3, 7, 18, 0.36) 0%, rgba(3, 7, 18, 0.7) 52%, rgba(3, 7, 18, 0.94) 100%);
  }

  .home_bg{
    opacity: 0.5;
    filter: grayscale(0.35) contrast(1.08);
  }

  .text{
    z-index: 2;
    top: 0;
    bottom: auto;
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    padding: clamp(46px, 8svh, 78px) 0 0;
    justify-content: flex-start;
  }

  .hero_badge,
  .text h1,
  .secondary{
    position: relative;
    left: -12px;
  }

  .hero_badge{
    margin: 0 0 24px;
    gap: 11px;
    color: #67e8f9;
    font-size: clamp(10px, 2.8vw, 12px);
    font-weight: 600;
    letter-spacing: 0.2em;
  }

  .hero_badge::before{
    width: 34px;
  }

  .text h1{
    max-width: 10ch;
    margin: 0;
    font-size: clamp(50px, 15.8vw, 66px);
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: -0.06em;
    text-wrap: balance;
  }

  .secondary{
    width: 100%;
    max-width: 32ch;
    margin: 24px 0 0;
    color: rgba(226, 232, 240, 0.76);
    font-size: clamp(16px, 4.4vw, 19px);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: -0.015em;
  }

  .hero_contact_btn{
    width: 100%;
    min-height: 64px;
    margin-top: auto;
    padding: 0 20px;
    border-color: rgba(103, 232, 249, 0.46);
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(8, 47, 73, 0.54), rgba(2, 6, 23, 0.45));
    box-shadow: inset 3px 0 0 #67e8f9;
    backdrop-filter: blur(10px);
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.22em;
  }

  .hero_contact_btn::after{
    content: "\2193";
    width: 34px;
    height: 34px;
    border: 1px solid rgba(103, 232, 249, 0.4);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #67e8f9;
    font-size: 18px;
    letter-spacing: 0;
  }
}

/* Use the same CTA treatment on small and medium tablets as on phones. */
@media (min-width: 761px) and (max-width: 1100px) {
  #home{
    --tablet-hero-inline: clamp(48px, 6vw, 72px);
    --tablet-hero-bottom: 48px;
    align-items: stretch;
  }

  .text{
    max-width: none;
    min-height: 0;
    top: 0;
    padding: clamp(28px, 7vh, 72px) 0 0;
    align-self: stretch;
    justify-content: flex-start;
  }

  .hero_contact_btn{
    width: calc(100% + var(--tablet-hero-inline) + var(--tablet-hero-inline));
    min-height: 64px;
    margin-top: auto;
    margin-right: calc(0px - var(--tablet-hero-inline));
    margin-bottom: calc(0px - var(--tablet-hero-bottom));
    margin-left: calc(0px - var(--tablet-hero-inline));
    padding: 0 20px;
    border-color: rgba(103, 232, 249, 0.46);
    border-radius: 0;
    background: linear-gradient(90deg, rgba(8, 47, 73, 0.54), rgba(2, 6, 23, 0.45));
    box-shadow: inset 3px 0 0 #67e8f9;
    backdrop-filter: blur(10px);
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.22em;
  }

  .hero_contact_btn::after{
    content: "\2193";
    width: 34px;
    height: 34px;
    border: 1px solid rgba(103, 232, 249, 0.4);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #67e8f9;
    font-size: 18px;
    letter-spacing: 0;
  }
}

@media (min-width: 761px) and (max-width: 1100px) and (orientation: landscape) {
  #home{
    --tablet-hero-bottom: 42px;
  }
}
