:root{
    --nav-back-colour:rgb(4, 4, 39);
    --nav-text-color: white;
    --body-background:#e7ebf0;
    --text-primary-color:#222;
    --section-background-color:#ffffff;
    --section-border-color:rgb(200, 198, 207);
    --section-background-color-HOVER:rgb(245, 236, 223);
    --section-border-color-HOVER:black;
    --service-background:#f0f0f0;
    --section-button-background-color:#111;
    --scrow-arrow-background-color:rgba(0, 0, 0,0.5);
    --scrow-arrow-text:white;
    --distinct-color:crimson;
    --section-H2-underline:rgb(15, 13, 1);
    --projects-setion-color:rgb(245, 236, 223);
    --project-border-color:#eee;
    --theme-switch-color:black;
    --theme-switch-background-color:white;
}

.darkmode{
    --nav-back-colour:rgb(4, 4, 39);
    --nav-text-color: white;
    --body-background:#01070e;
    --text-primary-color:white;
    --section-background-color:#111;
    --section-border-color:rgb(2, 2, 2);
    --section-background-color-HOVER:#111;
    --section-border-color-HOVER:black;
    --service-background:#1a1b1a;
    --section-button-background-color:black;
    --scrow-arrow-background-color:white;
    --scrow-arrow-text:black;
    --distinct-color:rgb(255, 145, 0);
    --section-H2-underline:rgb(255, 145, 0);
    --projects-setion-color:#111;
    --project-border-color:#3a3434;
    --theme-switch-color:white;
    --theme-switch-background-color:black;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--body-background);
    color: var(--text-primary-color);
    line-height: 1.6;
}

#theme-switch{
    height:50px;
    width:50px;
    padding:0;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    border: 2px solid var(--theme-switch-color);
    background-color:var(--theme-switch-background-color-color);
    display:flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 7rem;
    right:2rem;
    z-index: 200;
}
#theme-switch svg{
    fill:var(--theme-switch-color);
}
/* appear one icon on each theme */
#theme-switch svg:last-child{
    display: none;
}
.darkmode #theme-switch svg:first-child{
    display:none;
}
.darkmode #theme-switch svg:last-child{
    display:block;
}

@media (max-width: 700px) {
    #theme-switch{
        right:5rem;
        top:1rem;
        z-index:2000;
        position:absolute;
        border: none;
    }
    #theme-switch svg{
        fill:white;
    }
}

/* Top Navigation */
.topnav {
  background: var(--nav-back-colour);
  color: var(--nav-text-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative; /* anchor for absolute nav */
  z-index: 1000;
}

.navigation {
  display: flex;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.nav-items {
  color: var(--nav-text-color);
  margin-left: 1rem;
  text-decoration: none;
  font-weight: 800;
  transition: color 0.3s ease;
}

.nav-items:hover {
  text-decoration: underline;
  color: rgb(119, 108, 58);
}

.icon {
  display: none;
  font-size: 24px;
  color: var(--nav-text-color);
  cursor: pointer;
}

/* Mobile styles */
@media (max-width: 700px) {
  .navigation {
    flex-direction: column;
    background-color: var(--nav-back-colour);
    position: absolute;
    top: 100%; /* just below header */
    left: 0;
    width: 100%;
    padding: 0.5rem 0;

    /* Hidden by default */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  .icon{
    z-index:2000;
  }

  .navigation.show {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
  }

  .navigation a {
    text-align: left;
    padding: 10px 16px;
  }

  .icon {
    display: block;
  }
}


section {
    padding: 4rem 2rem;
    max-width: 900px;
    margin: auto;
}

#hero {
    text-align: center;
}

#hero h1 {
    font-size: 2.5rem;
}

#hero p {
    font-size: 1.2rem;
}
.outer-txt {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    gap: 0.5rem;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: left;
}
.inner-txt{
    height: 50px;
    line-height: 50px; 
    font-size: 1.2rem;
    overflow:hidden;
    
}
.inner-txt span{
    position:relative;
    color: var(--distinct-color);
    animation: animation 10s linear infinite;
}
@keyframes animation{
    0%,
    100% {
        top: 0;
    }
    20%{
        top: 0
    }
    25%{
        top: -50px;
    }
    45%{
        top: -50px
    }
    50%{
        top: -100px;
    }
    70%{
        top: -100px;
    }
    75%{
        top: -150px;
    }
    95%{
        top: -150px;
    }
}

