/* General Body & Background */
html {
    scroll-padding-top: 90px; /* Added: Offset for sticky header when jumping to anchors */
}

body {
    margin: 0;
    font-family: 'Open Sans', Arial, sans-serif; /* Readable sans-serif for body text */
    line-height: 1.6;
    color: #333; /* Default dark grey for text outside themed blocks */
    background-image: url('images/ii_background.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* New style for not-recorded songs (moved from music.html for global application) */
.not-recorded-song {
    color: #FFFFFF; /* White text for these specific lines */
}

/* Header & Footer Styling */
.site-header, .site-footer {
    background-color: rgba(10, 20, 70, 0.95); /* Deep dark blue for header/footer */
    color: #E0E0E0; /* Light text for contrast */
    padding: 15px 20px;
    width: 100%;
    box-sizing: border-box;
    position: sticky; /* Sticky on desktop */
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.site-header .header-content { /* THIS IS THE FLEX CONTAINER FOR THUMBNAIL, TITLE, NAV */
    display: flex;
    align-items: center; /* Vertically align all items */
    justify-content: space-between; /* Space out thumbnail, title, and nav */
    flex-wrap: nowrap; /* CRITICAL: Prevent wrapping on desktop */
    width: 100%; /* Ensure it takes full width of parent header */
    gap: 20px; /* Space between header elements (thumbnail, title, nav) */
}

/* Thumbnail in Header */
.header-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #00FFFF; /* Cyan border */
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.6); /* Subtle cyan glow */
    object-fit: cover;
    flex-shrink: 0; /* Prevents thumbnail from shrinking */
}

.site-header h1 {
    margin: 0;
    font-size: 2.5em;
    font-family: 'EB Garamond', serif; /* Font: EB Garamond */
    font-weight: 700; /* Bold for impact */
    color: #00FFFF; /* Cyan color for title */
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.7); /* Glowing effect */
    flex-grow: 1; /* Allows title to take available space */
    text-align: left; /* Align title to the left of its growing space */
    white-space: nowrap; /* Prevent title from wrapping on desktop */
    text-transform: none; /* EB Garamond handles casing correctly by default */
}

.site-header nav {
    flex-shrink: 0; /* Prevent nav from shrinking */
}

/* Desktop Navigation (default) */
.site-header nav ul, .site-footer nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: nowrap; /* Ensure nav links stay in one row on desktop */
    justify-content: flex-end;
    gap: 15px; /* Space between individual nav links */
}

.site-header nav li {
    margin: 0; /* Resetting margins from previous specific rules */
}

.site-header nav a, .site-footer nav a {
    color: #ADD8E6; /* Light blue/silver for nav links */
    text-decoration: none;
    font-weight: bold;
    font-family: 'Open Sans', sans-serif; /* Keep nav links readable */
    transition: color 0.3s ease, text-shadow 0.3s ease;
    text-transform: none; /* EB Garamond handles casing correctly by default */
    white-space: nowrap; /* Prevent nav links from wrapping too soon */
}

.site-header nav a:hover, .site-footer nav a:hover {
    color: #00FFFF; /* Cyan on hover */
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8); /* Glow on hover */
}

/* Main Content Area */
.main-content {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
    box-sizing: border-box; /* Ensure padding doesn't cause overflow */
}

/* Content Blocks (for sections like Welcome, Recent Projects, etc.) */
.content-block {
    background-color: rgba(10, 20, 70, 0.6); /* Dark blue with 60% opacity (lighter) */
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5); /* White border with 50% opacity */
    overflow: hidden; /* Ensures content (images) within are clipped if they overflow */
    box-sizing: border-box; /* Ensure padding doesn't cause overflow */
}

/* Text color within content blocks */
.content-block p {
    color: #00FFFF; /* Cyan text */
    margin-bottom: 1.2em;
    font-size: 1.1em;
}

