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

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    background: #fff;
    color: #000;
    overflow-x: hidden;
}

.portfolio-section {
    min-height: 100vh;
    padding: 6rem 18rem;
    padding-bottom: 2rem;
    background: #fff;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(0,0,0,0.2);
    padding-bottom: 0.5rem;
    color: #000;
}

.home-link {
    color: #000;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    display: inline-block;
    padding: 0.5rem;
}

.home-link:hover {
    text-decoration: underline;
}

.chapter-nav {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 1.5rem;
}

.chapter-link {
    color: #000;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35rem 0.8rem;
    position: relative;
    overflow: hidden;
    background: transparent;
    isolation: isolate;
    transition: color 0.25s ease;
}

.chapter-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #e8e8e8;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
    z-index: -1;
}

.chapter-link:hover::before {
    transform: scaleX(1);
}

.chapter-link:hover {
    color: #000;
}

.chapter-nav-sep {
    font-size: 0.7rem;
    opacity: 0.25;
    user-select: none;
}

.subsection-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 3rem;
    margin-top: 5rem;
    opacity: 0.9;
    border-left: 4px solid rgba(0,0,0,0.4);
    padding-left: 1.5rem;
    color: #000;
    scroll-margin-top: 2rem;
}

.subsection-title:first-of-type {
    margin-top: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

.gallery-grid-single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    aspect-ratio: 1;
}

.gallery-item:hover {
    transform: translateY(-10px);
    border-color: rgba(0,0,0,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    transition: left 0.5s ease;
    z-index: 2;
}

.gallery-item:hover::before {
    left: 100%;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.gallery-item:hover .gallery-image {
    filter: grayscale(0%);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

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

.gallery-item-static {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    aspect-ratio: 1;
}

.gallery-item-static:hover {
    transform: translateY(-10px);
    border-color: rgba(0,0,0,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.gallery-item-static::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    transition: left 0.5s ease;
    z-index: 2;
}

.gallery-item-static:hover::before {
    left: 100%;
}

.gallery-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: #000;
}

.gallery-description {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.7;
    letter-spacing: 0.02em;
    color: #000;
}

.placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 900;
    color: rgba(0,0,0,0.2);
}

.footer {
    padding-top: 2rem;
    padding-bottom: 2rem;
    padding-left: 6rem;
    position: sticky;
}

.footer a:link,
.footer a:visited,
.footer a:active {
    color: #000;
    text-decoration: none;
}

@media (max-width: 1024px) {
    .portfolio-section {
        padding: 3rem 6rem;
        padding-bottom: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .chapter-nav {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .portfolio-section {
        padding: 2rem;
    }

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

    .subsection-title {
        font-size: 1.5rem;
        margin-top: 3rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid-single {
        grid-template-columns: 1fr;
    }

    .chapter-nav {
        flex-direction: column;
        gap: 0.25rem;
    }

    .chapter-nav-sep {
        display: none;
    }

    .chapter-link {
        font-size: 0.75rem;
    }

    .footer {
        padding-left: 2rem;
    }
}
