@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Nunito:wght@200&family=Outfit:wght@100..900&display=swap');

*{
    margin:0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family:'Nunito,sans-serif';
}

html {
    scroll-behavior: smooth; 
}

.navbar a.active {
    color: var(--main-color); 
    font-weight: bold;
}


:root{
   --bg-color:#191f36;
   --snd-bg-color:#262B40;
   --text-color: #fff;
   --main-color:#59B2F4;
}

html{
    font-size: 62.5%;
    overflow-x: hidden;
}

body{
    background: var(--bg-color);
    color: var(--text-color);
}

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

.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo{
    font-size: 3rem; 
    color: var(--text-color);
    font-weight: 700;
    cursor: default;
    align-items:flex-start;
}

.navbar a{
    font-size: 1.5rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 700;
}

.navbar a:hover,
.navbar a.active{
    color: var(--text-color);
}

#menu-icon{
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}

.home{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 5%;
}

.home-content {
    text-align: left;
    max-width: 700px;
}

.home-content h2{
        font-size: 3.2rem;
        font-weight: 700;
        text-align: left; 
        display: block;
        width: 100%;
    
}

.home-content h2:nth-of-type(2){
    margin-bottom: 2rem;
}

span{
    color: var(--main-color);
}

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

.home-img img{
    width: 25vw;
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage{
    0%{
        transform: translateY(0);
    }
    50%{
        transform: translateY(-2.4rem);
    }
    100%{
        transform: translateY(0);
    }
}

.home-content p{
    font-size: 1.6rem;    
}

.social a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    font-size: 2rem;
    border-radius: 50%;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease;
}

.social a:hover{
    background: var(--main-color);
    color: var(--snd-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
    margin-right: 10px; /* Add spacing between buttons */
}

.btn:last-child {
    margin-right: 0; /* Remove margin for the last button */
}

.btn:hover {
    box-shadow: none;
}

/* about  */

.abt {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    gap: 3rem;
    background: var(--snd-bg-color);
    padding: 5rem 10%; 
    width: 100%;
}

.abt-img img {
    width: 20vw;
    height: auto; 
    margin-left: -10px;
}

.heading {
    text-align: left;
    font-size: 5rem; 
}

.abt-content h3 {
    font-size: 3rem; 
}

.abt-content p {
    font-size: 2rem; 
    margin: 2.5rem 0 4rem;
    line-height: 1.8; 
}

.btn {
    font-size: 2rem; 
    padding: 1.2rem 3rem; 
}


/* Skills Section */
.skills {
    min-height: 80vh;
    scroll-snap-align: start;
    background-color: var(--bg-color);
    padding: 80px 9%;
    position: relative; 
}

.skills-grid {
     display: grid;
     grid-template-columns: repeat(5, 1fr);
     gap: 20px;
     text-align: center;
     padding: 20px;
}

.skill {
    text-align: center;
    padding: 25px; /* More padding */
    border-radius: 10px;
    background-color: var(--bg-color); /* Card's background color */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* For smooth hover effect */
    position: relative;
    overflow: hidden;
}

.skill:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Enhanced shadow on hover */
}

/* Image and Title Styling */
.skill img {
    width: 60px;
    height: 60px;
}

h2 {
    font-size: 5rem;
    text-align: center;
    margin-bottom: 1.5em;
    position: relative;
    padding-bottom: 0.5em;
}

.skill h3 {
    margin-top: 10px;
    font-size: 18px;
}

/* Additional Information Overlay (Hidden by Default) */
.skill .skill-info {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    color: var(--text-color); /* Fixed variable */
    display: 
}

/* project css  */

.projects {
    min-height: 90vh;
    padding: 8rem 5%;
    background: var(--snd-bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    grid-template-rows: repeat(2, auto);  /* 2 rows */
    gap: 50px; /* Increased spacing between cards */
    max-width: 1200px; /* Adjusted for better centering */
    margin: 0 auto;
    justify-content: center;
}

.project {
    width: 500px; /* Fixed width for consistency */
    height: 350px; /* Increased height */
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    background-color: var(--bg-color);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.project img {
    width: 90%; /* Reduce image width */
    height: 90%; /* Reduce image height */
    object-fit: contain;
    border-radius: 10px;
    transition: opacity 0.3s ease;
}

.project .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.project:hover .overlay {
    opacity: 1;
}

.project .overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.project .overlay p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    max-width: 80%;
    opacity: 0.9;
}

.project .overlay a {
    display: inline-block;
    padding: 10px 20px;
    background: var(--main-color);
    color: var(--bg-color);
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s ease;
}

.project .overlay a:hover {
    background: var(--text-color);
}


/* contact  */

/* Contact Section */
.contact {
    min-height: 0vh;
    scroll-snap-align: start;
    /*For snap scrolling*/
    background-color: var(--light-bg);
    padding: 80px 0;
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-text {
    font-size: 2em;
    color: var(--text-color);
    margin-bottom: 30px;
}

/* Form Styling */
.contact form {
    display: flex;
    flex-direction: column;
    gap: 20px;        /*Increased gap for better spacing*/
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;   /* Align labels to the left */
}

.contact label {
    font-weight: 600;
    margin-bottom: 8px; /*Slightly larger margin*/
    color: var(--text-color);
    display: block;    /*Ensure labels take full width*/
}

.contact input,
.contact textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;   /* Softer border radius */
    font-size: 1em;
    font-family: inherit; /* Inherit font from the body */
    background-color: var(--bg-color); /* Respect dark mode */
    color: var(--text-color);       /* Respect dark mode */
    transition: border-color 0.3s ease; /* Add transition on focus */
    width: 100%;        /*Ensure inputs take full width*/
    box-sizing: border-box; /*Include padding and border in width*/
}

.contact input:focus,
.contact textarea:focus {
    outline: none;  /* Remove default outline */
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(var(--primary-color-rgb), 0.3); /* Added subtle shadow */
}

.contact textarea {
    resize: vertical; /* Allow vertical resizing of textarea */
}

/*Form Message*/
.form-message {
    text-align: center;
    margin-top: 20px;
    font-weight: bold;
}

.form-message.success {
    color: green;
}

.form-message.error {
    color: red;
}

/*Responsive adjustments*/
@media (max-width: 600px) {
    .contact input,
    .contact textarea {
        padding: 12px; /*Slightly smaller padding on small screens*/
    }
}
