/* Add this to your Header and Navigation section in style.css */

nav a.active {
    color: #FFFFFF;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Add this to make the work items work as links without the default blue underline */
.work-item, .work-gallery-item {
    text-decoration: none;
    color: inherit;
    display: block; /* Ensures the anchor tag takes up the full space */
}

/* General Body Styles */
body {
    background-color: #121212; /* Matt black */
    color: #FFFFFF; /* White */
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header and Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid #333;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

nav a:hover {
    color: #888;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60vh;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    letter-spacing: 0.5em; /* Wide letter spacing */
    font-weight: normal;
}

/* Marquee Section */
.marquee {
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    padding: 2rem 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
}

.marquee-content span {
    font-size: 2rem;
    font-weight: bold;
}

@keyframes marquee {
    from {
        transform: translateX(0%);
    }
    to {
        transform: translateX(-50%);
    }
}

/* About and Contact Sections */
.about, .contact {
    padding: 4rem 2rem;
    text-align: center;
}

.about h2, .contact h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about p, .contact p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.cta-button {
    background-color: #FFFFFF;
    color: #121212;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.cta-button:hover {
    background-color: #888;
    color: #FFFFFF;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #333;
    font-size: 0.9rem;
}

/* --------------- ABOUT PAGE --------------- */

.about-hero, .work-hero, .contact-hero {
    padding: 6rem 2rem;
    text-align: center;
}

.about-hero h1, .work-hero h1, .contact-hero h1 {
    font-size: 3rem;
    letter-spacing: 0.5em;
    font-weight: normal;
}

.contact-hero p {
    font-size: 1.2rem;
    color: #aaa;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem;
    align-items: center;
}

.about-image {
    flex: 1 1 40%;
    min-width: 300px;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text {
    flex: 1 1 50%;
    min-width: 300px;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccc;
}

.skills-section {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid #333;
}

.skills-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.skill-item {
    border: 1px solid #FFFFFF;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    font-size: 1rem;
    transition: background-color 0.3s, color 0.3s;
}

.skill-item:hover {
    background-color: #FFFFFF;
    color: #121212;
}


/* --------------- WORK PAGE GRID --------------- */

.work-grid-container {
    display: grid;
    /* This creates a responsive grid */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    padding: 2rem;
    gap: 1.5rem;
}

.grid-item {
    position: relative;
    border: none;
    padding: 0;
    cursor: pointer;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.grid-item:hover img {
    transform: scale(1.1);
}

.grid-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.grid-item:hover .grid-item-overlay {
    opacity: 1;
}

.grid-item-overlay h3 {
    margin: 0;
    font-size: 1.5rem;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.grid-item:hover .grid-item-overlay h3 {
    transform: translateY(0);
}

/* --------------- CONTACT PAGE --------------- */

.contact-form-section {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-form-section form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form-section input,
.contact-form-section textarea {
    background-color: transparent;
    border: 1px solid #444;
    color: #FFFFFF;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 5px;
    font-family: inherit;
}

.contact-form-section input:focus,
.contact-form-section textarea:focus {
    outline: none;
    border-color: #FFFFFF;
}

.contact-form-section .cta-button {
    width: auto;
    align-self: flex-start;
    cursor: pointer;
}

/* ================================================= */
/* === MODIFIED AND NEW STYLES FOR FLYOUT PANEL ==== */
/* ================================================= */

.modal-container {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.6);
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.4s, opacity 0.4s;
}

.modal-container.modal-open {
    visibility: visible;
    opacity: 1;
}

.flyout-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 90%;
    max-width: 1400px;
    height: 100%;
    background-color: #121212;
    border-left: 1px solid #333;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-container.modal-open .flyout-panel {
    transform: translateX(0);
}

.flyout-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: flex-end;
}

.modal-close-btn {
    font-size: 2.5rem;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}
.modal-close-btn:hover {
    color: #FFFFFF;
}

/* --- Improved Spacing Here --- */
.flyout-body {
    display: grid;
    grid-template-columns: 1fr 250px; /* Main content | Metadata sidebar */
    gap: 4rem; /* More space between main content and sidebar */
    padding: 1rem 4rem 4rem 4rem; /* More horizontal and bottom padding */
}

.flyout-main-content h2 {
    font-size: 2.5rem;
    margin-top: 0; /* Remove default top margin */
    margin-bottom: 2rem; /* Add space below the title */
}

/* --- New styles for the GIF/Description Wrapper --- */
.project-description-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 2rem; /* Space between GIF and text */
    margin-bottom: 3rem; /* Space below the description block */
}

.project-description-wrapper .project-gif {
    flex: 1; /* Assign flex ratio */
    min-width: 300px; /* Prevent it from shrinking too much */
}

.project-description-wrapper .project-gif img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.project-description-wrapper p {
    flex: 2; /* Assign flex ratio */
    margin: 0; /* Reset margin for alignment */
    font-size: 1.1rem;
    line-height: 1.7;
    color: #ccc;
    max-width: 700px;
}

#modal-image-gallery img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1.5rem; /* Space between gallery images */
    border-radius: 4px;
}

/* --- Improved Sidebar Spacing --- */
.flyout-metadata {
    border-left: 1px solid #333;
    padding-left: 3rem; /* More space for sidebar content */
    padding-top: 0.5rem; /* Align top with main content */
}

.flyout-metadata dl {
    margin: 0;
}

.flyout-metadata dl div {
    margin-bottom: 2rem; /* Space between metadata items */
}

.flyout-metadata dt {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-bottom: 0.5rem;
}

.flyout-metadata dd {
    font-size: 1.1rem;
    margin-left: 0;
}

.flyout-metadata dd a {
    color: #FFFFFF;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.3s;
}
.flyout-metadata dd a:hover {
    color: #888;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .flyout-body {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
        padding: 1rem 2rem 4rem 2rem;
    }

    .flyout-metadata {
        border-left: none; /* Remove side border when stacked */
        padding-left: 0;
        margin-top: 3rem;
        border-top: 1px solid #333; /* Add top border as a separator */
        padding-top: 3rem;
    }
}

@media (max-width: 768px) {
    .project-description-wrapper {
        flex-direction: column; /* Stack GIF on top of description on mobile */
    }
}