/* Reset & Variables */
:root {
    --bg-color: #f9f9f9;
    --surface-color: #ffffff;
    --text-primary: #111111;
    --text-secondary: #636363;
    --border-color: #e5e5e5;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: "Cardo", Georgia, serif;
    --content-width: 780px;
    --wide-width: 1280px;
    --gutter: clamp(1.25rem, 5vw, 4rem);
}

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

body {
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--text-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.skip-link {
    position: absolute;
    left: -9999px;
    padding: 0.75rem 1.25rem;
    background: var(--text-primary);
    color: var(--bg-color);
    z-index: 1000;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* Header & Navigation */
.site-header {
    padding: 20px var(--gutter);
    background-color: var(--bg-color);
}

.header-inner {
    max-width: var(--wide-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-title {
    margin: 0;
    font-size: clamp(0.95rem, 1.2vw, 1.2rem);
    font-weight: 600;
}

.site-title a:hover {
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-list a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Main Content */
.site-main {
    padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 3rem;
}

.page-title {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    line-height: 1.15;
    text-align: center;
    margin: 0 0 clamp(2rem, 4vw, 3rem);
}

/* Homepage Layout */
.home-container {
    max-width: var(--content-width);
    margin: 0 auto;
}

.hero-image {
    width: 100%;
    margin-bottom: 2rem;
}

.portfolio-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Gallery Layout */
.gallery {
    max-width: var(--content-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.gallery-item {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-item img {
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.gallery-item img:hover {
    opacity: 0.92;
}

/* Footer */
.site-footer {
    padding: clamp(3rem, 6vw, 5rem) var(--gutter);
}

.footer-inner {
    max-width: var(--wide-width);
    margin: 0 auto;
}

.footer-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.footer-tagline {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Lightbox Viewer */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 18, 0.94);
    backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 4rem 2rem;
    z-index: 9999;
}

.lightbox.is-open {
    display: flex;
}

.lightbox-figure {
    margin: 0;
    max-width: 1100px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 11rem);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    margin-top: 1.15rem;
    color: #f1f1f1;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    max-width: 720px;
}

.lightbox-counter {
    position: absolute;
    top: 1.25rem;
    left: 1.5rem;
    color: #a4a4a4;
    font-size: 0.85rem;
}

.lightbox-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    top: 1rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
}

.lightbox-prev {
    left: 1.25rem;
}

.lightbox-next {
    right: 1.25rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1.25rem var(--gutter);
        gap: 0.9rem;
        z-index: 100;
    }

    .nav-list.is-open {
        display: flex;
    }

    .lightbox {
        padding: 3.5rem 1rem 4.5rem;
    }

    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 1rem;
        transform: none;
    }
}