@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Inter:wght@400;500&display=swap');

:root {
    --color-bg: #faf8f5;
    --color-text: #2a2a2a;
    --color-text-muted: #6b6b6b;
    --color-accent: #1a1a1a;
    --color-accent-warm: #a0654a;
    --color-border: #e8e4df;
    --color-card-bg: #ffffff;
    --font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 16px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px
        );
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.container-moment {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.essay-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem 0;
    margin-bottom: 0;
    background: var(--color-bg);
    position: relative;
    z-index: 10;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.site-title a {
    color: var(--color-accent);
    text-decoration: none;
}

.site-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    margin-left: 2.5rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.site-nav a:hover {
    color: var(--color-accent);
}

/* Hero Moment */
.hero-moment {
    position: relative;
    height: 85vh;
    min-height: 600px;
    max-height: 800px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-moment-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-moment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-moment-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

.hero-moment-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-weight: 500;
}

.hero-moment-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.hero-moment-title a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.hero-moment-title a:hover {
    opacity: 0.8;
}

.hero-moment-description {
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-moment-date {
    font-size: 0.85rem;
    opacity: 0.8;
    letter-spacing: 0.05em;
}

/* Home Sections */
.home-section {
    padding: 5rem 0;
    position: relative;
    z-index: 2;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--color-accent);
}

.section-link {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

.section-link:hover {
    color: var(--color-accent-warm);
}

/* Moments Grid */
.moments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.moment-card {
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    background: var(--color-card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.moment-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.moment-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.moment-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.moment-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.moment-card:hover .moment-card-image img {
    transform: scale(1.05);
}

.moment-card-content {
    padding: 1.5rem;
}

.moment-card-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--color-accent);
}

.moment-card-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Essays Section */
.essays-section {
    background: white;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.essays-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.essay-preview {
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--color-border);
}

.essay-preview:last-child {
    border-bottom: none;
}

.essay-preview-date {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.essay-preview-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.essay-preview-title a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.essay-preview-title a:hover {
    color: var(--color-accent-warm);
}

.essay-preview-excerpt {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.essay-preview-link {
    font-size: 0.95rem;
    color: var(--color-accent-warm);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: opacity 0.3s ease;
}

.essay-preview-link:hover {
    opacity: 0.7;
}

/* Moment Single Page - Cinematic */
.moment-single {
    position: relative;
}

.moment-hero {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    max-height: 700px;
    overflow: hidden;
}

.moment-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.moment-content {
    padding: 4rem 0;
}

.moment-header {
    text-align: center;
    margin-bottom: 3rem;
}

.moment-date {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.moment-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.2;
    color: var(--color-accent);
    margin-bottom: 0;
}

.moment-body {
    font-size: 1.1rem;
    line-height: 1.75;
}

.moment-body p {
    margin-bottom: 1.5rem;
}

.moment-body img {
    width: 100%;
    height: auto;
    margin: 3rem 0;
    border-radius: 3px;
}

.moment-nav {
    border-top: 1px solid var(--color-border);
    padding: 3rem 0;
    margin-top: 4rem;
}

.moment-nav .container-moment {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.moment-nav-link {
    text-decoration: none;
    color: var(--color-text);
    transition: color 0.3s ease;
    flex: 1;
}

.moment-nav-prev {
    text-align: left;
}

.moment-nav-next {
    text-align: right;
}

.moment-nav-link:hover {
    color: var(--color-accent-warm);
}

.moment-nav-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.moment-nav-title {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.25rem;
}

/* Essay Single Page - Literary */
.essay-single {
    padding: 4rem 0 6rem;
}

.essay-header {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--color-border);
}

.essay-date {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 2rem;
}

.essay-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.2;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.essay-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
}

.essay-featured-image {
    margin-bottom: 4rem;
}

.essay-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.essay-body {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--color-text);
}

.essay-body p {
    margin-bottom: 1.75rem;
}

.essay-body p:first-of-type::first-letter {
    font-family: var(--font-serif);
    font-size: 4rem;
    line-height: 1;
    float: left;
    margin: 0.1rem 0.15rem 0 0;
    color: var(--color-accent-warm);
}

.essay-body h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    margin: 3.5rem 0 1.5rem;
    color: var(--color-accent);
    line-height: 1.3;
}

.essay-body h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin: 3rem 0 1rem;
    line-height: 1.4;
}

.essay-body a {
    color: var(--color-accent-warm);
    text-decoration: underline;
    text-decoration-color: rgba(160, 101, 74, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease;
}

.essay-body a:hover {
    text-decoration-color: var(--color-accent-warm);
}

.essay-body blockquote {
    border-left: 3px solid var(--color-accent-warm);
    padding-left: 2rem;
    margin: 2.5rem 0;
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

.essay-body img {
    width: 100%;
    height: auto;
    margin: 3rem 0;
    border-radius: 3px;
}

.essay-footer {
    margin-top: 5rem;
    padding-top: 3rem;
}

.essay-divider {
    width: 60px;
    height: 1px;
    background: var(--color-border);
    margin: 0 auto 3rem;
}

.essay-back {
    display: block;
    text-align: center;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.essay-back:hover {
    color: var(--color-accent);
}

/* Archive Pages */
.archive-page {
    padding: 4rem 0;
}

.archive-header {
    text-align: center;
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.archive-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.archive-description {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.essays-archive-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 3rem 0;
    margin-top: 6rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.site-footer p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-moment {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-moment-title {
        font-size: 2.5rem;
    }
    
    .moments-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .container,
    .container-narrow,
    .container-moment,
    .essay-container {
        padding: 0 1.5rem;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .site-nav a {
        margin: 0 1rem;
    }
    
    .hero-moment {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-moment-title {
        font-size: 2rem;
    }
    
    .hero-moment-description {
        font-size: 1rem;
    }
    
    .home-section {
        padding: 3rem 0;
    }
    
    .moments-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .essay-preview-title {
        font-size: 1.75rem;
    }
    
    .moment-title {
        font-size: 2.25rem;
    }
    
    .essay-title {
        font-size: 2.25rem;
    }
    
    .essay-body {
        font-size: 1.05rem;
        line-height: 1.8;
    }
    
    .essay-body p:first-of-type::first-letter {
        font-size: 3rem;
    }
    
    .moment-nav .container-moment {
        flex-direction: column;
    }
    
    .moment-nav-next {
        text-align: left;
    }
}