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

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fafafa;
}

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

a {
    color: #1a1a1a;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

a:hover {
    color: #555;
}

/* Header / nav */
.site-header {
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.site-nav {
    max-width: 72rem;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-name {
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.nav-links a {
    text-decoration: none;
    font-size: 0.9375rem;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* Main content */
.site-main {
    max-width: 72rem;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    min-height: 50vh;
}

.site-footer {
    border-top: 1px solid #e0e0e0;
    padding: 1.5rem 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
}

.error-page h1 {
    margin-top: 0;
    font-size: 1.75rem;
}

/* Home / gallery grids */
.tagline {
    font-size: 1.125rem;
    color: #555;
    margin-top: -0.5rem;
}

.photo-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.photo-card,
.gallery-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.photo-card img,
.gallery-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 2px;
}

.gallery-card-name {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    text-align: center;
}

.gallery-card:hover .gallery-card-name,
.photo-card:hover {
    color: #555;
}

.photo-view figure {
    margin: 1.5rem 0 0;
}

.photo-view figcaption {
    margin-top: 0.75rem;
    color: #555;
    font-size: 0.9375rem;
}

/* Individual Gallery Page (Phase IX) */
.gallery-page .site-main {
    padding: 2rem 0;
    max-width: 100%;
}

.gallery-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.gallery-title {
    font-family: "Archivo Narrow", sans-serif; /* Approximation */
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 3rem;
    text-align: center;
}

.gallery-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem; /* Significant vertical margins between images */
    width: 100%;
    max-width: 1200px;
}

.gallery-item {
    width: 100%;
    display: flex;
    justify-content: center;
}

.gallery-link {
    display: block;
    text-decoration: none;
    width: auto;
    max-width: 100%;
}

.gallery-link img {
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}

.gallery-controls {
    margin-top: 4rem;
    margin-bottom: 2rem;
    text-align: center;
}

.gallery-control-link {
    font-size: 0.9rem;
    text-decoration: none;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    transition: color 0.2s;
}

.gallery-control-link:hover {
    color: #000;
}

@media (max-width: 768px) {
    .gallery-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    .gallery-images {
        gap: 2rem;
    }
}


/* Mobile (~375px) */
@media (max-width: 30rem) {
    .site-nav {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        gap: 0.375rem 0.875rem;
    }

    .site-main {
        padding: 1.5rem 1rem;
    }

    .photo-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
        gap: 0.75rem;
    }

    .photo-view img {
        max-width: 100%;
        width: 100%;
        height: auto;
    }
}

/* Desktop */
/* Home Hero Section */
.home-page {
    background: #fff;
}

.home-hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #fcfcfc; /* Light minimalist background */
    padding: 2rem;
}

.home-hero-content {
    max-width: 800px;
}

.home-title {
    font-size: 3rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    margin-bottom: 1rem;
    color: #000;
}

.home-tagline {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    color: #555;
}

.home-nav {
    margin-bottom: 0;
}

.home-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.home-nav-links a {
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.1rem;
    color: #000;
    transition: opacity 0.2s;
}

.home-nav-links a:hover {
    opacity: 0.6;
}

/* Adjusted Main content for home page */
.home-page .site-main {
    padding-top: 0;
    background: #fff;
}

@media (min-width: 768px) {
    .site-nav {
        padding: 1.25rem 2rem;
    }

    .site-main {
        padding: 3rem 2rem;
    }

    .error-page h1 {
        font-size: 2.25rem;
    }

    .photo-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
        gap: 1.5rem;
    }
}

/* Large desktop (~1440px) */
@media (min-width: 90rem) {
    .site-nav,
    .site-main {
        max-width: 90rem;
    }

    .photo-grid,
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
        gap: 2rem;
    }

    .photo-view img {
        max-width: min(100%, 80rem);
        margin: 0 auto;
    }

    .site-main {
        padding: 3.5rem 2.5rem;
    }
}

/* About Me Page (Phase X) */
.static-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 1.25rem;
}

.static-page h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    color: #000;
    text-align: center;
}

.page-body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333;
    max-width: 65ch;
    margin: 0 auto;
}

.contact-method {
    margin-top: 3rem;
    font-size: 0.9375rem;
}

.contact-method a {
    text-decoration: none;
    color: #666;
    border-bottom: 1px solid #ccc;
    transition: color 0.2s, border-color 0.2s;
}

.contact-method a:hover {
    color: #000;
    border-color: #000;
}

/* Contact Page (Phase XI) */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem 1.25rem;
    text-align: center;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 3rem;
    color: #000;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 12px;
    color: #000;
}

.form-group input,
.form-group textarea {
    background: #fafafa;
    border: 1px solid #ccc;
    border-radius: 2px;
    padding: 12px;
    font-family: sans-serif;
    font-size: 12px;
    color: #000;
    transition: background 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: #fff;
    border-color: #999;
}

.form-group textarea {
    min-height: 200px;
}

.contact-submit {
    background: #272727;
    color: #fff;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    padding: 1em 2.5em;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    align-self: center;
}

.contact-submit:hover {
    opacity: 0.8;
}

.contact-footer {
    margin-top: 3rem;
    font-size: 0.9375rem;
    text-align: center;
}

.contact-footer a {
    text-decoration: none;
    color: #666;
    border-bottom: 1px solid #ccc;
    transition: color 0.2s, border-color 0.2s;
}

.contact-footer a:hover {
    color: #000;
    border-color: #000;
}

