/* --- Global Resets & Base Styles --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: 'Inter', sans-serif; /* Clean sans-serif for body */
    line-height: 1.7;
    color: #333; /* Dark gray for text */
    background-color: #FAF9F6; /* Off-white, very light beige */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px; /* Adjust as needed */
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    text-decoration: none;
    color: #8B4513; /* SaddleBrown - a sophisticated accent, reminiscent of leather */
    transition: color 0.3s ease;
}

a:hover {
    color: #A0522D; /* Sienna - slightly lighter on hover */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif; /* Elegant serif for headings */
    font-weight: 700;
    line-height: 1.3;
    color: #2c2c2c; /* Slightly softer black */
}

h1 { font-size: 2.8rem; margin-bottom: 1rem;}
h2 { font-size: 2.2rem; margin-bottom: 1rem;}
h3 { font-size: 1.6rem; margin-bottom: 0.75rem;}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 400; /* Lighter weight for section titles for subtlety */
    letter-spacing: 1px;
    text-transform: uppercase; /* Or keep as is for more classic feel */
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after { /* Subtle underline accent */
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: #8B4513; /* Accent color */
}

.content-section {
    padding: 4rem 0;
}

/* --- Header & Navigation --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid #eee; /* Subtle separator */
    margin-bottom: 2rem;
}

header .logo h1 a {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #2c2c2c;
    text-transform: uppercase;
}

header .logo img {
    max-height: 40px; /* Adjust if using an image logo */
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 2rem;
}

header nav ul li a {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #555;
    position: relative;
    padding-bottom: 0.3rem;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #8B4513;
    transition: width 0.3s ease-in-out;
}

header nav ul li a:hover::after,
header nav ul li a.active::after { /* For active page, if you implement multi-page */
    width: 100%;
}


/* --- Hero Section --- */
#hero {
    min-height: 70vh; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #FAF9F6; /* Very light grey, or use a subtle image */
    /* background-image: url('../assets/images/hero_background.jpg'); // Example */
    background-size: cover;
    background-position: center;
    padding: 3rem 1rem;
    margin-bottom: 3rem;
    border-radius: 8px; /* Soft rounded corners */
}

#hero .hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #2c2c2c;
    font-weight: 700; /* Bolder for hero heading */
}

#hero .hero-content p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: #8B4513;
    color: #fff;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: #A0522D;
    transform: translateY(-2px);
    color: #fff;
}

/* --- About Section --- */
#about .about-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start; /* Align items to the top */
}

#about .about-text {
    flex: 2; /* Text takes more space */
    text-align: center;
}

#about .about-text p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

/* Optional: About image styling
#about .about-image {
    flex: 1;
    max-width: 300px;
}
#about .about-image img {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
*/

/* --- Projects Section --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 2.5rem;
}

.project-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.project-card img {
    width: 100%;
    height: 320px; /* Fixed height for thumbnails */
    object-fit: cover; /* Crop images nicely */
}

.project-card-content {
    padding: 1.5rem;
}

.project-card-content h3 {
    font-size: 1.4rem;
    color: #333;
}

.project-card-content .project-category {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.3rem;
    font-family: 'Inter', sans-serif;
}

/* --- Contact Section --- */
#contact {
    text-align: center;
}

#contact p {
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2rem;
}

.contact-methods a {
    font-size: 2.5rem; /* Larger icons */
    color: #333;
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-methods a:hover {
    color: #8B4513; /* Accent color on hover */
    transform: scale(1.1);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #777;
}

/* --- Modal Styling (for Project Details) --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* Dimmed background */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.active {
    display: flex; /* Use flex to center content */
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 30px 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px; /* Max width of modal */
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease-in-out;
}

.modal.active .modal-content {
    transform: scale(1);
}

.close-button {
    color: #aaa;
    float: right; /* Old school, but effective for simple close */
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.2s ease;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

#modalBody {
    margin-top: 20px;
}

#modalBody img.modal-hero-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

#modalBody h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem; /* Tighter spacing */
    color: #2c2c2c;
}

#modalBody h3 { /* For sub-headings like "Key Features" */
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: #444;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3rem;
}

#modalBody p, #modalBody li {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 0.8rem;
}

#modalBody ul {
    list-style-position: inside;
    padding-left: 0; /* Reset default padding if needed */
}

#modalBody ul li {
    margin-bottom: 0.3rem;
}

#modalBody .tech-stack span,
#modalBody .project-links a {
    display: inline-block;
    background-color: #f0f0f0;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    color: #555;
}

#modalBody .project-links a {
    background-color: #8B4513;
    color: #fff;
}
#modalBody .project-links a:hover {
    background-color: #A0522D;
    color: #fff;
}

.tech-stack span,
.project-card-content .project-category {
    display: inline-block;
    background-color: #f0f0f0; /* Light gray background */
    color: #555; /* Darker text for contrast */
    padding: 0.3em 0.8em;
    margin: 0.2em;
    border-radius: 15px; /* More rounded for a softer, pill-like shape */
    font-size: 0.85em;
    font-weight: 400;
    letter-spacing: 0.5px;
    border: 1px solid #e0e0e0; /* Subtle border */
}

/* --- Project Detail Page Specific Styles --- */
.project-detail-page .subsection-title {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #3a3a3a;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 0.4rem;
}

.project-detail-page .project-hero-image-detail {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 8px;
}

