/* Global Box Sizing */
html, body {
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box; /* Ensure padding doesn't add to width */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #ffffff;
}

h1, h2, h3 {
    font-weight: 300;
    text-transform: uppercase;
}

/* Sections */
section {
    padding: 100px 20px;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow-x: hidden;
}

/* Hero Section - Centered Stack */
.hero {
    height: auto;
    padding-top: 15vh;
    padding-bottom: 100px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 300;
    letter-spacing: 0.4em;
    line-height: 1;
    color: #222222;
    margin: 0;
    margin-right: -0.4em; /* Offset for trailing letter-spacing to center correctly */
    width: 100%;
}

.hero .year {
    font-size: 12px;
    color: #777777;
    letter-spacing: 0.1em;
    margin: 15px 0 0 0;
}

.hero h2 {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 0.1em;
    color: #444444;
    margin: 60px 0 0 0;
    text-transform: none;
    font-style: italic; /* Added italic based on the delicate look in the image */
}

/* Series Section */
.series {
    display: none; /* In the image, the series name is already in the hero and footer */
}

/* Works Section - Vertical Centered Stack */
.works {
    gap: 120px;
    padding-top: 0;
}

.work-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.work-item img {
    max-width: 100%;
    height: auto;
    max-height: 80vh; /* Ensure it fits landscape screens */
    display: block;
}

.work-info {
    text-align: center;
}

.work-info h3 {
    margin: 0;
    font-size: 14px;
    color: #444444;
    letter-spacing: 0.15em;
    font-weight: 400;
}

.work-info p {
    margin: 8px 0 0;
    font-size: 12px;
    color: #888888;
    letter-spacing: 0.05em;
}

/* About Section */
.about {
    padding-top: 60px;
}

.about h3 {
    font-size: 16px;
    letter-spacing: 0.3em;
    margin-bottom: 30px;
    color: #444444;
}

.about p {
    max-width: 600px;
    font-size: 14px;
    line-height: 1.8;
    color: #555555;
    margin: 10px 0;
}

/* Contact Section */
.contact {
    padding-top: 40px;
    padding-bottom: 60px;
}

.contact a {
    color: #555555;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.05em;
    margin: 10px 0;
    display: block; /* Stack links like in the image */
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.contact a:hover {
    border-bottom: 1px solid #555;
}

/* Footer */
footer {
    padding: 60px 20px;
    text-align: center;
    font-size: 13px;
    color: #666666;
    letter-spacing: 0.05em;
    line-height: 2;
}

/* Lightbox Styling */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
}

.lightbox-content.zoomed {
    cursor: move;
}

.lightbox-content img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-content img.transitioning {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 40px;
    color: #222;
    cursor: pointer;
    font-weight: 200;
    z-index: 2001;
}

.lightbox-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.05);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    color: #888;
    pointer-events: none;
}

/* Make gallery images clickable */
.work-item img {
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}

.work-item img:hover {
    opacity: 0.9;
}

/* Tablet & Mobile Responsiveness */
@media (max-width: 768px) {
    .hero h1 { font-size: 32px; letter-spacing: 0.3em; }
    .hero { padding-top: 10vh; }
    .works { gap: 80px; }
}

/* Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .reload {
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
