/* General Body Styles */
body { 
    font-family: 'Cormorant Garamond', serif; /* UPDATED FONT */
    margin: 0; 
    color: #333; 
    background-color: #f9f9f9; 
    font-size: 20px; /* Slightly increased for readability */
    line-height: 1.7; 
}
html { scroll-behavior: smooth; }

/* Header and Navigation */
.site-header { background-color: #ffffff; border-bottom: 1px solid #e0e0e0; position: sticky; top: 0; width: 100%; z-index: 1000; }
.header-container { display: flex; justify-content: space-between; align-items: center; padding: 20px 40px; max-width: 1800px; margin: 0 auto; }
.site-title a { 
    font-family: 'Cormorant Garamond', serif; /* UPDATED FONT */
    font-weight: 700; 
    font-size: 28px; /* Adjusted size */
    text-decoration: none; 
    color: #000; 
}
.main-nav ul { margin: 0; padding: 0; list-style: none; display: flex; }
.main-nav li { margin: 0 15px; }
.main-nav a { text-decoration: none; color: #555; font-weight: 400; transition: color 0.3s; padding: 5px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: #000; }
.main-nav a.active { color: #000; font-weight: 700; border-bottom-color: #333; }
.social-links a { margin-left: 15px; color: #333; }
.social-links a:hover { color: #888; }

/* Main Content */
main { min-height: 70vh; }
section { padding: 80px 40px; border-bottom: 1px solid #e0e0e0; }
section:last-child { border-bottom: none; }
.content-wrapper { max-width: 900px; margin: 0 auto; }
section h1, section h2 { 
    font-family: 'Cormorant Garamond', serif; /* UPDATED FONT */
    font-weight: 700; 
    font-size: 44px; /* Adjusted size */
    margin-bottom: 30px; 
    text-align: center;
}
section p, section ul { text-align: left; margin-bottom: 20px; }
section ul { list-style-position: outside; padding-left: 20px; }
section ul li { margin-bottom: 12px; }
.subsection { margin-top: 40px; }
.subsection h3 { 
    font-family: 'Cormorant Garamond', serif; /* UPDATED FONT */
    font-size: 30px; /* Adjusted size */
    font-weight: 700;
    margin-bottom: 15px; 
    border-bottom: 1px solid #ccc; 
    padding-bottom: 10px; 
}
.hero-section { background: #e9e9e9; text-align: center; min-height: 50vh; display: flex; align-items: center; justify-content: center; }
.hero-section h1 { font-size: 54px; /* Adjusted size */ }

/* Footer */
footer { background-color: #333; color: #fff; padding: 40px; text-align: center; }

/* Mobile Responsive Styles */
.mobile-menu-toggle { display: none; cursor: pointer; }
.burger-icon span { display: block; width: 25px; height: 2px; background-color: #333; margin: 5px 0; transition: all 0.3s ease-in-out; }

@media (max-width: 1024px) {
    .main-nav { display: none; position: absolute; top: 85px; left: 0; width: 100%; background-color: #fff; border-top: 1px solid #e0e0e0; padding: 20px 0; }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; align-items: center; }
    .main-nav li { margin: 10px 0; }
    .mobile-menu-toggle { display: block; }
    .mobile-menu-toggle.active .burger-icon span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .mobile-menu-toggle.active .burger-icon span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.active .burger-icon span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}
/* --- New Hero Title Styles --- */
.hero-title-container {
    text-align: center;
}

.main-title {
    font-size: 52px; /* Large size for the name */
    line-height: 1.2;
    margin-bottom: 10px;
}

.qualifications {
    display: block; /* Puts qualifications on a new line */
    font-size: 22px; /* Smaller font size */
    font-weight: 400; /* Lighter font weight */
    color: #555; /* Slightly muted color */
}

.subtitle {
    font-size: 24px;
    font-weight: 400;
    color: #333;
    letter-spacing: 2px; /* Adds space between letters */
    text-align: center;
    margin-top: 20px;
}
/* --- End of New Styles --- */

/* --- New Hero Background Image Styles (Homepage Only) --- */

/* By using #home, this rule now ONLY applies to the hero section on index.html */
#home.hero-section {
    /* The background is a layer of semi-transparent black on top of your image */
    background: 
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
        url('assets/hero-background.jpg');
    
    background-size: cover;             /* Ensures the image covers the entire section */
    background-position: center center; /* Centers the image */
    background-attachment: fixed;       /* Creates a nice parallax effect on scroll */
    
    color: #ffffff; /* Sets the default text color in this section to white */
}

/* We also make these rules specific to the #home section */
#home .main-title,
#home .subtitle {
    color: #ffffff;
}

#home .qualifications {
    color: #dddddd; /* Makes the qualifications a slightly dimmer white */
}

/* --- End of New Styles --- */

/* --- Styles for About Page Layout --- */

.about-container {
    display: flex;
    flex-wrap: wrap; /* Allows sidebar to stack on top on mobile */
    gap: 3rem; /* Increased gap for better separation */
    align-items: flex-start;
}

.about-sidebar {
    flex: 0 0 240px; /* Sidebar with a fixed width */
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 5px; /* Optional: adds slightly rounded corners */
    margin-bottom: 2rem;
}

.qualifications-list h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #333; /* Slightly softer color for the subheading */
}

.qualifications-list ul {
    list-style: none;
    padding-left: 0;
    font-size: 0.95rem; /* Slightly smaller font for the list */
}

.qualifications-list li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.about-text {
    flex: 1; /* Allows text to take up all remaining space */
}

.about-text p:first-child {
    margin-top: 0;
}

.signature-container {
    margin-top: 2rem;
    text-align: right; /* Aligns the signature to the right */
}

.signature-container img {
    max-width: 450px; /* Adjust size as needed */
    height: auto;
}

/* Responsive adjustment for smaller screens */
@media (max-width: 900px) {
    .about-sidebar {
        flex-basis: 100%; /* Sidebar takes full width */
        display: flex;
        gap: 2rem;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .about-sidebar {
       display: block; /* Stack image and qualifications vertically */
    }

    .about-image {
        text-align: center; /* Center the image */
    }

    .about-image img {
        max-width: 200px; /* Control image size on mobile */
    }
}

/* --- Corrected Full-Screen Mobile Menu --- */

/* Apply these styles only on screens 992px wide or smaller */
@media (max-width: 992px) {

    /* 1. Hide the desktop social links and prepare the header */
    .social-links {
        display: none;
    }
    .site-header {
        position: relative;
        z-index: 1001;
    }

    /* 2. Style the menu overlay itself */
    .main-nav {
        display: none; 
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #ffffff;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    /* 3. When the menu is active, make it visible */
    .main-nav.active {
        opacity: 1;
        visibility: visible;
    }

    /* 4. Style the list and list items */
    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav li {
        width: 100%;
        text-align: center; /* <<< FIX #1: Center the text */
    }

    /* 5. Style the links to be large and easily tappable */
    .main-nav a {
        display: block;
        width: 100%;
        padding: 1.2rem 1rem;     /* <<< FIX #2: Increased padding for a larger tap area */
        font-size: 3.8rem;       /* <<< FIX #3: Significantly larger font size */
        font-weight: 600;        /* Bolder for better readability */
        color: #1c1c1c;
        border-bottom: 1px solid #f0f0f0;
    }

    .main-nav li:last-child a {
        border-bottom: none;
    }
    
    /* 6. Ensure the burger icon is visible */
    .mobile-menu-toggle {
        display: block;
    }

    /* 7. Animate burger to 'X' when active */
    .mobile-menu-toggle.active .burger-icon span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .mobile-menu-toggle.active .burger-icon span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active .burger-icon span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* 8. Prevent the page from scrolling when the menu is open */
    body.nav-open {
        overflow: hidden;
    }
}
