/* Base settings to normalize styles across browsers */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "Poppins", sans-serif;/* Default font for the whole website */
} 

/* Root variables to keep theme consistent and easy to manage */
:root{
    --bg-color: #111111; /* Main background color */
    --second-bg-color: #1a1a1a; /* Secondary background color */
    --text-color: white; /* Default text color */
    --main-color: #04fffb; /* Highlight and accent color */
}

/* Basic HTML element setup */
html{
    font-size: 62.5%; /* Base font size for rem calculations */
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Main body styling */
body{
    background-color: var(--bg-color);
    color: var(--text-color);
    
}

/* Header styling to fix its position at the top of the viewport */
.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 3rem 9%; /* Responsive padding */
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
    backdrop-filter: blur(10px); /* For Safari */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100; /* Ensure the header is always on top */
}
.header {
    -webkit-backdrop-filter: blur(10px); /* Safari */
    backdrop-filter: blur(10px);
}


/* Enhancing visual interaction */
.logo{
    font-size: 3rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}

 /* Enlarge logo on hover */
.logo:hover{
    transform: scale(1.1);
}

/* Navbar links styling */
.navbar a{
   font-size: 1.8rem;
   color: white;
   margin-left: 2rem;
   font-weight: 500;
   transition: 0.3s ease-in-out;
   border-bottom: 3px solid transparent; /* Underline effect */
}
.navbar a:hover,
.navbar a.active{
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color); /* Highlight active or hovered link */
}

/* Responsive menu icon styling */
#menu-icon{
    font-size: 3.6rem;
    color: var(--main-color);
    display: none; /* Hidden by default, shown in mobile view */
}

/* Section base styling */
section {
    min-height: 100vh;
    padding: 10rem 9% 5rem;
}

/* Home section layout */
.home{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
}
.home-content{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    margin-top: 3rem;
}
span{
    color: var(--main-color);
}
.logo span{
    color: var(--main-color);
}
.home-content h3{
    margin-bottom: 2rem;
    font-size: 3.5rem;
    margin-top: 1rem;
}
.home-content h1{
    font-size: 7rem;
    font-weight: 700;
    margin-top: 1.5rem;
    line-height: 1;
}
.home-img{
    border-radius: 50%;
}

.social-icons a{
   display: inline-flex;
   justify-content: center;
   align-items: center;
   width: 4.5rem;
   height: 4.5rem;
   background: transparent;
   border:  0.2rem solid var(--main-color);
   font-size: 2.5rem;
   border-radius: 50%;
   color: var(--main-color);
   margin: 3rem 1.5rem 3rem 0;
   transition: 0.3s ease-in-out;
}
.social-icons a:hover {
    color: white;
    transform: scale(1.3) translateY(-5px);
    box-shadow: 0 0 25px var(--main-color);
    background-color: var(--main-color);
}


.btn{
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: white;
    border: 2px solid transparent;
    letter-spacing: 0.1 rem;
    font-weight: 600;
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.btn:hover{
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--main-color);
}


.about{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10rem;
    background: var(--second-bg-color);
    color: white;
}
.about h2 span{
    color: var(--main-color);
    text-shadow: 0 0 50px var(--main-color);
    text-shadow: 0 0 50px var(--main-color);
}
.about-img{
    border-radius: 50%;
}
.about-img img{
    position: relative;
    width: 32vw;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    top: 1rem;
    cursor: pointer;
    transition: 0.4s ease-in-out;
}
.about-img img:hover{
    box-shadow:  0 0 50px var(--main-color),
                 0 0 100px var(--main-color);    
}
.heading{
    text-align: center;
    font-size: 8rem;
}
.about-content h2{
    text-align: left;
    line-height: 1.5;
}
.about-content h3{
    font-size: 2.6rem;
}
.about-content p{
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
}

.about-content .text-animation span::before {
    content: 'Web Developer';
    color: var(--main-color);
    animation: words 20s infinite;
 }
.about-content .text-animation span::after{
    content: "";
    background-color: var(--second-bg-color);
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid var(--second-bg-color);
    right: -8px;
    animation: cursor 0.6s infinite, typing 20s steps(14) infinite;
}

