*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;

}
html{
    scroll-behavior: smooth;
}
body{
    background: #080808;
    color: #fff;
}


#header{
    width: 100%;
    height: 100vh;
    background-image: url(images/background.png);
    background-size: cover;
    background-position: center;  
}
.container{
    padding: 10px 10%;
}
nav{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.logo{
    width: 140px;
}
nav ul li{
    display: inline-block;
    list-style: none;
    margin: 10px 20px;
    
}
nav ul li a{
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    position: relative;
}
nav ul li a::after{
    content: '';
    width: 0;
    height: 3px;
    background: #d30303;
    position:absolute;
    left: 0;
    bottom: -6px;
    transition: 0.5s;
}
nav ul li a:hover::after{
    width: 100%;
}
.header-text{
    margin-top: 20%;
    font-size: 30px;

}
.header-text h1{
    font-size: 50px;
    margin-top: 20px;
}
.header-text h1 span{
    color: #d30303;
}

/*--------------------------------------------------About----------------------------------------------*/

#about{
    padding: 80px 0;
    color: #ababab;
}
.row{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}
.about-col-1{
    flex-basis: 35%;
}
.about-col-1 img{
    width: 80%;
    border-radius: 15px;
}
.about-col-2{
    flex-basis: 65%;
    
}
.subtitle{
    font-size: 32px;
    font-weight: 600;
    color:#fff;
}
.tab-titles{
    display: flex;
    margin: 20px 0 40px;
}
.tab-links{
    margin-right: 60px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}
.tab-links::after{
    content: '';
    width: 0;
    height: 3px;
    background: #d30303;
    position:absolute;
    left: 0;
    bottom: -8px;
    transition: 0.5s;
}
.tab-links.active-link::after{
    width: 50%;
}
.tab-contents ul li{
    list-style: none;
    margin: 10px 0;
}
.tab-contents ul li span{
    color: #d30303;
    font-size: 14px;
}
.tab-contents{
    display: none;
}
.tab-contents.active-tab{
    display: block;
}

/*-------------------------------------------------------Stats------------------------------------------------------------*/
.stat-box i{
  font-size:30px;
  color:#d30303;
  margin-bottom:10px;
}
.fade-in{
  opacity:0;
  transform:translateY(40px);
  transition: all 1s ease;
}

.fade-in.show{
  opacity:1;
  transform:translateY(0);
}
.stats-section{
  text-align:center;
  padding:60px 20px 10px 20px;
}

.stats{
  display:flex;
  justify-content:space-around;
  flex-wrap:wrap;
  margin-top:40px;
}

.stat-box{
  background:#111;
  padding:25px;
  margin:10px;
  border-radius:12px;
  width: 200px;
  transition:0.3s;
  position:relative;
}

.stat-box:hover{
  transform:translateY(-10px);
  box-shadow:0 10px 20px rgba(0,0,0,0.5);
}

.stat-box h2{
  font-size:40px;
  color:#f3eef0;
}

.stat-box p{
  margin-top:10px;
  color:#fff9f9;
}

/*-------------------------------------------------------Services------------------------------------------------------------*/
#services{
    padding: 30px 0;
}
.services-list{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 50px;
    margin-top: 50px;
}
.services-list div{
    background: #262626;
    padding: 40px;
    font-size: 13px;
    font-weight: 300px;
    border-right: 10;
    border-radius: 10px;
    transition: background 0.5s, transform 0.5s;
}
.services-list div i{
   
    font-size: 50px;
    margin-bottom: 30px;
}
.services-list div h2{
    font-size: 30px;
    font-weight: 500;
    margin-bottom: 15px;
}
.services-list div a{
    text-decoration: none;
    color: #fff;
    font-size: 12px;
    margin-top: 20px;
    display:inline-block;
}
.services-list div:hover{
    background: #d30303;
    transform:translateY(-10px);
}
/*------------------------------------------------------------portfolio----------------------------------------------------*/
#portfolio{
    padding: 50px 0;
}
.work-list{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    grid-gap: 20px;
    margin-top: 50px;
}
.work{
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}
.work img{
    width: 100%;
    border-radius: 10px;
    display: block;
    transition: transform 0.5s;
}

.work {                     /* the card */
    width: 300px;           /* fixed width */
    height: 450px;          /* fixed height */
    overflow: hidden;       /* crop anything outside the box */
}

