* {
    margin: 0 ;
    padding: 0 ;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --background: #fff ;
    --primary-bg1: #afeeee ;
    --accent-color1: #0000ff ;
    --accent-color1h: #3030ff ;
    --accent-text: #fff;
    --primary-text: #000 ;
    --primary-bg2: #00ff7f;
    --primary-bg2h: #10ef7e;
    --primary-bg3: #f5f5f5;
    --shadow: 0 18px 38px rgba(0, 12, 255, 0.3) ;
}

.darkmode {
    --background: #000 ;
    --primary-bg1: #252525 ;
    --accent-color1: #ffff00 ;
    --accent-color1h: #eede00;
    --accent-text: #000 ;
    --primary-text: #fff ;
    --primary-bg2: #111111;
    --primary-bg2h: #212121;
    --primary-bg3: #060606 ;
    --shadow: 0 18px 38px rgba(255, 255, 1, 0.4) ;
}

body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    transition: all 0.2s ease ;
    letter-spacing: 1.4px;
    color: var(--primary-text);
    background: var(--background);
     
}


/* -----       COMMON PROPERTIES ACROSS ELEMENTS    -------*/
#cta {
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    color: var(--accent-text);
    background: var(--accent-color1);
    margin: 30px;
    padding: 10px;
    border-radius: 10px;
}
#cta:hover {
    background: var(--accent-color1h) ;
    transform:scale(1.1);
    transition: transform 0.3s ease ;
}

section {
    margin: 50px 0;
    padding: 8px;
    text-align: center;
}

#section-header {
    font-size: 2rem;
    margin: 30px 0 25px 7px;
    text-transform: uppercase;
    text-decoration: underline;
    text-align: left;
    cursor: default;
    user-select: none;
}




/*  -----      HEADER, MODE TOGGLER AND NAV      --------- */
#mode-toggler {
    position: fixed;
    top: 9%;
    right: 9% ;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-image: url('images/moon.jpg');
    background-position: center;
    background-size: cover;
    border: 1px solid var(--accent-color1);
    outline: none;
    z-index: 5;
}
#mode-toggler:active {
    transform: translateY(1px);
}

nav {
    display: flex;
    flex-direction: row;
    padding: 10px ;
    justify-content: space-between;
}

nav ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    justify-content: space-between;
    margin-right: 30px ;
}

nav ul li {
    margin: 7px;
    padding: 3px ;
    font-weight: 900 ;
}
nav ul li:hover {
    background: var(--primary-bg1);
    border-radius: 3px ;
}

.show-on-phones {
    display: none;
}
.show-on-phones img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    user-select: none;
}

nav ul li a {
    color: var(--accent-color1);
    text-decoration: none;
}

/* -------   RESPONSIVENESS WITH RESPECT TO SMALL DEVICES ----------- */
.burger {
    margin-left: 10px;
 display : none ;
}

.burger div {
 width : 20px ;
 height : 3px ;
 background-color : peru ;
 margin  : 5px ;
 transition : all 0.3s ease ;
}

.nav-active {
 transform: translate(0%) ;
}

.toggle .line1 {
   transform : rotate(-45deg) translate(-5px , 6px ) ;
}
.toggle .line2 {
   opacity : 0 ;
}
.toggle .line3 {
   transform : rotate(45deg) translate(-5px , -6px ) ;
}




/* ------   HERO SECTION   ---------   */
#hero {
    padding: 5px ;
    background: var(--primary-bg1) ;
    text-align: center;
    margin-top: 0;
}

#hero img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

#hero h2 {
    margin: 20px 20px;
    padding: 5px ;
    font-size: 2.3rem;
    text-transform: capitalize;
}

#hero p {
    margin: 0 0 0 20px ;
    font-weight: 500;
    font-size: 1rem;
}




/* --------     ABOUT SECTION        --------------*/

#about {
    margin: 50px 0;
    padding: 8px;
}

.about-grid-container {
    display: grid;
    grid-template-columns: repeat(3 , minmax(auto-fit, 1fr));
}

.flip-card {
  width: 250px;
  height: 250px;
  perspective: 1000px;
  grid-column: 2/3;
  cursor: pointer;
}

.flip-card-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  position: relative;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.flip-card-front img,
.flip-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin: 15px;
}

.flip-card-back {
  transform: rotateY(180deg);
}


.description {
    margin: 50px 5px;
    padding: 5px;
    line-height: 1.5;
}

.description p {
    margin: 20px 0;
    text-align: left;

}



/* ------      PROJECTS AND SERVICES       --------*/
#services {
    background: var(--primary-bg3) ;
    text-align: left;
}

#services p {
    text-align: left;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(200px, 1fr));
    gap: 1.2rem;
}

