@import url(https://fonts.googleapsi.com/css2?family=poppins.wgth@100,200,300,400,500,600&display=swap);

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: poppins, sans-serif;
}

html{
    font-size: 62.5%;
}

body{
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    background-color: black;
    color: white;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 9%;
    background-color: rgba(0, 0, 0, 0.9); /* Initial background color with slight transparency */
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease; /* Smooth transition */
    backdrop-filter: blur(0px); /* No blur initially */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

header.scrolled {
    background-color: rgba(0, 0, 0, 0.8); /* More transparent on scroll */
    backdrop-filter: blur(1.5px); /* Add blur effect when scrolled */
}


.logo{
    font-size: 4rem;
    color: #db1f1f;
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}

.logo hover{
    transform: scale(1.1);
}

nav a{
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover,
nav a:active{
    color: #db1f1f;
    border-bottom: 3px solid #db1f1f;
}

@media(max-width:995px){
    nav{
      position: absolute;
      display: none;
      top: 0;
      right: 0%;
      width: 40%;
      border-bottom: 3px solid #db1f1f;
      border-bottom-left-radius: 2rem;
      padding: 1rem solid;
      background-color: #161616;
      border-top: 0.1rem solid rgba(0,0,0,0.1);
    }

    nav.active{
        display: block;
    }

    nav a{
        display: block;
        font-size: 2rem;
        margin: 3rem;
    }

nav a:hover,
nav a:active{
    padding: 1rem;
    border-radius: 0.5rem;
    border-bottom: 0.5rem solid #db1f1f;
    }
}

section{
    min-height: 100vh;
    padding: 5rem 9% 5rem;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem; /* Adjust gap as needed */
    background-color: black;
    flex-wrap: wrap; /* Allow items to wrap */
}

.home-img {
    overflow: hidden; /* Ensure the image stays within its container */
    box-shadow: 0 0 15px rgba(219, 31, 31, 0.5); /* Initial shadow for depth */
    width: 300px; /* Set width for square shape */
    height: 300px; /* Set height for square shape */
    border-radius: 5px; /* Adjust the border radius for rounded corners */
}

.home-img img {
    width: 100%;          /* Make the image fill its container */
    height: 100%;         /* Set height to 100% to fill container */
    object-fit: cover;    /* Ensure the image covers the container without stretching */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transitions */
}

.home-img img:hover {
    transform: scale(1.05); /* Slight zoom on hover */
    box-shadow: 0 0 25px rgba(219, 31, 31, 0.8); /* Drop shadow on hover */
}

.home-content {
    flex: 1 1 300px; /* Allow content to grow/shrink with a minimum width */
    min-width: 300px; /* Ensure a minimum width */
}

.hover .home-content h1{
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content p{
    font-size: 1.7rem;
    margin-top: 20px;
}

.home-content h1{
    font-size: 2.7rem;
    font-weight: 700;
    margin-top: 20px;
}

.home-content span{
    font-size: 2.7ssrem;
    font-weight: 700;
}

.home-content h3{
    font-size: 2.7rem;
    font-weight: 500;
}

span{
    color: #db1f1f;
}

.social-icon a{
    margin: 20px 10px 10px 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid #db1f1f;
    font-size: 2rem;
    border-radius: 50%;
    transition: 0.3s ease;
    color: #db1f1f;
}

.social-icon a:hover{
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: #db1f1f;
    box-shadow:0 0 25px #db1f1f;
}

.btn{
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #db1f1f;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #db1f1f;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover{
    transform: scale3d(1.03);
    background-color: #db1f1f;
    color: black;
    box-shadow: 0 0 25px #db1f1f;
}

.typing-text{
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.typing-text span{
    position: relative;
}

.typing-text span::before{
    content: "Software Developer";
    color: #db1f1f;
    animation: words 20s infinite;
}

.typing-text span:after{
    content: "";
    background-color: black;
    position: absolute;
    width: calc(100%+8px);
    height: 100%;
    border-left: 3px solid black;
    right: -8;
    animation: cursor 0.6s infinite;
}

@keyframes cursor{
    to{
        border-left: 3px solid #db1f1f;
    }
}

@keyframes words{
    0%,20%{
        content: "Web Designer";
    }
    21%,40%{
        content: "Software Developer";
    }
    41%,60%{
        content: "Web Developer";
    }
    61%,80%{
        content: "Graphics Designer";
    }
    81%,100%{
        content: "Social Media Designer";
    }
}

@media(max-width){
    .home{
        gap: 4rem;
    }
}

@media(max-width: 995px){
    .home{
        flex-direction: column;
        margin: 5rem 4rem;
    }

    .home.home-content h3{
        font-size: 2.5rem;
    }

    .home-content h1{
        font-size: 5rem;
    }

    .home-img-img{
        width: 70vh;
        margin-top: 4rem;
    }
}
.active{
    padding: 1rem;
    border-radius: 0.5rem;
    border-bottom: 0.5rem solid #db1f1f;
    color: #db1f1f;
}

/* Burger Menu */
.burger-menu {
    display: none; /* Initially hidden */
    background: none;
    border: none;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
}

/* Show burger menu on smaller screens */
@media (max-width: 995px) {
    .burger-menu {
        display: block; /* Display burger icon in mobile view */
        position: absolute;
        top: 1.5rem;
        right: 2rem;
        z-index: 101; /* Ensure the button is above the nav */
    }

    /* Hide nav by default */
    nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        background-color: #161616;
        flex-direction: column;
        padding: 2rem;
        border-top: 0.1rem solid rgba(0, 0, 0, 0.1);
    }

    nav.active {
        display: flex; /* Show the nav when active */
    }

    nav a {
        font-size: 2rem;
        margin: 1.5rem 0;
    }

    /* Adjust hover effects for links */
    nav a:hover,
    nav a:active {
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: 0.5rem solid #db1f1f;
    }
}

/* Prevent body scroll when mobile menu is active */
body.menu-active {
    overflow: hidden;
}
