/* --- CSS Reset & Variables --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --header-footer-bg: #E6E6FA; /* Soft Light Purple (Lavender) */
    --body-bg: #FFF8E7;          /* Soft Nude/Cream Yellow (Cosmic Latte) */
    --text-color: #1a1a1a;       /* Darker Black for text */
    --accent-color: #9370DB;     /* Medium Purple for accents */
    --bg-white-transparent: rgba(255, 255, 255, 0.7);
    
    /* Dimensions */
    --header-height: 70px;
}

.scroll-top {
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 100;
    opacity: 0.7;
}
 

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: var(--header-height);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header Styles --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--header-footer-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold; /* Bold menu items */
    transition: color 0.3s;
    font-size: 0.95rem;
}

nav a:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* --- Main Content Styles --- */
main {
    flex: 1;
    /* CHANGED: Increased from 800px to 1200px to allow photos to be bigger */
    max-width: 1200px; 
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    font-size: 18px;
}

/* Profile Photo */
.profile-container {
    margin-bottom: 50px;
}

.profile-photo {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    background-color: #ddd;
}

/* --- Sections (About, Project, etc.) --- */
section {
    /* CHANGED: Keep text sections centered and limited to 800px for readability */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 60px;
    scroll-margin-top: 90px;
    text-align: left;
    background: var(--bg-white-transparent);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--accent-color);
    border-bottom: 2px solid var(--header-footer-bg);
    padding-bottom: 10px;
    display: inline-block;
}

p {
    margin-bottom: 15px;
    white-space: pre-wrap;
    font-size: 0.92rem; /* Slightly smaller text */
    color: #1a1a1a;     /* Darker text */
}

/* --- Project Section Styles --- */
.project-title {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--text-color);
    display: inline-block;
    margin-bottom: 5px;
}

.project-image-container {
    margin-top: 20px;
    text-align: center;
}

.feature-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    max-height: 400px;
    object-fit: cover;
}

/* --- Gallery Section Styles (The 3 Photos) --- */
.gallery-section {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
    
    /* CHANGED: Allowed gallery to be wider (1100px) than the text sections */
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-item {
    flex: 1; /* Makes all 3 items equal width */
    text-align: center;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4/3; /* Keeps all photos the same rectangle shape */
    object-fit: cover;
    border-radius: 8px;
    border: 4px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.02);
}

.caption {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #444;
    font-weight: bold;
}

/* --- Feature Lists --- */
.feature-list {
    list-style: none;
    margin-top: 10px;
}

.feature-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 20px;
    line-height: 1.8;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

.feature-list strong {
    color: #444;
    font-size: 1.05rem;
    display: inline-block;
    margin-bottom: 2px;
}

/* --- Educational Background List --- */
.edu-list {
    list-style: none;
}

.edu-list li {
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 4px solid var(--accent-color);
}

.edu-year {
    font-weight: bold;
    color: #444;
    display: block;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

/* Map Links */
.map-link {
    color: #0077cc;
    text-decoration: none;
    border-bottom: 1px dotted #0077cc;
    transition: background 0.2s;
}

.map-link:hover {
    background-color: #eef;
    color: #004499;
}

/* Contact Section */
.contact-info p {
    font-size: 1.05rem;
    margin-bottom: 10px;
}

/* --- Footer Styles --- */
footer {
    background-color: var(--header-footer-bg);
    text-align: center;
    padding: 20px;
    font-weight: bold;
    margin-top: auto;
}

/* --- CSS-ONLY LIGHTBOX --- */

/* The hidden overlay */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

/* Show the lightbox when it is the 'target' of a link */
.lightbox:target {
    display: flex;
}

/* The actual enlarged image */
.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    border: 3px solid white;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}

/* The clickable area outside the image to close it */
.lightbox-close {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: zoom-out;
}

/* The "X" button (optional extra) */
.lightbox-close::after {
    content: "×";
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    font-family: Arial, sans-serif;
}

/* Add a zoom icon cursor to thumbnails */
.profile-photo, .project-media img, .gallery-item img {
    cursor: zoom-in;
}

/* Fix for the Project Card alignment after changing to <section> */
.project-card {
    width: 100%;
    margin-top: 10px;
}
.project-media img {
    margin-top: 0; /* Align perfectly within card */
}

.project-card {
    max-width: 1000px;
    
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
    /* Ensures image stays inside rounded corners */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
 
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
 
.project-media img {
    margin-top: 20px;
    text-align: center;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Crops image nicely to fill the box */
    display: block;
}
 
.project-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
 
.project-media iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.project-content {
    padding: 20px;
    flex-grow: 1;
    /* Pushes buttons to bottom if text is short */
    display: flex;
    flex-direction: column;
}
 
.project-content h3 {
    margin: 0 0 10px 0;
    color: #ff69b4;
    font-size: 1.3rem;
    border-left: none;
    /* Resetting global h3 style if needed */
    padding-left: 0;
}
 
.project-content p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.project-links {
    margin-top: auto;
    /* Pushes to bottom */
    display: flex;
    gap: 10px;
}
 
.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #ff69b4;
    color: white !important;
    /* Force white text */
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s;
}
 
.btn:hover {
    background-color: #ffb6c1;
    text-decoration: none;
}

/* --- Mobile Responsive Adjustments --- */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
        gap: 15px;
    }
    
    body {
        padding-top: 140px;
    }
    
    section {
        scroll-margin-top: 150px;
        padding: 25px;
    }

    /* On mobile, stack the photos vertically */
    .gallery-section {
        flex-direction: column; 
    }
    
    .gallery-item {
        margin-bottom: 20px;
    }
}