@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Instrument+Serif:ital@0;1&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #2D1717;
    color: #F2EADD;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2D1717;
    z-index: 1000;
}

.logo a {
    display: block;
    line-height: 0;
}

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-left: auto;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: #F2EADD;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    opacity: 0.7;
}

/* Main Container */
.container-md {
    max-width: 1400px;
    margin: 0 auto;
    padding: 150px 5% 100px;
}

/* Project Section */
.project-section {
    width: 100%;
    margin-bottom: 60px;
    transition: all 0.3s ease;
}

/* Project Header Button */
.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    padding: 20px 0;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: transform 0.3s ease;
}

.project-header:hover {
    transform: translateX(10px);
}

.project-header:focus {
    outline: 2px solid rgba(242, 234, 221, 0.3);
    outline-offset: 8px;
}

/* Project Title - Instrument Serif */
.project-title {
    font-family: 'Instrument Serif', serif;
    font-size: 3rem;
    font-weight: 400;
    color: #F2EADD;
    margin: 0;
    transition: all 0.3s ease;
}

.project-header:hover .project-title {
    opacity: 0.8;
}

/* Image Gallery */
.image-gallery {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s ease;
    margin-top: 20px;
}

/* Show gallery on hover or focus */
.project-section:hover .image-gallery,
.project-section:focus-within .image-gallery {
    max-height: 700px;
    opacity: 1;
}

/* Image Track */
.image-track {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Scrollbar Styling */
.image-track::-webkit-scrollbar {
    height: 8px;
}

.image-track::-webkit-scrollbar-track {
    background: rgba(242, 234, 221, 0.1);
    border-radius: 4px;
}

.image-track::-webkit-scrollbar-thumb {
    background: rgba(242, 234, 221, 0.3);
    border-radius: 4px;
}

.image-track::-webkit-scrollbar-thumb:hover {
    background: rgba(242, 234, 221, 0.5);
}

/* Gallery Links */
.gallery-link {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 220px;
    height: 640px;
    border-radius: 8px;
    overflow: hidden;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
    will-change: transform;
}

.gallery-link:hover {
    transform: scale(1.03);
}

/* Base Image */
.gallery-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

/* Horizontal Rule */
hr {
    border: none;
    border-top: 1px solid rgba(242, 234, 221, 0.2);
    margin: 40px 0;
}

/* Footer */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
}

.col-sm-3,
.col-3,
.col-4,
.col-1 {
    padding: 10px;
}

.name img {
    max-width: 200px;
    height: auto;
}

footer p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #F2EADD;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-md {
        padding: 100px 5% 60px;
    }

    .project-title {
        font-size: 2rem;
    }

    .gallery-link {
        width: 160px;
        height: 480px;
    }

    .image-gallery {
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .project-title {
        font-size: 1.5rem;
    }

    .gallery-link {
        width: 140px;
        height: 420px;
    }
}
