/* ================= GLOBAL ================= */
html, body {
    height: 100%;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================= PAGE STRUCTURE ================= */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ================= NAV ================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 60px;
    background: white;
    border-bottom: 1px solid #ddd;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a.active,
body.home nav ul li:first-child a {
    font-weight: 700; /* bold Home on homepage, bold current page elsewhere */
}

.logo {
    font-weight: bold;
    font-size: 18px;
}

/* ================= HERO ================= */
.top-section {
    position: relative;
    color: white;
    min-height: 75vh;
    display: flex;
    align-items: center;
}

.top-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)),
        url('/assets/cps_wallpaper.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.top-container {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 40px 20px;
}

.profile-pic {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
}

.about-section {
    max-width: 600px;
}

.about-section h2 {
    margin-bottom: 15px;
}

.about-section p {
    line-height: 1.8;
    margin-bottom: 1.4em;
}

.highlight {
    font-weight: 700;
    color: white;
}

/* ================= NORMAL SECTIONS ================= */
.section-light {
    background-color: #4F73B5;
    color: white;
    padding: 70px 20px;
}

.container {
    max-width: 1000px;
    margin: auto;
    width: 100%;
}

/* ================= ICONS ================= */
.icons-section {
    background-color: #4F73B5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 70px;
    padding: 70px 20px;
    flex-wrap: wrap;
    text-align: center;
}

.icon-item {
    width: 160px;
    color: white;
    font-weight: 700;
    text-align: center;
}

.icon-item img {
    width: 90px;
    margin: 0 auto 15px auto;
    border-radius: 50%;
    border: 2px solid white;
    padding: 18px;
}

/* ================= CONTACT ================= */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: none;
}

.send-button {
    background-color: #4f46e5;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
}

.form-message {
    color: #ffcccc;
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.contact-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.contact-right a {
    color: white;
    font-style: italic;
    font-weight: 600;
}

.contact-right p {
    margin: 0 0 1.2em 0;
}

/* ================= PORTFOLIO ================= */
.main-portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 2rem;
}

.project-item img {
    width: 100%;
    border-radius: 8px;
}

.project-item h3 a,
.project-item p a,
.additional-projects a {
    color: white !important;
}

.additional-projects {
    list-style: none;
    padding: 0;
}

/* Fix hover for additional projects */
.additional-projects li a.highlight {
    text-decoration: none;
    color: white !important;
    transition: transform 0.2s ease, text-decoration 0.2s ease;
    display: inline-block;
}

.additional-projects li a.highlight:hover {
    transform: translateX(3px);
    text-decoration: underline !important;
}

/* ================= FOOTER ================= */
footer {
    background-color: #2c4a80;
    color: white;
    text-align: center;
    padding: 25px 20px;
    margin-top: auto;
}

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.social-icons img {
    width: 24px;
    height: 24px;
}

/* ================= MOBILE / RESPONSIVE ================= */
@media (max-width: 900px) {
    .top-container {
        flex-direction: column;
        text-align: center;
    }

    .profile-pic {
        width: 160px;
        height: 160px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        gap: 40px;
    }

    .about-section {
        max-width: 90%;
        margin: auto;
    }

    .about-section p {
        line-height: 2;
        margin-bottom: 1.6em;
    }
}

@media (max-width: 600px) {
    nav {
        flex-direction: column;
        padding: 15px;
    }

    nav ul {
        margin-top: 10px;
    }

    .icon-item {
        width: 45%;
    }

    .social-icons img {
        width: 20px;
        height: 20px;
    }

    .top-section {
        min-height: 60vh;
        padding: 20px 15px;
    }

    .section-light {
        padding: 50px 15px;
    }

    .icons-section {
        padding: 50px 15px;
        gap: 40px;
    }

    .main-portfolio {
        gap: 20px;
    }
}

/* ================= CONTACT PAGE FIXES ================= */
body.contact main {
    min-height: calc(100vh - 70px - 50px); /* viewport height minus nav & footer approx */
    display: flex;
    flex-direction: column;
}

body.contact .section-light {
    flex: 1;
    display: grid;
    place-items: start center; /* aligns contact content top-center */
    padding-top: 50px;
    padding-bottom: 50px;
}

body.contact .contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

body.contact .contact-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
}

@media (max-width: 900px) {
    body.contact .contact-container {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 40px;
    }
    body.contact .contact-right {
        text-align: center;
    }
}

@media (max-width: 600px) {
    body.contact .section-light {
        padding-top: 30px;
        padding-bottom: 30px;
    }
}

.field-item {
    margin-bottom: 30px; /* space between fields */
}

.field-item h3 {
    margin-bottom: 4px;
}

.field-item .read-more,
.field-item .toggle-projects {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 6px;
    color: white;
}

.field-item .toggle-projects {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid white;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
}

.field-item .project-list {
    list-style: disc;
    margin-left: 20px;
    margin-top: 6px;
    overflow: hidden;  /* prevents collapsing issues */
}

.field-item .project-list li a {
    font-size: 0.9rem;
    font-weight: 400;
    color: white;
}

/* Highlight links in lists for Field and Expertise / Research and Skillsets */
.about-section ul li a.highlight {
    text-decoration: none;
    color: #ffffff; /* Keep it white */
    transition: transform 0.2s ease, text-decoration 0.2s ease;
    display: inline-block;
}

/* Hover effect */
.about-section ul li a.highlight:hover {
    transform: translateX(3px); /* Slight right movement */
    text-decoration: underline; /* Subtle hover underline */
}

/* Click-to-zoom image style */
.zoomable-image {
    cursor: pointer;
    transition: transform 0.3s ease, max-width 0.3s ease;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

.zoomed {
    position: fixed;
    top: 0;
    left: 0;
    max-width: 100%;
    width: 100%;
    height: auto;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.8); /* optional dark overlay effect */
    cursor: zoom-out;
    padding: 20px;
    box-sizing: border-box;
}
/* Field sections */
/*.field-section {*/
/*    margin-bottom: 40px;*/
/*    text-align: left;*/
/*}*/

/* Read more link */
/*.field-section .read-more {*/
/*    display: inline-block;*/
/*    font-size: 0.9rem;*/
    font-weight: 400; /* normal */
/*    margin-top: 4px;*/
/*    margin-bottom: 6px;*/
/*    color: white;*/
/*}*/

/* Sample works button */
/*.field-section .toggle-projects {*/
/*    font-size: 0.9rem;*/
    font-weight: 400; /* normal */
/*    padding: 4px 8px;*/
/*    margin-bottom: 8px;*/
/*    background-color: rgba(255,255,255,0.1);*/
/*    border: 1px solid white;*/
/*    border-radius: 4px;*/
/*    cursor: pointer;*/
/*    color: white;*/
/*}*/

/* Project list */
/*.field-section .project-list {*/
/*    list-style: disc;*/
/*    margin-left: 20px;*/
/*    margin-top: 4px;*/
/*}*/

/*.field-section .project-list li a {*/
/*    font-size: 0.9rem;*/
/*    font-weight: 400;*/
/*    color: white;*/
/*}*/