/* Headings within Content Blocks */
.content-block h2 {
    font-size: 2.8em;
    font-family: 'EB Garamond', serif; /* Font: EB Garamond */
    font-weight: 700;
    color: #00FFFF; /* Cyan color for main headings */
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    text-transform: none; /* EB Garamond handles casing correctly by default */
}

.content-block h3 {
    font-size: 1.9em;
    font-family: 'EB Garamond', serif; /* Font: EB Garamond */
    font-weight: 600;
    color: #00FFFF; /* Cyan color for sub-headings */
    margin-top: 30px;
    margin-bottom: 20px;
    text-shadow: 0.5px 0.5px 2px rgba(0, 0, 0, 0.08);
    text-transform: none; /* EB Garamond handles casing correctly by default */
}

/* Responsive Images (General) */
.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 25px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Images specific to music.html albums */
.album-cover {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.tall-album-cover {
    height: 400px;
    width: auto;
    object-fit: contain;
}

/* Images specific to inventions.html */
.invention-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 25px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Images specific to politics.html */
.politics-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 25px auto;
    border-radius: 8px;
    box-shadow: 0 44px 12px rgba(0, 0, 0, 0.15);
}

/* Specific styling for the View Song Lyrics box on music.html */
.lyrics-link-box {
    background-color: rgba(10, 20, 70, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 20px;
    margin: 40px auto;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.lyrics-link-box a {
    font-size: 1.3em;
    font-weight: bold;
    color: #00FFFF;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    display: block;
}
.lyrics-link-box a:hover {
    color: #ADD8E6;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

/* Specific styling for the art gallery grid */
.art-intro {
    text-align: center;
    margin-bottom: 30px;
    color: #00FFFF;
}

.art-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    background-color: rgba(10, 20, 70, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    margin-top: 30px;
}

.gallery-item {
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
}

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

/* Lightbox CSS */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox.active {
    display: flex;
}

.lightbox-content-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 90%;
    padding: 20px;
    background-color: rgba(10, 20, 70, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    box-sizing: border-box;
}

.lightbox-image {
    max-width: 100%;
    max-height: 75vh;
    display: block;
    border-radius: 8px;
    object-fit: contain;
}

.lightbox-caption {
    color: #00FFFF;
    font-family: 'EB Garamond', serif;
    font-size: 1.4em;
    margin-top: 15px;
    text-align: center;
    max-width: 90%;
    word-wrap: break-word;
}

.lightbox-close, .lightbox-nav-btn {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.5);
    color: #00FFFF;
    border: 1px solid #00FFFF;
    padding: 10px 15px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    user-select: none;
    z-index: 2001;
}

.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 2em;
    padding: 5px 12px;
    line-height: 1;
}

.lightbox-nav-btn {
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 15px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close:hover, .lightbox-nav-btn:hover {
    background-color: #00FFFF;
    color: rgba(10, 20, 70, 0.95);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-close:hover {
    transform: scale(1.1);
}

/* Contact form styling */
.contact-form-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background-color: rgba(10, 20, 70, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    color: #00FFFF;
}

.contact-form-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form-container label {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.contact-form-container input[type="text"],
.contact-form-container input[type="email"],
.contact-form-container textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #00FFFF;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-container input[type="text"]:focus,
.contact-form-container input[type="email"]:focus,
.contact-form-container textarea:focus {
    border-color: #00FFFF;
    outline: none;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.contact-form-container textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form-container button[type="submit"] {
    background-color: #00FFFF;
    color: rgba(10, 20, 70, 0.95);
    padding: 15px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}

.contact-form-container button[type="submit"]:hover {
    background-color: #ADD8E6;
    color: rgba(10, 20, 70, 0.95);
    transform: translateY(-2px);
}

.status-message {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    color: #00FFFF;
}
.status-message.success {
    background-color: rgba(0, 255, 0, 0.2);
    border: 1px solid rgba(0, 255, 0, 0.5);
}
.status-message.error {
    background-color: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.5);
}
.contact-intro-text {
    color: #00FFFF;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.1em;
}


/* Footer Content alignment */
.site-footer .footer-content {
    justify-content: center;
}

/* Responsive Adjustments */
@media (min-width: 992px) {
    /* Desktop styles for header remain as they are, no changes needed here */
    .site-header .header-content {
        flex-wrap: nowrap;
    }
}

@media (max-width: 991px) {
    /* Header will now scroll with the page on mobile */
    .site-header {
        position: static !important; /* Forces header to scroll */
        box-shadow: none; /* Remove shadow when scrolling */
        padding: 10px 15px; /* Slightly less padding when static */
    }

    /* General header content stacking for mobile - Logo/Title on top, then Nav */
    .site-header .header-content {
        flex-direction: column; /* Forces main header items (logo/title, nav) to stack */
        text-align: center;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
        position: static; /* No need for relative here if header is static */
    }
    .header-thumbnail {
        margin-right: 0;
        margin-bottom: 5px; /* Add a little space below thumbnail if stacked */
    }
    .site-header h1 {
        text-align: center;
        margin-bottom: 10px; /* Add space below title if stacked */
        white-space: normal;
        width: auto;
        flex-grow: unset;
    }

    /* Mobile Navigation Styling (Reverted to natural stacking) */
    .site-header nav {
        margin-left: 0;
        width: 100%; /* Nav should take full width */
        text-align: center;
        display: block; /* Ensure it's a block element */
        overflow-x: hidden; /* Prevent horizontal scroll unless explicit for sub-menu */
        position: static; /* Ensure nav is in normal flow */
        transform: none; /* Remove any lingering transforms */
        transition: none; /* Remove transitions */
        z-index: auto; /* Reset z-index */
        background-color: transparent; /* Remove overlay background */
        height: auto; /* Remove fixed height */
    }

    .site-header nav ul {
        flex-direction: column; /* Links will stack vertically now, as per your preference */
        padding: 0;
        margin: 0;
        gap: 5px; /* Smaller gap for stacked links */
        text-align: center;
        display: flex; /* Keep display flex to allow for centering */
        flex-wrap: wrap; /* Still allows wrapping if needed, though column is primary */
        justify-content: center;
        align-items: center;
    }

    .site-header nav li {
        margin: 0;
    }

    .site-header nav a {
        font-size: 1.1em; /* Adjust font size for stacked links to be readable */
        white-space: normal; /* Allow link text to wrap if it's too long */
        padding: 8px 15px; /* Give links a good clickable area */
        display: block;
    }
    /* No .active class needed if no hamburger */

    .site-footer .footer-content {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 767px) {
    .main-content {
        margin: 15px auto;
        padding: 0 10px;
    }
    .content-block {
        padding: 20px;
        margin-bottom: 20px;
    }
    .content-block h2 {
        font-size: 2em;
    }
    .content-block h3 {
        font-size: 1.5em;
    }
    .category-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-thumbnail {
        width: 50px;
        height: 50px;
    }
    .site-header h1 {
        font-size: 1.8em;
    }
    .site-header nav a {
        font-size: 1em; /* Slightly smaller for very small screens */
    }
    .content-block {
        padding: 15px;
    }
    .content-block h2 {
        font-size: 1.5em;
    }
    .content-block h3 {
        font-size: 1.2em;
    }
    .social-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* Styling for the header logo link to make image and text side-by-side */
.header-logo-link {
    display: flex; /* Make children (img and h1) align horizontally */
    align-items: center; /* Vertically align image and text */
    text-decoration: none; /* Remove underline from the link */
    color: inherit; /* Inherit color from parent (header), or set explicitly */
    gap: 10px; /* Space between image and text */
}

/* Existing .site-header h1 style might need adjustment */
.site-header h1 {
    /* Existing styles... */
    margin: 0; /* Ensure no extra margin pushes it down */
}