.button {
    padding: 0.75rem 1.5rem;
    background: #111;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin: 0 0.5rem;
    display: inline-block;
    transition:all;
    transition-duration: 200ms;
    transition-delay: 2ms;
    transition-timing-function: linear;
}
#section-button{
    background:var(--section-button-background-color);
}
.button:hover, #section-button:hover {
    background: #333;
    scale: 1.05;
}

#about, #services, #contact{
    background: var(--section-background-color);
    border-radius: 6px;
    margin-bottom: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    border: var(--section-border-color)  solid ;
    transition:all;
    transition-duration: 300ms;
    transition-delay: 5ms;
    transition-timing-function: ease-in-out;
    
    

}
#about:hover, #services:hover, #contact:hover{
    border-radius: 6px;
    margin-bottom: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    border: var(--section-border-color-HOVER) solid;
    background: var(--section-background-color-HOVER);
    scale: 1.02;
}


h2 {
    margin-bottom: 1rem;
}
h2 {
    position: relative;
    display: inline-block;
    cursor:pointer;
}

h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 3px;
    width: 100%;
    background-color: var(--section-H2-underline); 
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 500ms 2ms ease-in-out;
}

#about:hover h2::after,
#services:hover h2::after,
#contact:hover h2::after {
    transform: scaleX(1);
}



.services-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.service {
    flex: 1 1 250px;
    padding: 1rem;
    background: var(--service-background);
    border-radius: 5px;
}
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: #666;
}

.scroll-arrow{
    background: var(--scrow-arrow-background-color);
    width: 36px;
    height: 36px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    border-radius: 50% 0 50% 50%;
    transform: rotate(-45deg);
    z-index: 9;
    transition:all;
    transition-duration: 300ms;
    transition-delay: 5ms;
    transition-timing-function: linear;
}
.scroll-arrow:hover{
    scale: 1.2;
    background: var(--scrow-arrow-background-color);
    width: 36px;
    height: 36px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    border-radius: 50% 0 50% 50%;
    transform: rotate(-45deg);
    z-index: 9;
}
.scroll-txt{
    color: var(--scrow-arrow-text);
    position: fixed;
    bottom: 1.25rem;
    right: 1.563rem;
    font-size: 0.938;
    z-index: 10;
}
html{
    scroll-behavior: smooth;
}
/* contacts and icons */
#email{
    color: var(--distinct-color);
}
.conatct-icons{
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.fa-regular.fa-envelope{
    font-size: 1.1rem ;
}
.fa-solid.fa-phone.fa-shake{
    color: rgb(56, 117, 141);
    font-size: 1.1rem ;
}
.fa-brands.fa-square-whatsapp{
    color: rgba(0, 128, 0,0.8);
    font-size: 1.1rem;
}
.services-list a{
    margin-top: 2rem;
    margin-left: 40%;
    
}

/* Projects Page */
#projects {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: auto;
  background: var(--projects-setion-color);
  text-align: center;
}

.projects-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.project {
  background: var(--service-background);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1.5rem;
  border: 2px solid var(--project-border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: solid 1px var(--project-border-color);
}

.project .button{
    margin-top: 0.5rem;
}

.project img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 1rem;
}

#title {
  text-align: center;
  margin-top: 2rem;
}


@media (max-width: 900px) {
  .projects-list {
    grid-template-columns: 1fr;
  }
  #title {
    padding-left: 0;
  }
}



@media (max-width: 600px) {
    
    .services-list {
    flex-direction: row;

    }
    
    #about, #services, #contact{
    border-radius: 6px;
    margin-bottom: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    border: var(--section-border-color-HOVER) solid;
    background: var(--section-background-color-HOVER);
    }

    .fa-regular.fa-envelope{
    font-size: 1.6rem;
    }
    .fa-solid.fa-phone.fa-shake{
    color: rgb(56, 117, 141);
    font-size: 1.6rem;
    }
    .fa-brands.fa-square-whatsapp{
    color: rgba(0, 128, 0,0.8);
    font-size: 1.6rem;
    }

    .conatct-icons{
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    }
    .button {
    padding: 0.75rem 1.5rem;
    background: #111;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin: 0 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    transition:all;
    transition-duration: 200ms;
    transition-delay: 2ms;
    transition-timing-function: linear;
    }

    .button:hover {
    background: #333;
    scale: 1.05;
    }

    .services-list a{
        margin: 0;
        margin-top: 1rem;
        margin-bottom: -2rem;
    
    }
}