*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: "Gantari", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 1em;
    line-height: 1.5;
}

/* Load-in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    background: white;
    animation: fadeIn 0.6s ease-out;
}

#contentArea {
    padding: 30px 20px;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto;
}

#headerArea {
    width: 100%;
    display: flex;
    margin-bottom: 15px;
    animation: fadeInUp 0.8s ease-out;
}

#headerWrap {
    margin: 0 auto;
}

#header {
    font-size: 2.5em;
    font-weight: 600;
    color: rgb(45, 48, 56);
}

#backLinkArea {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.backLink {
    color: rgb(59, 130, 246);
    text-decoration: none;
    font-size: 1.1em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.backLink::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: rgb(59, 130, 246);
    transition: width 0.3s ease;
}

.backLink:hover {
    color: rgb(37, 99, 235);
}

.backLink:hover::after {
    width: 100%;
}

#mainArea {
    width: 100%;
    flex: 1;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

#footerArea {
    width: 100%;
    margin-top: 60px;
    animation: fadeIn 1s ease-out 0.5s backwards;
}

#footerInnerWrap {
    justify-content: center;
    display: flex;
    padding: 20px 0;
}

#imageGrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    #imageGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    #imageGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gridImgWrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 350px;
    cursor: pointer;
}

.gridImgWrap:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.gridImgWrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gridImgWrap:hover img {
    transform: scale(1.05);
}

.gridImgWrapContent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.5), transparent);
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gridImgWrap:hover .gridImgWrapContent {
    opacity: 1;
}

.gridImgWrap h3 {
    margin: 0 0 4px 0;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    font-size: 1.1em;
    font-weight: 600;
}

.gridImgWrap p {
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    font-size: 0.9em;
}

#creditsFooter {
    display: flex;
    column-gap: 5px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    color: rgb(107, 114, 128);
    font-size: 0.95em;
}

#creditsFooter a {
    color: rgb(59, 130, 246);
    text-decoration: none;
    transition: color 0.3s ease;
}

#creditsFooter a:hover {
    color: rgb(37, 99, 235);
    text-decoration: underline;
}

.licenseIcon {
    width: 1.2em;
    height: 1.2em;
    margin-left: 0.3em;
    vertical-align: middle;
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.50);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    width: 100%;
    height: 90vh;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.4s ease-out;
}

@media (min-width: 768px) {
    .lightbox-content {
        flex-direction: row;
    }
}

.lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 30px;
    overflow: hidden;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-sidebar {
    width: 100%;
    background: white;
    padding: 35px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .lightbox-sidebar {
        width: 420px;
    }
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

.lightbox-close:hover {
    background: white;
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.lightbox-sidebar h2 {
    margin: 0 0 25px 0;
    color: rgb(45, 48, 56);
    font-size: 1.8em;
    font-weight: 600;
}

.metadata-section {
    margin-bottom: 28px;
}

.metadata-section h3 {
    color: rgb(107, 114, 128);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 0 0 16px 0;
    font-weight: 600;
}

.metadata-item {
    background: rgb(249, 250, 251);
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgb(229, 231, 235);
    transition: background 0.2s ease;
}

.metadata-item:hover {
    background: rgb(243, 244, 246);
}

.metadata-item strong {
    display: block;
    color: rgb(107, 114, 128);
    font-size: 0.8em;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.metadata-item span {
    color: rgb(45, 48, 56);
    font-size: 0.95em;
    word-break: break-word;
}

.loading {
    color: rgb(156, 163, 175);
    font-style: italic;
}

@media (max-width: 768px) {
    #contentArea {
        padding: 20px 15px;
    }

    #header {
        font-size: 2em;
    }

    .gridImgWrap {
        height: 280px;
    }

    #imageGrid {
        gap: 20px;
    }
}