* {
    box-sizing: border-box;
    /* border: 2px solid white; */
    background-color: transparent;
}

/* CSS Variables */
:root {
    --max-width: min(100%, 100vw);

    --background-color: #dddddd;
    --dark-blue: #1b2a41;
    --light-gray-blue: #324a5f;
    --site-visited-color: #3d9ff5;
    --dark-gray-blue: #0c1821;
    --text-color: #ccc9dc;
}

html {
    background-color: var(--background-color);
    scroll-behavior: smooth;
}

body {
    width: 100%;
    overflow-x: hidden; /* Prevents horizontal scrolling */
}
.sections {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 5%;
    opacity: .95;
}


/* Styling */
.light-gray-blue {
    background-color: var(--light-gray-blue);
}

.text-white  {
    color: white;
}

.big-text {
    font-size: 30px;
}
.medium-text {
    font-size: 20px;
}



/* Navigation Bar */
.nav-link:hover {
    background-color: var(--dark-gray-blue);
}
.brand-icon {
    height: 50px;
}
.brand-icon:hover {
    animation: pulse 4s infinite;
}

/* animation */
@keyframes pulse{
    0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: .9;
  }
}



/* Pages */
/* Shared page section helper */
.page-section {
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 20px;
    background-clip: padding-box;
}
/* Home & Profile Page */
.home-page {
    background-color: var(--background-color);
    height: var(--homepage-height);
    padding-top: 3%;
}

.home-layout {
    height: 97vh;
    width: 100%;
    border-top-right-radius: 30px;
    border-top-left-radius: 30px;
    overflow: hidden;
    background-color: var(--dark-blue);
    padding-top: 5%;

}

.home-img-container {
    border-radius: 50%;
    width: 22%;
    height: 22%;
    background-color: var(--text-color);
    margin: auto;
    overflow: hidden;
}
.home-img-container:hover {
    animation: pulse 6s infinite;
}
.home-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-layout .name {
    font-family: 'Times New Roman', Times, serif;
    font-size: 8vh;
    color: var(--text-color);
    text-align: center;
    margin-top: 50px;
}
.home-layout .summary {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2.5vh;
    color: var(--text-color);
    text-align: center;
    font-style: italic;
}
/* For profile section layout */
#profile {
    width: 100%;
    height: auto;
    background-color: var(--light-gray-blue);
}
.profile-layout {
    width: 90%;
    margin: 0 auto;
    padding: 5%;
    height: auto;
}

.profile-layout .profile-intro {
    font-family: 'Times New Roman', Times, serif;
    font-size: 2.7vw;
    overflow-wrap: break-word;
    margin-top: 4vh;
    padding: 2vh;
    color: var(--text-color);
}
.desc-container {
    height: 60%;
    display: block;
    margin-top: 5%;

}
.profile-desc{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.5vw;
    width: 100%;
    overflow: hidden;
    padding-left: 2vh;
    color: var(--text-color);
}
.profile-desc ul {
    margin-bottom: 5%;
}
.review {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    color: var(--text-color);
}

.review::before {
    content: "★★★★★ ";
    color: gold;
    font-size: 1.2em;
}



/* Skill Page */
.skill-page {
    background-color: var(--background-color);
}
#skills {
    width: 100%;
    height: auto;
}
.skills-layout {
    height: 100%;
    width: 100%;
    display: grid;
    row-gap: clamp(0.75rem, 2.5vh + 0.5vw, 5vh);
    color: var(--text-color);
    background-color: var(--dark-gray-blue);    
    border-top-right-radius: 30px;
    border-top-left-radius: 30px;
    padding: 3% 10%;
}
/* Skills Container */