.work img {                 /* the picture inside */
    width: 100%;            /* stretch to the box’s width */
    height: 100%;           /* stretch to the box’s height */
    object-fit: cover;      /* scale & crop to fill, preserving aspect ratio */
    object-position: center;/* center the crop */
}

.layer{
    width: 100%;
    height: 0;
    background: linear-gradient(rgba(0,0,0,0.6), #d30303);
    border-radius: 10px;
    position: absolute;
    left: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    font-size: 14px;
    transition: height 0.5s;

}
.layer h3{
    font-weight: 500;
    margin-bottom: 20px;
}
.layer a{
    margin-top: 20px;
    color: #d30303;
    text-decoration: none;
    font-size: 18px;
    line-height: 60px;
    background: rgb(240, 238, 238);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;

}
.work:hover img{
    transform: scale(1.1);
    
}
.work:hover .layer{
    height: 100%;

}
.work.touch-active img{
    transform: scale(1.1);
}

.work.touch-active .layer{
    height: 100%;
}
.btn{
    display: block;
    margin: 50px auto;
    width: fit-content;
    border: 1px solid #d30303;
    padding: 14px 50px;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    transition: background 0.5s;
}
.btn:hover{
    background: #d30303;

}
/*...........................------------------------------...........contact-------------------------------------------------*/
.contact-left{
    flex-basis: 35%;
}
.contact-right{
    flex-basis: 60%;
}
.contact-left p a{
    margin-top: 30px;
    color: #fff;
   
}
.contact-left p i{
    color: #d30303;
    margin-right: 5px;
    font: size 14px;
}
.social-icons{
    margin-top: 20px;
}
.social-icons a{
    text-decoration: none;
    font-size: 30px;
    margin-right: 15px;
    color: #ababab;
    display: inline-block;
    transition: transform 0.5s;
}
.social-icons a:hover{
    color: #d30303;
    transform: translateY(-5px);
}
.btn.btn2{
    display: inline-block;
    background: #d30303;
}
.btn.btn2:hover{
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.contact-right form{
    width: 100%;

}
form input,form textarea{
    width: 100%;
    border: 0;
    outline: none;
    background: #262626;
    padding: 15px;
    margin: 15px 0;
    color:#fff;
    font-size: 20px;
    border-radius: 6px;
}
form .btn.btn2{
    padding: 14px 60px;
    font-size: 18px;
    margin-top: 20px;
    cursor: pointer;
}
.copyright{
    width: 100%;
    text-align: center;
    padding: 50px 0;
    background: #262626;
    font-weight: 300;
    margin-top: 5px;
}
/*--------------------------- Light Mode -------------------------------------*/

.light-mode{
    background:#ffffff;
    color:#000;
}


.light-mode #header,
.light-mode #header * {
    color: #fff !important;
}


.light-mode #header .header-text h1 span {
    color: #d30303 !important;
}
   
.light-mode nav ul li a{
    color:#000;
}

.light-mode .services-list div{
    background:#f0f0f0;
    color: #000;
}
.light-mode .services-list div h1{
    color: #000;
}
.light-mode .services-list div a{
    text-decoration: none;
    color: #2c2a2a;
    font-size: 12px;
    margin-top: 20px;
    display:inline-block;
}
.light-mode .services-list div:hover{
    background: #d30303;
    transform:translateY(-10px);
}

.light-mode .layer{
    background: linear-gradient(rgba(255,255,255,0.6), #ff4d4d);
}

.light-mode form input,
.light-mode form textarea{
    background:#eaeaea;
    color:#000;
}

.light-mode .copyright{
    background:#afadad;
}
#mode-toggle{
    cursor:pointer;
    font-size:20px;
}
.light-mode #services .subtitle {
    color: #000;
}
.light-mode #about .subtitle  {
    color: #000;
}
.light-mode #about .p1  {
    color: #000;
}
.light-mode #portfolio .subtitle  {
    color: #000;
}
.light-mode #contact .subtitle  {
    color: #000;
}

