/* FONT IMPORTS */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lato', sans-serif;
}

html {
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6, span {
    color: rgb(20, 19, 32);
    text-align: center;
    line-height: 1.25;
}

p {
    line-height: 1.5;
    font-size: 16px;
}
a{
    text-decoration: none;
    position: relative;
}

li {
    list-style-type: none;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.container {
    padding: 50px 0;
}

.row {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.text--red {
    color: crimson;
}

section:nth-child(even) {
    background-color: #d8d8d8;
}

.section__title {
    margin-bottom: 20px;
}
.link__hover-effect:after {
    content: "";
    position: absolute;
    height: 3px;
    background-color: currentColor; /* Matches the text color dynamically */
    width: 0;
    bottom: -3px;
    left: 0; /* Ensure the underline starts from the left */
    transition: all 0.3s ease; /* Smooth transition */
}

.link__hover-effect--white:after {
    background-color: white; /* Explicitly set white for white hover effects */
}

.link__hover-effect--black:after {
    background-color: black; /* Explicitly set black for black hover effects */
}

.link__hover-effect:hover:after {
    width: 100%; /* Expand the underline to full width */
}

/* Navigation Bar */
nav {
    height: 100px;
    width: 100%;
    margin: 0 auto;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav__links--list {
    display: flex;
}

.nav__links--anchor {
    margin: 0 12px;
    color: rgb(11, 11, 29);
    font-weight: 700;
}

.nav__links--anchor-primary {
    background-color: crimson;
    padding: 8px 16px;
    border-radius: 50px;
    color: white;
}

.nav__links--anchor-primary:hover {
    background-color: #e24848;
}

.personal__logo {
    font-size: 24px;
    color: crimson;
    margin: 0 12px;
    font-weight: bold;
}

/* About Me Section */
#about-me {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.about-me__info {
    display: flex;
    flex-direction: column;
}

.about-me__info--container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
    animation-delay: 0.2s; /* Delay for the container */
}

.about-me__picture--mask {
    width: 120px; /* Ensure the mask is a perfect square */
    height: 120px; /* Match the width for a circular shape */
    border-radius: 50%; /* Make the mask a circle */
    overflow: hidden;
    box-shadow: 0 8px 160px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: flex; /* Center the image inside the mask */
    align-items: center;
    justify-content: center;
    animation: popIn 1s ease-in-out;
    animation-delay: 0.4s; /* Delay for the picture mask */
}

.about-me__picture {
    width: 100%; /* Ensure the image fills the mask */
    height: 100%; /* Maintain aspect ratio */
    object-fit: cover; /* Ensure the image covers the mask without distortion */
}

.about-me__info--title {
    margin-top: 30px;
    margin-bottom: 16px;
}

.about-me__info--para {
    font-size: 20px;
    margin-bottom: 20px;
}

.about-me__link {
    font-size: 20px;
    color: crimson;
    padding: 0 16px;
    transition: transform 0.3s ease, color 0.3s ease; /* Smooth transition for scaling and color */
}

.about-me__link:hover {
    transform: scale(1.2); /* Enlarge the link slightly */
    color: #e24848; /* Optional: Change the color on hover */
}

.about-me__img--container {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    max-width: 100%; 
    height: auto; 
    padding: 20px; 
    padding-top: 60px;
}

/* Tech Stack Section */
.language__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
    justify-items: center;
}

.language {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease-in-out forwards;
}

.language:nth-child(1) {
    animation-delay: 0.2s;
}
.language:nth-child(2) {
    animation-delay: 0.4s;
}
.language:nth-child(3) {
    animation-delay: 0.6s;
}
.language:nth-child(4) {
    animation-delay: 0.8s;
}
.language:nth-child(5) {
    animation-delay: 1s;
}
.language:nth-child(6) {
    animation-delay: 1.2s;
}
.language:nth-child(7) {
    animation-delay: 1.4s;
}
.language:nth-child(8) {
    animation-delay: 1.6s;
}

.language__img {
    width: 100%;
    max-width: 120px; 
    height: auto; /* Maintain aspect ratio */
    transition: all 0.3s ease-in-out;
}

.language__img:hover {
    filter: brightness(80%);
    opacity: 0.86;
    transform: scale(0.9);
}

.language__name {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 700;
    color: rgb(20, 19, 32);
    opacity: 0; /* Hide the text by default */
    transform: scale(0.9); /* Slightly shrink the text */
    transition: all 0.3s ease-in-out;
}

.language:hover .language__name {
    opacity: 1; /* Show the text on hover */
    transform: scale(1); /* Restore the text size */
}

/* Projects Section */
.projects__list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.project__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease-in-out forwards;
}