.skills-layout h2 {
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    background-color: var(--light-gray-blue);
    width: 100%;
    margin: 0;
    font-family: 'Times New Roman', Times, serif;
    font-size: 4vw;
    /* responsive heading size: min 1.25rem, scales with viewport, max 3.5rem */
    font-size: clamp(1.25rem, 3.5vw + 0.5rem, 3.5rem);
    line-height: 1.1;
    text-align: left;
    color: var(--text-color);
    padding: 0 1% 1% 2%;
}


.skills-list {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(0.5rem, 2vw, 1.5rem);
    padding: clamp(0.75rem, 3vw, 3rem);
    align-items: start;
    background-color: var(--dark-blue);
    box-sizing: border-box;
}
.skill-item {
    width: 100%;
    text-align: left;
    font-size: 2.5vw;
    padding-left: 1%;
}




/* Technologies Container */
.skills-layout .techs-title {
    margin-top: 5%;
    background-color: var(--dark-blue);
}
.techs-div {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, minmax(80px, auto));
    gap: clamp(0.5rem, 2vw, 1.5rem);
    justify-items: center;
    align-items: center;
    width: 100%;
    padding: 4% 0;
    box-sizing: border-box;
    background-color: var(--light-gray-blue);
    overflow: hidden; /* ensures only 2 rows are visible */
}

.tech-icon {
    width: 100%;
    max-width: 120px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ensure images/SVGs inside icons scale without overflow */
.tech-icon img,
.tech-icon svg {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
.tech-icon:hover {
        animation: pulse 1s infinite;
}




/* Certificates Container */

.skills-layout .certs-title {
    margin-top: 5%;
    background-color: var(--dark-blue);
}


.certs-div {
    display: grid;
    grid-template-columns: 1fr; /* single column */
    row-gap: 1.5rem; /* vertical spacing like a list */
    width: 100%;
    padding: 3vw 4vw;
    align-items: start;
    justify-items: stretch;
    grid-auto-rows: minmax(min-content, auto);
    box-sizing: border-box;
    background-color: var(--light-gray-blue);
}


.cert-item {
    width: 100%;
    text-align: left;
    font-size: 2.5vw;
}
.cert-item a {
    color: var(--text-color);
    text-decoration: none;
}
.cert-item a:hover {
    color: cyan;
    font-weight: 500;
    text-decoration: underline;
}

/* Testimonials Container */
.skills-layout .testimonials-title {
    height: auto;
    background-color: var(--light-gray-blue);
}

.testimonials-div {
    background-color: var(--dark-blue);
    padding: 2vw 4vw;
    align-items: center;
    margin: auto;

}
.testimonial-item {
    font-size: clamp(1rem, 1.6vw + 0.5rem, 1.4rem);
}





/* For projects section layout */
.project-page {
    background-color: var(--background-color);
    padding-top: 30px;
}
#projects {
    width: 100%;
    background-color: var(--dark-gray-blue);
    border-radius: 30px;
}
.projects-layout {
    width: 100%;
    height: 100%;
    padding: 5%;
}

.project-item {
    padding: 0;
    background-color: var(--light-gray-blue);
    margin-bottom: 4rem;    
}
.project-title {
    color: var(--text-color);
    padding-left: 1rem;
    height: 15%;
    width: 100%;
    align-content: center;
    font-size: 3vw;
    margin: 0;
    font-family: 'Times New Roman', Times, serif;

}
.project-subtitle {
    padding-left: 1rem;
    height: 40px;
    align-content: center; 
}
.project-details {
    background-color: var(--dark-blue);
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    height: auto;
    padding: 30px;

}
.project-details img {
    width: 90%;
    height: auto;
}
.project-details div {
    padding: 10px 20px;
    opacity: .9;
    color: var(--text-color);
    overflow: hidden;
    overflow-wrap: break-word;
    border-radius: 20px;
}




/* For contact section layout */
.contact-page {
    background-color: var(--background-color);
    padding-top: 30px;
}
#contact {
    width: 100%;
    height: 90%;
    background-color: var(--light-gray-blue);
    border-radius: 30px;
}
.contact-info {
    text-align: center;
    color: var(--text-color);
    padding: 4rem;
    font-family: 'Times New Roman', Times, serif;
}
.contact-title {
    font-size: 4rem;
    
}
.socials-contact {
    margin-top: 10%;
    display: flex;
    justify-self: center;
    justify-content: space-evenly;
    width: 100%;
    height: 20vh;
}
.icon-social {
    color: var(--text-color);
    height: 60%;
}
.icon-social:hover {
    animation: pulse 1s infinite;
}
.icon-social:active {
    color: var(--site-visited-color);
}
.icon-social:visited {
    color: var(--site-visited-color);
}