.project-detail-page .patent-status {
    font-style: italic;
    font-size: 1.1rem;
    color: #666;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.project-description-full,
.project-features-full,
.project-technologies-full,
.project-gallery,
.project-report-full {
    margin-bottom: 3rem; /* Added spacing between sections */
}

.project-description-full p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.project-features-full ul {
    list-style: none; /* Assuming you might want custom styled list items */
    padding-left: 0;
}

.project-features-full ul li {
    margin-bottom: 0.7rem;
    padding-left: 1.5em; /* Space for a custom bullet or icon */
    position: relative;
}

.project-features-full ul li::before {
    content: "\2713"; /* Checkmark character, or use an icon font/SVG */
    color: #8B4513; /* Accent color for the bullet */
    position: absolute;
    left: 0;
    font-weight: bold;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive columns */
    gap: 1rem;
    align-items: stretch; /* Make items stretch to fill grid cell if needed */
}

.gallery-image {
    width: 100%;
    height: 100%; /* Make image fill the grid item */
    object-fit: cover; /* Cover the area, cropping if necessary */
    border-radius: 4px; /* Optional: rounded corners for images */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Optional: subtle shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* --- Experience Section --- */
#experience .experience-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem; /* Spacing between experience items */
}

.experience-item {
    background-color: #fff; /* Card-like background */
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07); /* Subtle shadow consistent with project cards */
    border-left: 5px solid #8B4513; /* Accent border */
}

.experience-header {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.company-logo {
    width: 60px; /* Adjust size as needed */
    height: 60px;
    object-fit: contain; /* Ensure logo is not distorted */
    border-radius: 4px; /* Slightly rounded corners for the logo image */
    border: 1px solid #eee;
}

.experience-title-company {
    flex-grow: 1;
}

.experience-item .job-title {
    font-size: 1.5rem; /* Larger for job title */
    color: #2c2c2c;
    margin-bottom: 0.25rem;
}

.experience-item .company-name {
    font-size: 1.1rem;
    color: #555;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.experience-item .job-dates {
    font-size: 0.9rem;
    color: #777;
    font-family: 'Inter', sans-serif;
    white-space: nowrap; /* Prevent dates from wrapping */
}

.job-description {
    list-style: none; /* Remove default bullets */
    padding-left: 0; /* Remove default padding */
    margin-top: 1rem;
}

.job-description li {
    position: relative;
    padding-left: 25px; /* Space for the bullet */
    margin-bottom: 0.5rem;
}

.job-description li::before {
    content: '›'; /* Using a chevron for a cleaner look */
    position: absolute;
    left: 0;
    top: -2px;
    font-weight: bold;
    color: #8B4513; /* Accent color */
    font-size: 1.2rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }
    #hero .hero-content h2 {
        font-size: 2.5rem;
    }
    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    .modal-content {
        padding: 25px 30px;
    }
}

@media (max-width: 768px) {
    html { font-size: 15px; }

    header {
        flex-direction: column;
        text-align: center;
    }
    header .logo { margin-bottom: 1rem;}
    header nav ul {
        justify-content: center;
        padding-left: 0; /* Reset padding */
    }
    header nav ul li { margin: 0 0.8rem; }

    #hero { min-height: 50vh; }
    #hero .hero-content h2 { font-size: 2rem; }
    #hero .hero-content p { font-size: 1rem; }

    .section-title { font-size: 1.6rem; margin-bottom: 2rem;}

    #about .about-content {
        flex-direction: column;
    }
    /* #about .about-image { max-width: 250px; margin: 1rem auto;} */

    .modal-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh; /* Ensure modal is scrollable on small screens */
        overflow-y: auto;
    }
    #modalBody h2 {font-size: 1.7rem;}
}

@media (max-width: 480px) {
    header nav ul li { margin: 0 0.5rem; }
    header nav ul li a { font-size: 0.85rem; }
    .project-card img { height: 180px; }

    .experience-item .job-dates {
        font-size: 0.8rem; /* Smaller font size for dates on mobile */
        white-space: normal; /* Allow dates to wrap */
        text-align: left; /* Align to left if it was centered */
        margin-top: 5px; /* Add some space if it wraps under title/company */
        width: 100%; /* Ensure it takes full width available in its container */
    }

    .experience-header {
        flex-direction: column; /* Stack header items vertically */
        align-items: flex-start; /* Align items to the start */
    }

    .experience-title-company {
        margin-bottom: 5px; /* Space between title/company and dates */
    }
}

/* Styling for the 'View Full Project Details' link in the modal */
#modalBody .full-project-link-container {
    margin-top: 1rem; /* Add space above the link/button */
    text-align: left; /* Center the button if it's inline-block */
}

#modalBody .view-full-project {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background-color: #8B4513; /* Accent color */
    color: #fff !important; /* Important to override general link color if needed */
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#modalBody .view-full-project:hover {
    background-color: #A0522D; /* Slightly lighter accent on hover */
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- General Button Styles (like Resume Button) --- */
.button-link {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background-color: #8B4513; /* Accent color */
    color: #fff !important; /* Important to override general link color */
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: none; /* Ensure no default border */
    cursor: pointer;
}

.button-link:hover {
    background-color: #A0522D; /* Slightly lighter accent on hover */
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- Resume Button Specific Styles --- */

/* --- Resume Link --- */
#resume-link-section {
    padding: 2rem 0; /* Adjust padding as needed */
    
}

#modalBody .patent-status {
    font-style: italic;
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}