.light-mode .contact-left p a {
    color: #000;
}
.light-mode .btn {
    color: #000;
}
.light-mode .btn.btn2 {
    color: #fff;
}
.light-mode .tab-links {
    color: #000;
}
.light-mode .tab-contents ul li {
    color: #000;
}
.light-mode .social-icons a{
    text-decoration: none;
    font-size: 30px;
    margin-right: 15px;
    color: #131313;
    display: inline-block;
    transition: transform 0.5s;
}
.light-mode .social-icons a:hover{
    color: #d30303;
    transform: translateY(-5px);
}
.light-mode .btn.btn2:hover{
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.light-mode .stat-box{
  background:#eaeaea;
  padding:25px;
  margin:10px;
  border-radius:12px;
  width:200px;
  transition:0.3s;
}

.light-mode .stat-box:hover{
  transform:translateY(-10px);
  box-shadow:0 10px 20px rgba(0,0,0,0.5);
}
.light-mode .stat-box h2{
  font-size:40px;
  color:#0e0d0d;
}
.light-mode .stat-box p{
  margin-top:10px;
  color:#131212;
}



/*...........................------------------------------...........popup------------------------------------------------*/

.modal{
    display:none;
    position:fixed;
    z-index:1000;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.8);
}

.modal-content{
    background:#111;
    color:#fff;
    margin:5% auto;
    padding:20px;
    width:70%;
    border-radius:10px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 20px 45px rgba(0,0,0,0.35);
    max-height: 80vh;
    overflow-y: auto;
}


.modal-content h2{
    margin-bottom: 12px;
}

.modal-content p{
    line-height: 1.7;
}


.close{
    float:right;
    font-size:28px;
    cursor:pointer;
    color: inherit;
}
.modal-img{
width:100%;
margin-top:10px;
border-radius:8px;
}

.light-mode .modal{
    background: rgba(0,0,0,0.55);
}

.light-mode .modal-content{
    background: #ffffff;
    color: #111;
    border: 1px solid #d9d9d9;
    box-shadow: 0 20px 45px rgba(0,0,0,0.12);
}

.light-mode .modal-content h2,
.light-mode .modal-content p,
.light-mode .close{
    color: #111;
}

.light-mode .modal-img{
    border: 1px solid #e3e3e3;
}

.light-mode #modalGitHub{
    color: #111;
}

.light-mode #modalGitHub:hover{
    color: #fff;
}
.light-mode.cursor{
    color: #d30303;
}

#typing{
  color:#ffffff;
  background: linear-gradient(45deg, #d30303, #ffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cursor{
  display:inline-block;
  margin-left:5px;
  animation: blink 0.7s infinite;
  color:#d30303;
}

@keyframes blink{
  0%{opacity:1;}
  50%{opacity:0;}
  100%{opacity:1;}
}

img{
    max-width: 100%;
}

body{
    overflow-x: hidden;
}

.container{
    width: min(100%, 1200px);
    margin: 0 auto;
}

#header{
    min-height: 100vh;
    height: auto;
}

nav{
    position: relative;
    gap: 20px;
}

nav ul{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 0;
    padding-left: 0;
}

nav ul li{
    margin: 10px 0 10px 20px;
}

.logo{
    display: block;
}

.icon-btn,
.nav-toggle{
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.icon-btn{
    padding: 0;
    font-size: 20px;
    line-height: 1;
}

.nav-toggle{
    display: none;
    align-items: center;
    justify-content: center;
    padding: 8px;
    font-size: 28px;
}

.nav-close{
    display: none;
}

.header-text{
    max-width: 700px;
}

.header-text p{
    min-height: 1.5em;
}

.subtitle{
    font-size: 32px;
}

.p1{
    line-height: 1.8;
}

.about-col-1,
.about-col-2,
.contact-left,
.contact-right{
    min-width: 0;
}

.about-col-1 img{
    width: 100%;
    max-width: 360px;
}

.tab-titles{
    flex-wrap: wrap;
    gap: 16px 28px;
}

.tab-links{
    margin-right: 0;
}

.tab-contents ul{
    padding-left: 0;
}

.stats{
    gap: 20px;
}

.stat-box{
    width: 220px;
}

.services-list{
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    grid-gap: 30px;
}

.services-list div{
    height: 100%;
}

.work-list{
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    justify-items: center;
}

.work{
    width: 100%;
    max-width: 340px;
    height: auto;
    aspect-ratio: 2 / 3;
}

.layer{
    padding: 0 24px;
}

.contact-left p,
.contact-left p a{
    word-break: break-word;
}

.social-icons{
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.social-icons a{
    margin-right: 0;
}

form input,
form textarea{
    font-size: 18px;
}

.modal-content{
    width: min(90%, 900px);
    margin: 5vh auto;
}

#modalImages{
    display: grid;
    gap: 12px;
}

@media only screen and (max-width: 992px){
    .container{
        padding: 10px 6%;
    }

    #header{
        background-position: 68% center;
    }

    .header-text{
        margin-top: 28%;
        font-size: 26px;
    }

    .header-text h1{
        font-size: 42px;
        line-height: 1.3;
    }

    .about-col-1,
    .about-col-2,
    .contact-left,
    .contact-right{
        flex-basis: 100%;
    }

    .about-col-1{
        display: flex;
        justify-content: center;
    }

    .contact-left{
        margin-bottom: 20px;
    }
}