/* Small devices (phones) */
@media (max-width: 499px) {
    .sections {
        height: 100%;
        margin: auto;
        padding: 5% 1rem;
    }

    .home-page {
        padding-top: 80px;
    }
    .home-layout {
        padding-top: 20%;
        padding-left: 10%;
        padding-right: 10%;
    }
    .home-img-container {
        height: 50%;
        width: 50%;
        margin-left: calc(50% - 50%/2);
        /* margin-top: 10%; */
    }
    .home-layout .name {
        margin-top: 60px;
    }
    .home-layout .summary {
        font-size: 4vw;
    }
    .profile-layout {
        width: 100%;
        height: auto;
        margin: auto; 
        overflow: hidden;   
    }
    .profile-layout .profile-intro {
        font-size: 6.5vw;
        padding: 0;
        height: 20%;        
    }
    .desc-container {
        height: auto;
    }
    .profile-desc{
        font-size: 110%;
        padding: 0;
    }
    .skill-page {
        padding-top: 80px;  
    }
    .skills-layout {
        padding-left: 5%;
        padding-right: 5%;
    }
    .skills-layout h2 {
        font-size: 9vw;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
    .skills-list {
        padding-left: 8vw;  
    }

    .skill-item {
        font-size: 5vw;
    }
    .techs-div {
        gap: 1px;
        padding: 5%;
    }
    .tech-icon {
        max-width: 60%;
    }
    .certs-div {
        padding-left: 8vw;
    }
    .cert-item {
        width: 100%;
        text-align: left;
        font-size: 5vw;
    }
    .testimonials-div {
        height: auto;
        padding: 2vw;
        margin: auto;

    }
    .testimonial-item {
        font-size: 100%;
    }
    .project-page {
        padding-top: 80px;
    }
    #projects {
        background-color: transparent;
    }
    .projects-layout {
        padding: 0;
    }
    .project-item {
        width: 100%;
        padding: 5px;
    }
    .project-title {
        font-size: 7vw;
        padding: .5rem;
    }
    .project-subtitle {
        padding-left: .5rem;
        height: auto;
        font-size: 5vw;
    }
    .project-details {
        display: block;
        justify-content: center;  
        padding: 10px;  
        border-radius: 10px;
    }
    .project-details img {
        width: 100%;
        height: auto;
    }
    .project-details div {
        margin-top: 5%;
        padding: 5px;
        border-radius: 5px;
        font-size: 85%;
    }
    .project-item:last-child {
        margin: 0;
    }

    .contact-page {
        height: auto;
        padding-top: 80px;
    }
    #contact {
        border-radius: 10px;
    }
    .contact-info {
        text-align: center;
        color: var(--text-color);
        padding: 2vw;  
    }
    .contact-title {
        font-size: 8vw;
    }
    .contact-email {
        font-size: 4vw;
        white-space: normal;
    }
    .socials-contact {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-evenly;
        gap: 10px;
        padding: 5%;
        height: auto;
    }
    .icon-social {
        min-height: 100%;
    }

}