::-webkit-scrollbar{
    width: 15px;
}
::-webkit-scrollbar-thumb{
    background: var(--main-color);
}
::-webkit-scrollbar-track{
    background: var(--bg-color);
    width: 50px;
}
.services{
    background: var(--bg-color);
    color: white;
}
.services h2{
    margin-bottom: 5rem;
    color: white;
}
.services-container{
    display: grid;
    grid-template-columns: repeat(3,1fr);
    align-items: center;
    gap: 2.5rem
}
.services-box{
    background-color: var(--main-color);
    color: black;
    height: 250px;
    border-radius: 3rem;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}
.services-box:hover{
    background: white;
    color: var(--main-color);
    transform: scale(1.03);
}

.services-box .services-info{
    display: flex;
    flex-direction: column;
    text-align: left;
    max-height: 200px;
    justify-content: center;
    align-items: baseline;
    padding: 5em;
}
.services-info{
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.services-info p{
    font-size: 1.6rem;
    font-weight: 400;
    max-height: 100px;
    margin: auto;
}

.lang-icon{
    transform: scale(6);
}
.lang-icon-text {
    font-size: 100000px;
}
.contact{
    background-color: var(--second-bg-color);
}
.contact h2{
    margin-bottom: 3rem;
    color: white;
}
.contact form{
   max-width: 70rem;
   margin: 1rem auto;
   text-align: center;
   margin-bottom: 3rem;
}
.contact form .input-box{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;  
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: 0.8rem;
    border: 2px solid var(--main-color);
    margin: 1rem 0;
    resize: none;
}

.contact form .btn{
    margin-top: 2rem;
}

.footer{
    position:  relative;
    bottom: 0;
    width: 100%;
    padding: 40px 0;
    background-color: var(--bg-color);
}
.footer .social{
    text-align: center;
    padding-bottom: 25px;
    color: var(--main-color);
}
.footer .social a{
    text-align: center;
    padding-bottom: 25px;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    width: 42px;
    height: 42px;
    line-height: 42px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    margin: 0 10px;
    transition: 0.3s ease-in-out;
}
.footer .social a:hover{
    transform: scale(1.2)translateY(-10px);
    background-color: var(--main-color);
    color: var(--text-color);
    box-shadow: 0 0 25px var(--main-color);
}
.footer ul{
    margin-top: 0;
    padding: 0;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 0;
    text-align: center;
}
.footer ul li a{
    color: white;
    border-bottom: 3px solid transparent;
    transition: 0.3s ease-in-out;
}
footer ul li a:hover{
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}
.footer ul li{
    display: inline-block;
    padding: 0 15px;
}
.footer .copyright{
    margin-top: 50px;
    text-align: center;
    font-size: 16px;
    color: white;
}


/* Java.html */
.lang-header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; /* Ensure flex direction is column for centering */
    gap: 2rem; /* Adjust gap as needed */
    background: var(--second-bg-color);
    color: white;
    text-align: center; /* Ensure text is centered */
    padding-bottom: 100rem; /* Adjust padding to move content higher */
}

/* projetcs */


.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Create as many 300px wide columns as fit */
    gap: 20px;
    padding: 2px;
    margin: auto; /* Centers the container horizontally */
    max-width: 1200px; /* Set a max-width for the container to avoid overly wide layouts */
    justify-content: center; /* Center grid items in the grid area */
    text-align: center; 
}

.project-box {
    background: var(--second-bg-color);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Start aligning items from the top */
    height: 100%; /* Full height to match other boxes in the grid */
    overflow: hidden;
}


.project-box iframe,
.youtube-iframe {
  display: block;
  width: 100%;                 /* fill the card width */
  height: auto;
  aspect-ratio: 16 / 9;        /* keeps 16:9 without hardcoding height */
  border: 0;
  border-radius: 10px;         /* optional, match your style */
}

.project-box video {
    width: 100%;   /* Responsive width */
    height: auto;  /* Maintain aspect ratio */
    max-width: 250px; /* Max-width to maintain consistency across project boxes */
}

.project-box video.playing {
    transform: scale(1.5); /* Scale up by 150% when playing */
    max-width: 100%; /* Allow scaling beyond the default max-width */
}

.project-info {
    width: 100%;
    text-align: justify;
    flex-grow: 1; /* Allow this area to expand to fill available space */
    display: flex;
    flex-direction: column; /* Ensures content is organized vertically */
    justify-content: space-between; /* Space out content vertically */
}

.project-links {
    display: flex;
    flex-direction: column; /* Stack children vertically */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    text-align: center; /* Center text alignment for all text inside */
    gap: 10px; /* Space between links */
}