.project__item:nth-child(1) {
    animation-delay: 0.2s;
}
.project__item:nth-child(2) {
    animation-delay: 0.4s;
}
.project__item:nth-child(3) {
    animation-delay: 0.6s;
}
.project__item:nth-child(4) {
    animation-delay: 0.8s;
}

.project__item--container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    height: auto;
    padding: 20px;
    position: relative;
}

.project__item--img--container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 1300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
    transition: transform 0.5s ease, box-shadow 0.5s ease; /* Smoother transition */
}

.project__item--img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease, filter 0.5s ease; /* Smoother transition */
}

.project__item--img--container:hover .project__item--img {
    transform: scale(1.1); /* Slightly enlarge the image */
    filter: blur(5px) brightness(80%); /* Apply blur and reduce brightness */
}

.project__item--overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Align text to the left */
    opacity: 0;
    transform: translateY(20px); /* Start slightly below */
    transition: opacity 0.5s ease, transform 0.5s ease; /* Smooth fade-in and slide-in */
    text-align: left;
    padding: 20px;
}

.project__item--img--container:hover .project__item--overlay {
    opacity: 1; /* Show the overlay */
    transform: translateY(0); /* Slide into place */
}

.project__item--title,
.project__item--sub-title,
.project__item--para {
    opacity: 0;
    transform: translateY(20px); /* Start below */
    transition: opacity 0.5s ease, transform 0.5s ease; /* Smooth fade-in and slide-in */
}

.project__item--img--container:hover .project__item--title,
.project__item--img--container:hover .project__item--sub-title,
.project__item--img--container:hover .project__item--para {
    opacity: 1; /* Fade in */
    transform: translateY(0); /* Slide into place */
}

.project__item--links {
    margin-top: 10px; 
    display: flex;
    justify-content: flex-start; 
    gap: 10px; 
}

.project__item--link {
    color: white; 
    font-size: 20px; 
    transition: color 0.3s ease; 
}

.project__item--link:hover {
    color: crimson; 
}

/*footer*/
footer {
    background-color: #242424;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.footer__row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8% 0;
    animation: fadeIn 1s ease-in-out;
    animation-delay: 0.2s; /* Delay for the footer row */
}

.footer__social--list {
    margin-bottom: 28px;
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 550px;
    font-size: 18px;
}
.footer__logo--img{ 
    width: 70px;
    height: 70px; 
    margin-bottom: 10px; 
}

.footer__social--links,
.footer__copyright {
    color:#fff
}
.footer__logo--popper{
    color:crimson;
    opacity: 0;
    position:absolute;
    right:0;
    top: 30px;
    font-weight: 700;
    transition: all 300ms ease;
}
.footer__anchor{
    position: relative;
    margin-bottom: 20px;
}

.footer__anchor:hover .footer__logo--popper {
    transform: translateX(60px);
    opacity: 1;
}

/* General Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Media Queries */
@media (max-width: 768px) {
    nav {
        height: 68px;
    }
    h1 {
        font-size: 28px;
    }
    .about-me__info--para {
        font-size: 18px;
    }
    .language{
        width: calc(100% / 3);
    }
    .project__item--para{
        font-size: 16px;
    }
    .project__item{
        padding-right: 30px;
        left: 30px;
    }
}

@media (max-width: 480px) {
    .nav__link:not(:last-child) {
        display:none
    }
    .project__item  {
        padding: 0;
        left: 0;
        width: 100%;
    }
    .project__item--para{
        display:none;
    }
    .project__item--link{
        display:flex;
        justify-content: center;
    }
    .project__item--title{
        font-size: 32px;
        line-height: 1;
        text-align: center;
    }
    .project__item--sub-title{
        text-align: center;
        margin: 12px 0;
    }
}