/* ============================================
   Oscar Karlsson Bird Photography
   Minimalist Dark Theme
   ============================================ */

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

:root {
    --bg-primary: #111111;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #222222;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --border: #333333;
    --error: #ff6b6b;
    --success: #4ade80;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   Header / Navigation
   ============================================ */

.header {
    padding: 2.5rem 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ============================================
   Main Content
   ============================================ */

.main {
    flex: 1;
    padding: 2rem 4vw 4rem;
}

.page-title {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* ============================================
   Gallery Grid
   ============================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 12px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 3/2;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--bg-secondary);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

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

.gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-caption {
    opacity: 1;
}

.gallery-empty,
.gallery-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 8rem 2rem;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: var(--text-primary);
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

/* ============================================
   About Page
   ============================================ */

.about-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    max-width: 1000px;
}

.about-image {
    aspect-ratio: 1;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.about-text h2 {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.about-text h3 {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 2rem 0 1rem;
}

.about-text ul {
    list-style: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.about-text li {
    padding: 0.3rem 0;
    padding-left: 1rem;
    position: relative;
}

.about-text li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* ============================================
   Contact Page
   ============================================ */

.contact-content {
    max-width: 480px;
}

.contact-intro {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

/* ============================================
   Forms
   ============================================ */

.form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    background-color: transparent;
    border: 1px solid var(--border);
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-muted);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-group input[type="file"] {
    padding: 0.75rem;
    cursor: pointer;
    border-style: dashed;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    padding: 1rem 2rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
}

/* ============================================
   Messages
   ============================================ */

.error-message {
    color: var(--error);
    font-size: 0.8rem;
}

.success-message {
    border: 1px solid var(--success);
    color: var(--success);
    padding: 1rem;
    font-size: 0.85rem;
}

/* ============================================
   Admin Page
   ============================================ */

.admin-container {
    max-width: 550px;
    background-color: var(--bg-secondary);
    padding: 2.5rem;
    border: 1px solid var(--border);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h2 {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0;
}

/* Multi-upload */
.upload-previews {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.upload-preview-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
}

.upload-preview-item img {
    width: 90px;
    height: 60px;
    object-fit: cover;
}

.upload-preview-item input {
    background-color: transparent;
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-family: inherit;
}

.upload-preview-item input:focus {
    outline: none;
    border-color: var(--text-muted);
}

.upload-preview-item .remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s ease;
}

.upload-preview-item .remove-btn:hover {
    color: var(--error);
}

.upload-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 3rem 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text-secondary);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        max-width: 250px;
    }
}

@media (max-width: 700px) {
    .header {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem 4vw;
    }

    .nav-links {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links a {
        font-size: 0.7rem;
    }

    .main {
        padding: 1.5rem 4vw 3rem;
    }

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

    .admin-container {
        padding: 1.5rem;
    }

    .upload-preview-item {
        grid-template-columns: 70px 1fr;
    }

    .upload-preview-item .remove-btn {
        grid-column: 2;
        justify-self: end;
    }

    .upload-preview-item img {
        width: 70px;
        height: 50px;
    }

    .footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