.project-box h3 {
    margin-top: 0; /* Reduce margin at the top if needed */
    font-size: 2.4rem; /* Smaller font size for consistency */
    text-align: center; /* Center heading */
}

.project-info p {
    font-size: 17px;/* Increase from 1.7rem to 2rem */
    line-height: 1.6; /* Increase line height for better readability */
    margin: 10px 0; /* Adjust margin as needed */
    padding: 10px; /* Maintain padding for spacing */
    color: var(--text-color); /* Ensure text color is set if not defined elsewhere */
    text-align: justify; /* Maintain justified alignment for clean appearance */
}

.project-info h1 {
    margin: 20px 0; /* Vertical margin of 20px and horizontal margin of 0 */
    border-radius: 5px; /* Optional: Rounds the corners */
    font-size: 10px;
}/* Adjusting video settings to fit within project boxes */



/* video poster  */
video {
    width: 100%;   /* Responsive width */
    max-width: 200px; /* Maximum width of the video element */
    height: auto;  /* Maintain aspect ratio */
    object-fit: contain; /* Ensure the entire image fits without cropping */
}
.btn {
    background-color: var(--main-color);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    transition: background 0.3s ease;
}

.btn:hover {
    background-color: darken(var(--main-color), 10%);
}

/* arrow */
.scroll-down {
    display: none; /* Hide by default */
}

@media (max-width: 895px) {
    .scroll-down {
        display: block; /* Show on mobile devices */
        position: fixed;
        bottom: 5rem; /* Adjust position as needed */
        left: 40%; /* Move it more to the left */
        transform: translateX(-50%);
        font-size: 10em; /* Adjust size as needed */
        cursor: pointer;
        animation: bounce 2s infinite;
        color: var(--main-color); /* Use the main color */
    }

    @keyframes bounce {
        0%, 20%, 50%, 80%, 100% {
            transform: translateY(0);
        }
        40% {
            transform: translateY(-10px);
        }
        60% {
            transform: translateY(-5px);
        }
    }
}

/* Responsive media queries for various device widths */
@media(max-width: 1285px){
    html{
        font-size: 55%; /* Adjust font size for smaller screens */
    }
    .services-container{
        padding-bottom: 7rem;
        grid-template-columns: repeat(2,1fr);
        margin: 0 5rem
    }
    .project-info p {
        font-size: 1.8rem; /* Slightly smaller for better fit on medium screens */
    }
}
@media(max-width: 991px){
    header{
        padding: 2rem 3%;
    }
    section{
        padding: 1rem 9% 10rem;
    }
    .services{
        padding-bottom: 7rem;
    }
    .footer{
        padding: 2rem 3%;
    }
    .project-info p {
        font-size: 1.6rem; /* Smaller font size for compact spaces */
    }
}
@media (max-width: 895px) {
    #menu-icon {
        display: block;
    }
    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        width: 50%;
        padding: 1rem 3%;
        background: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(20px);
        border-bottom-left-radius: 2rem;
        border-left: 2px solid var(--main-color);
        border-bottom: 2px solid var(--main-color);
        display: none;
    }
    .navbar.active {
        display: block;
    }
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem;
        color: white;
    }
    .home {
        flex-direction: column;
        margin: 5rem 4rem;
    }
    .home-content h3 {
        font-size: 8rem;
        margin-top: 3rem;
    }
    .home-content p {
        max-width: 600px;
        margin: 0 auto;
    }
    .home-img img {
        width: 56vw;
        margin-top: -2rem;
    }
    .about {
        flex-direction: column-reverse;
    }
    .about-content {
        margin: 0 2rem 4rem;
    }
    .about-img img {
        width: 52vw;
        margin-top: 1rem;
        margin-bottom: 3rem;
    }
    .services h2 {
        margin-bottom: 3rem;
    }
    .services-container {
        grid-template-columns: repeat(1, 1fr);
    }
    .project-info p {
        font-size: 1.4rem;
    }
    /* Center the image in the lang-header section */
    .lang-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 2rem; /* Ensure gap is consistent with main style */
        padding-bottom: 60rem; /* Adjust padding to move content higher */
    }
    .lang-header img {
        margin: auto;
    }

    /* Adjust arrow size and position for smaller screens */
    .scroll-down {
        font-size: 8em; /* Adjust size as needed */
        bottom: 60px; /* Adjust position as needed */
        left: 45%; /* Move it more to the left on smaller screens */
        transform: translateX(-50%);
    }
}