@media only screen and (max-width: 768px){
    body.menu-open{
        overflow: hidden;
    }

    #header{
        min-height: 100svh;
        background-position: 72% center;
    }

    nav ul{
        position: fixed;
        top: 0;
        right: -280px;
        width: 260px;
        height: 100vh;
        background: #111;
        padding: 80px 24px 24px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 18px;
        flex-wrap: nowrap;
        transition: right 0.3s ease;
        z-index: 1001;
    }

    nav ul.open{
        right: 0;
    }

    nav ul li{
        width: 100%;
        margin: 0;
    }

    nav ul li a,
    nav ul li .icon-btn{
        font-size: 18px;
    }

    .nav-toggle-open{
        display: inline-flex;
    }

    .nav-close{
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        width: auto;
    }

    .nav-toggle-close{
        display: inline-flex;
        padding: 0;
    }

    .header-text{
        margin-top: 38%;
        font-size: 22px;
    }

    .header-text h1{
        font-size: 36px;
    }

    .subtitle{
        font-size: 30px;
    }

    .row{
        gap: 32px;
    }

    .tab-titles{
        margin: 20px 0 30px;
        gap: 14px 24px;
    }

    .tab-links{
        font-size: 16px;
    }

    .stats{
        justify-content: center;
    }

    .stat-box{
        flex: 1 1 220px;
        max-width: 280px;
        width: calc(50% - 20px);
    }

    .services-list{
        margin-top: 36px;
    }

    .services-list div{
        padding: 30px 24px;
    }

    .work-list{
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        margin-top: 36px;
    }

    .layer{
        font-size: 13px;
    }

    form input,
    form textarea{
        font-size: 16px;
    }

    .copyright{
        padding: 30px 16px;
    }

    .modal-content{
        width: 92%;
        padding: 18px;
        max-height: 84vh;
    }

    .light-mode nav ul{
        background: #4b4a4a;
    }

    .light-mode nav ul *{
        color: #111 !important;
    }

    .light-mode nav ul li a,
    .light-mode nav ul li .icon-btn,
    .light-mode .nav-toggle-close{
        color: #111 !important;
    }
}

@media only screen and (max-width: 600px){
    .container{
        padding: 10px 5%;
    }

    .logo{
        width: 110px;
    }

    #header{
        background-position: 74% center;
    }

    .header-text{
        margin-top: 48%;
        font-size: 18px;
    }

    .header-text h1{
        font-size: 30px;
    }

    .subtitle{
        font-size: 28px;
    }

    .stat-box{
        width: 100%;
        max-width: none;
    }

    .work-list{
        grid-template-columns: 1fr;
    }

    .work{
        max-width: none;
        min-height: 360px;
    }

    .layer{
        padding: 0 20px;
    }

    .layer a{
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 16px;
    }

    .btn{
        padding: 12px 28px;
    }
}

@media only screen and (max-width: 400px){
    .header-text h1{
        font-size: 26px;
    }

    .services-list div h2{
        font-size: 24px;
    }
}

@media only screen and (min-width: 769px){
    .container{
        width: auto;
        margin: 0;
    }

    nav ul{
        display: block;
    }

    nav ul li{
        display: inline-block;
        width: auto;
        margin: 10px 20px;
    }

    .about-col-1 img{
        width: 80%;
        max-width: none;
    }

    .tab-titles{
        flex-wrap: nowrap;
        gap: 0;
    }

    .tab-links{
        margin-right: 60px;
    }

    .stat-box{
        width: 200px;
    }

    .services-list{
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        grid-gap: 50px;
    }

    .work-list{
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .work{
        width: 300px;
        height: 450px;
        max-width: none;
        aspect-ratio: auto;
    }

    .layer{
        padding: 0 40px;
    }

    .social-icons{
        display: block;
    }

    .social-icons a{
        margin-right: 15px;
    }

    form input,
    form textarea{
        font-size: 20px;
    }

    .modal-content{
        width: 70%;
        margin: 5% auto;
    }
}
