/* ==========================================================================
   Eothen Stearn — Site Styles
   ========================================================================== */

/* Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern", "liga", "clig", "calt";
}

body {
    margin: 0;
    padding: 0;
    font-family: Georgia, serif;
    color: hsla(0, 0%, 0%, 0.8);
    background: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #0000EE;
    text-decoration: underline;
}

a:visited {
    color: #551A8B;
}

a:hover,
a:focus-visible {
    color: #0000EE;
    opacity: 0.7;
}

/* Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-weight: bold;
    margin: 0 0 1.45rem;
    line-height: 1.1;
    color: inherit;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.51572rem; }
h3 { font-size: 1.31951rem; }
h4 { font-size: 1rem; }

p {
    margin: 0 0 1.45rem;
}

ul, ol {
    margin: 0 0 1.45rem 1.45rem;
    padding: 0;
    list-style-position: outside;
}

li {
    margin-bottom: 0.5rem;
}

blockquote {
    margin: 1.45rem;
    padding-left: 1.45rem;
    border-left: 3px solid hsla(0, 0%, 0%, 0.12);
    font-style: italic;
}

/* Header / Navigation
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid hsla(0, 0%, 0%, 0.08);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.site-nav__home {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.site-nav__home:visited {
    color: #000;
}

.site-nav__links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.site-nav__links a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-nav__links a:visited {
    color: #000;
}

.nav-lettering {
    height: 28px;
    width: auto;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.site-nav__links a:hover .nav-lettering,
.site-nav__links a:focus-visible .nav-lettering {
    opacity: 0.55;
}

.site-nav__links a.is-active .nav-lettering {
    filter: brightness(0.7);
}

.site-nav__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
}

.site-nav__toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #000;
}

/* Hero
   ========================================================================== */