/* Medium devices (tablets) */
@media (max-width: 768px ) and (min-width: 500px) {

    .sections {
        width: 98%;
        height: 100%;
        margin: auto;
        padding-top: 5%;
    }

    .home-page {
        padding-top: 80px;
    }
    .home-img-container {
        height: 40%;
        width: 40%;
        margin-left: calc(50% - 40%/2);
        /* margin-top: 10%; */
    }
    .home-layout .name {
        margin-top: 60px;
    }
    .home-layout .summary {
        font-size: 2.5vw;
    }

    .profile-layout {
        width: 100%;
        height: auto;
        margin: auto; 
        overflow: hidden;   
    }
    .profile-layout .profile-intro {
        font-size: 5vw;
        padding: 0;
        height: 20%;        
    }
    .desc-container {
        height: auto;
    }
    .profile-desc{
        font-size: 100%;
        padding: 0;
    }
    .skill-page {
        padding-top: 80px;
    }
    .skills-layout h2 {
        font-size: 7vw;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }
    .skills-list {
        padding-left: 5vw;        
    }
    .skill-item {
        font-size: 3.5vw;
    }

    .techs-div {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        grid-auto-rows: minmax(80px, auto);
        gap: clamp(0.5rem, 2vw, 1.5rem);
        padding: 4% 0;
        align-items: center;
        justify-items: center;
        width: 100%;
    }
    .tech-icon {
        width: 60%;
    }
    
    .certs-div {
        padding-left: 5vw;
    }
    .cert-item {
        width: 100%;
        text-align: left;
        font-size: 3.5vw;
    }
    .testimonials-div {
        height: auto;
        background-color: var(--dark-blue);
        padding: 2vw 4vw;
        align-items: center;
        margin: auto;

    }
    .testimonial-item {
        font-size: 100%;
    }

    .project-page {
        padding-top: 80px;
    }
    .project-title {
        font-size: 5.5vw;
    }
    .project-subtitle {
        padding-left: 1rem;
        height: auto;
        font-size: 3.5vw;
    }
    .project-details {
        display: block;
        justify-content: center;  
        padding: 20px;  
    }
    .project-details img {
        width: 100%;
        height: auto;
    }
    .project-details div {
        margin-top: 5%;
    }
    .project-item:last-child {
        margin: 0;
    }

    .contact-page {
        height: auto;
        padding-top: 80px;
    }
    #contact {
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
    }
    .contact-info {
        text-align: center;
        color: var(--text-color);
        padding: 4rem;
        font-family: 'Times New Roman', Times, serif;
    }
    .contact-title {
        font-size: 8vw;
    }
    .contact-email {
        font-size: 4vw;
    }
    .socials-contact {
        width: 120%;
    }
    .icon-social {
        max-height: 45%;
    }

}
/* Large devices (laptops) */
@media (max-width: 1024px) and (min-width: 769px) {
    .home-page {
        padding-top: 60px;
    }
    .profile-layout {
        width: 95%;
        margin: auto;        
    }

    .profile-layout .profile-intro {
        font-size: 4vw;
        overflow-wrap: break-word;
        margin-top: 2vh;
        padding: 2vh;
        height: 20%;
        color: var(--text-color);
        
    }
    .desc-container {
        height: 75%;
    }
    .profile-desc{
        font-size: 1.86vw;
    }
    
    .skill-page {
        padding-top: 60px;
    }
    .skills-layout h2 {
        font-size: 5vw;
    }
    .techs-div {
        row-gap: 1%;
    }
    .tech-icon {
        width: 45%;
    }
    .testimonials-div {
        height: auto;
    }
    .testimonial-item {
        font-size: 100%;
    }

    .project-title {
        font-size: 4vw;
    }
    .project-subtitle {
        padding-left: 1rem;
        height: auto;
        font-size: 3vw;
    }
    .project-details {
        display: block;
        justify-content: center;    
    }
    .project-details img {
        width: 100%;
        height: auto;
    }
    .project-details div {
        margin-top: 5%;
    }
    
    .contact-page {
        padding-top: 60px;
    }
    .contact-email {
        font-size: 3vw;
    }
}