.services {
    display: inline-block;
    max-height: auto;
    margin: 1rem;
    padding: 2rem;
    border: 1px solid var(--accent-color1);
    border-radius: 18px;
}

#services .service-container .services ul {
    list-style-position : inside ;
}

/*--- PROJECTS  --*/
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem ;
    margin-top: 3rem;
}

.project-box {
    background: var(--accent-text) ;
    border: solid 1px var(--accent-color1) ;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease ;
    text-align: center;
}
.project-box:hover {
    transform: translateY(-11px);
    box-shadow: var(--shadow);
}

.project-name {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    padding: 1.5rem;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease ;
}
.project-box:hover .project-image {
    transform: scale(1.05) ;
}

.project-description {
    padding: 1.2rem;
    margin: 0 ;
    text-align: left;
    margin-bottom: 1.3rem;
}

.project-btn {
    background: var(--accent-color1) ;
    color: var(--accent-text);
    margin-bottom: 1.3rem;
    padding: 0.8px 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: large;
    font-weight: 780;
    transition: all 0.4 ease;
    text-decoration: none;
    display: inline-block;
}
.project-btn:hover {
    transform: translateY(-3px);
    box-shadow: 1px 4px 15px rgba(0, 100, 240, 0.4);
}




/*  ---------    CONTACT SECTION      ---------*/
.contact-container {
    display: flex;
    flex-direction: row;
}
#contact p {
    text-align: left;
}

.box {
    min-height: 250px;
    margin: 30px;
    padding: 10px;
    background-color: var(--primary-bg2);
    justify-items: center;
    align-items: center;
    border-radius: 20px;
}
.box p {
    margin: 20px 0;
}




/* -----          FOOTER          ------*/
footer {
    position: relative ;
    left: 0 ;
    bottom: 0 ;
    width: 100% ;
    margin-top: 60px;
    padding: 8px 8px 15px 10px;
    border-radius: 5px;
    background-color: var(--primary-bg2);
    line-height: 3;
    display: flex;
    flex-direction: column;
    font-size: 20px;
}

footer .pair{
    display: flex;
    justify-content: space-evenly;
}

footer a {
    text-decoration: none;
    color: var(--accent-color1);
    border-radius: 10px;
}
footer a:hover {
    background-color: var(--primary-bg2h);
}

footer p {
    text-align: center;
    user-select: none;
    font-weight: 600;
}
footer p:hover {
    cursor: default;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4) ;
}

footer .pair .footerbutton img {
    width: 40px;
    height: 40px;
    border-radius: 25%;
}
footer .pair .footerbutton:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 200, 250, 0.4);
}






/* -------   DEFINITION OF KEYFRAMES       --------*/
@keyframes navLinkFade {
   from {
	opacity: 0 ;
	transform : translateX(-50px);
}
   to {
	opacity : 1 ;
	transform : translateX(0px) ;
}
}

@keyframes showform {
    0% {
       height: 0 ;
       display: none;
    }
    100% {
       min-height: auto; 
       display: grid ;
    }
}






/* ---------        MEDIA QUERIES      ----------*/

@media (max-width: 768px) {
    body {
        letter-spacing: 1px;
    }

    #mode-toggler {
        top: 50px;
    }

    nav {
        position: fixed;
        top: 0;
        right : 0;
        height : 40px;
        width: 100vw;
        background : var(--accent-text);
        margin-bottom: 10rem;
        z-index: 50;
        align-items: center;
    }

    nav ul {
        position : fixed ;
        left : 0 ;
        height : 80% ;
        top : 35px; 
        background-image: linear-gradient(to bottom,var(--background), var(--primary-bg1),var(--primary-bg2));
        display : flex ;
        flex-direction : column ;
        align-items : center ;
        justify-content: space-evenly;
        width : 60vw ;
        transform : translateX(-100%);  
        transition : transform 0.5s ease-in ;
        margin: 0;
        border-radius: 7px 7px 15px 0;
        z-index: 50;
    }

    nav ul li {
        opacity : 0 ;
        font-size: 20px;
    }

    .show-on-phones {
        display: block;
    }

    .burger {
        display : block ;
        cursor : pointer ;
    }

    #hero {
        margin-top: 40px;
    }

    #section-header {
        font-size: 1.7rem;
        font-weight: bolder;
    }

    .flip-card {
        width: 180px ;
        height: 180px;
    }

    #services {
	font-size: 20px;
    }

    .contact-container {
    flex-direction: column;
    }

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: .7rem ;
}


.project-name {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    padding: .9rem;
}

.project-description {
    padding: .9rem;
    margin: 0 ;
    text-align: left;
    margin-bottom: .9rem;
}

    .description,#contact {
        font-size: 20px;
        line-height: 1.3;
    }

    .description p {
        margin: 50px 0;
    }

    
}