.hero {
    width: 100%;
    height: calc(100vh - 57px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero picture {
    width: 100%;
    height: 100%;
}

.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section Page
   ========================================================================== */
.section-page {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-page__header {
    margin-bottom: 2rem;
}

.section-page__intro {
    max-width: 680px;
    margin-bottom: 2.5rem;
}

.section-page__projects {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid hsla(0, 0%, 0%, 0.08);
}

/* Project Filters
   ========================================================================== */
.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsla(0, 0%, 0%, 0.12);
}

.filter-btn {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px;
    margin: 3px;
    border: none;
    background: #e0e0e0;
    color: hsla(0, 0%, 0%, 0.8);
    cursor: pointer;
    text-transform: capitalize;
}

.filter-btn:hover,
.filter-btn:focus-visible {
    background: #ccc;
    color: hsla(0, 0%, 0%, 0.9);
}

.filter-btn.active {
    background: #333;
    color: #fff;
}

/* Project Grid — 2 columns max
   ========================================================================== */
.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 600px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
}

.project-card[data-hidden="true"] {
    display: none;
}

.project-card a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.project-card a:visited {
    color: inherit;
}

.project-card__image {
    overflow: hidden;
    margin-bottom: 0.75rem;
    background: #f0f0f0;
    aspect-ratio: 3 / 2;
}

.project-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card__info {
    padding: 0;
}

.project-card__title {
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.project-card__meta {
    font-size: 0.8rem;
    color: hsla(0, 0%, 0%, 0.5);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.project-card__price {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 0;
}

/* Project Detail
   ========================================================================== */
.project-detail {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.project-detail__header {
    margin-bottom: 2rem;
}

.project-detail__title {
    margin-bottom: 0.5rem;
}

.project-detail__meta {
    font-size: 0.9rem;
    color: hsla(0, 0%, 0%, 0.6);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.project-detail__price {
    font-weight: bold;
}

.project-detail__hero {
    margin: 0 0 2rem;
}

.project-detail__hero img {
    width: 100%;
}

/* Blocks */
.umb-block-list {
    max-width: 680px;
}

.block {
    margin-bottom: 2rem;
}

.block--rich-text {
    max-width: 680px;
}

.block--embed {
    margin-bottom: 2rem;
}

.block--embed iframe {
    max-width: 100%;
}

.embed-caption {
    font-size: 0.85rem;
    color: hsla(0, 0%, 0%, 0.5);
    margin-top: 0.5rem;
}

.responsive-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 2rem;
}

.responsive-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Gallery */
.project-detail__gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 1025px) {
    .project-detail__gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery__item {
    margin: 0;
    cursor: pointer;
}

.gallery__item:hover img {
    opacity: 0.85;
}

.gallery__item img {
    width: 100%;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.is-open {
    display: flex;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    opacity: 0.7;
}

.lightbox__close:hover { opacity: 1; }

.lightbox__prev,
.lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 1rem;
    opacity: 0.7;
    line-height: 1;
}

.lightbox__prev:hover,
.lightbox__next:hover { opacity: 1; }

.lightbox__prev { left: 0.5rem; }
.lightbox__next { right: 0.5rem; }

.lightbox__counter {
    color: rgba(255, 255, 255, 0.7);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.project-detail__nav,
.standard-page__nav {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid hsla(0, 0%, 0%, 0.12);
}

.back-link {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Standard Page
   ========================================================================== */
.standard-page {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* About Page
   ========================================================================== */
.about-page {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.about-content {
    max-width: 680px;
    margin-bottom: 2.5rem;
}

.about-education {
    max-width: 680px;
    margin-bottom: 2.5rem;
}

.about-education h2 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid hsla(0, 0%, 0%, 0.12);
}

.education-list {
    margin: 0;
}

.education-entry {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.education-entry dt {
    flex-shrink: 0;
    width: 6rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: hsla(0, 0%, 0%, 0.5);
}

.education-entry dd {
    margin: 0;
}

.about-cv h2 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid hsla(0, 0%, 0%, 0.12);
}

.cv-list {
    list-style: none;
    margin-left: 0;
}

.cv-list li {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.cv-year {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    color: hsla(0, 0%, 0%, 0.5);
    margin-right: 0.75rem;
}

/* Poems
   ========================================================================== */
.poems-page {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.poems-page h2 {
    margin-bottom: 1.5rem;
}

.poems-intro {
    max-width: 680px;
    margin-bottom: 2rem;
}

.poem-entry {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsla(0, 0%, 0%, 0.05);
}

.poem-entry h3 {
    margin-bottom: 0.25rem;
}

.poem-entry time {
    font-size: 0.85rem;
    color: hsla(0, 0%, 0%, 0.5);
}

.poem-detail {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.poem-detail__date {
    display: block;
    font-size: 0.9rem;
    color: hsla(0, 0%, 0%, 0.5);
    margin-bottom: 2rem;
}

.poem-detail__body {
    max-width: 680px;
    white-space: pre-line;
}

.poem-detail__nav {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid hsla(0, 0%, 0%, 0.12);
}

/* Rich Text (from RTE editor)
   ========================================================================== */
.rich-text p {
    margin-bottom: 1.45rem;
}

.rich-text img {
    margin: 1.5rem 0;
}

/* Footer
   ========================================================================== */
.site-footer {
    margin-top: 4rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid hsla(0, 0%, 0%, 0.12);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.site-footer p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    color: hsla(0, 0%, 0%, 0.4);
}

/* Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .site-nav {
        padding: 0.75rem 1rem;
    }

    .site-nav__toggle {
        display: flex;
    }

    .site-nav__links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #fff;
        padding: 1rem 1.5rem;
        gap: 0;
        border-bottom: 1px solid hsla(0, 0%, 0%, 0.08);
    }

    .site-nav__links.is-open {
        display: flex;
    }

    .site-nav__links a {
        display: flex;
        padding: 0.5rem 0;
    }

    .nav-lettering {
        height: 22px;
    }

    .hero {
        height: calc(100svh - 49px);
    }

    .section-page,
    .project-detail,
    .about-page,
    .poems-page,
    .poem-detail,
    .standard-page {
        padding: 1.5rem 1rem;
    }

    .project-filters {
        gap: 0.35rem;
    }

    .filter-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .education-entry {
        flex-direction: column;
        gap: 0.25rem;
    }

    .education-entry dt {
        width: auto;
    }

    .project-detail__meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .lightbox__img {
        max-width: 96vw;
        max-height: 75vh;
    }

    .lightbox__prev,
    .lightbox__next {
        font-size: 1.8rem;
        padding: 0.5rem;
    }
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 100;
    font-size: 0.85rem;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Print */
@media print {
    .site-header,
    .site-footer {
        display: none;
    }

    .section-page,
    .project-detail,
    .about-page,
    .poems-page,
    .poem-detail,
    .standard-page {
        max-width: none;
        padding: 0;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
