@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Noto+Serif+SC:wght@300;400;500;700&display=swap');

:root {
    --ink-black: #1a1a1a;
    --soft-black: #2d2d2d;
    --charcoal: #4a4a4a;
    --paper-white: #fafaf8;
    --off-white: #f5f5f3;
    --ink-grey: #888;
    --accent-grey: #d4d4d4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', 'Noto Serif SC', serif;
    background: var(--paper-white);
    color: var(--ink-black);
    line-height: 1.8;
    font-size: 18px;
    position: relative;
    overflow-x: hidden;
}

/* Ink splash background effect */
.ink-splash {
    position: fixed;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(26,26,26,0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Header styling */
.main-header {
    text-align: center;
    padding: 80px 20px 60px;
    position: relative;
    margin-bottom: 40px;
}

.brush-stroke {
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--ink-black) 20%, var(--ink-black) 80%, transparent);
    margin: 0 auto 30px;
    opacity: 0.8;
    animation: brushAppear 1.2s ease-out;
}

@keyframes brushAppear {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 200px;
        opacity: 0.8;
    }
}

.main-header h1 {
    font-family: 'Noto Serif SC', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 2px;
    color: var(--ink-black);
    animation: fadeInDown 1s ease-out 0.3s both;
}

.tagline {
    font-size: 1.2rem;
    color: var(--charcoal);
    font-style: italic;
    letter-spacing: 1px;
    animation: fadeInDown 1s ease-out 0.6s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Intro section */
.intro {
    margin-bottom: 80px;
    padding: 40px;
    background: var(--off-white);
    border-left: 3px solid var(--ink-black);
    position: relative;
    animation: fadeIn 1s ease-out 0.9s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.intro::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 1px solid var(--accent-grey);
    pointer-events: none;
}

.drop-cap::first-letter {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 0.8;
    float: left;
    margin: 10px 10px 0 0;
    font-family: 'Noto Serif SC', serif;
}

.intro p {
    margin-bottom: 20px;
}

.intro p:last-child {
    margin-bottom: 0;
}

/* Post grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.post-card {
    background: white;
    padding: 35px 30px;
    text-decoration: none;
    color: var(--ink-black);
    border: 2px solid var(--ink-black);
    position: relative;
    transition: all 0.3s ease;
    display: block;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(26,26,26,0.05), transparent);
    transition: left 0.5s ease;
}

.post-card:hover::before {
    left: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0 var(--ink-black);
}

.card-number {
    font-family: 'Noto Serif SC', serif;
    font-size: 3rem;
    font-weight: 300;
    color: var(--accent-grey);
    margin-bottom: 10px;
    line-height: 1;
}

.post-card h2 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.post-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--charcoal);
    margin-bottom: 20px;
}

.ink-line {
    width: 60px;
    height: 2px;
    background: var(--ink-black);
    margin-top: 20px;
    transition: width 0.3s ease;
}

.post-card:hover .ink-line {
    width: 100%;
}

/* Article pages */
.article-header {
    text-align: center;
    padding: 60px 20px 40px;
    margin-bottom: 40px;
    position: relative;
}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--ink-black);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 10px 20px;
    border: 2px solid var(--ink-black);
    transition: all 0.3s ease;
    background: white;
}

.back-link:hover {
    background: var(--ink-black);
    color: white;
}

.article-header h1 {
    font-family: 'Noto Serif SC', serif;
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.article-meta {
    font-size: 1rem;
    color: var(--charcoal);
    font-style: italic;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Typography for article content */
.article-content h2 {
    font-family: 'Noto Serif SC', serif;
    font-size: 2rem;
    margin: 60px 0 25px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ink-black);
}

.article-content h3 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.5rem;
    margin: 40px 0 20px;
    font-weight: 600;
    font-style: italic;
}

.article-content p {
    margin-bottom: 25px;
    text-align: justify;
}

.article-content em {
    font-style: italic;
    color: var(--soft-black);
}

.article-content strong {
    font-weight: 600;
    color: var(--ink-black);
}

.article-content blockquote {
    border-left: 4px solid var(--ink-black);
    padding: 20px 30px;
    margin: 40px 0;
    background: var(--off-white);
    font-style: italic;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: -10px;
    left: 10px;
    color: var(--accent-grey);
    font-family: 'Noto Serif SC', serif;
}

.article-content ul, .article-content ol {
    margin: 25px 0 25px 40px;
}

.article-content li {
    margin-bottom: 12px;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

.brush-stroke-small {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ink-black) 20%, var(--ink-black) 80%, transparent);
    margin: 0 auto 20px;
    opacity: 0.6;
}

.site-footer p {
    color: var(--charcoal);
    font-style: italic;
    font-size: 1.1rem;
}

/* ============================================
   OCEAN THEME — main page (body.beach-theme)
   ============================================ */

body.beach-theme {
    /* Pure deep-ocean gradient: pale horizon sky → rich teal → midnight navy */
    background: linear-gradient(
        180deg,
        #cce9f5 0%,
        #8ecae6 10%,
        #219ebc 25%,
        #126782 42%,
        #023e59 60%,
        #012a40 78%,
        #011d2e 100%
    );
    background-attachment: fixed;
    color: var(--ink-black);
}

/* Soft light shimmer — like sunlight hitting open water */
body.beach-theme .ink-splash {
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse at 65% 20%,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(140, 210, 240, 0.06) 40%,
        transparent 70%
    );
}

/* Wave layer 1 */
body.beach-theme::before {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 160px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 160'%3E%3Cpath fill='rgba(255,255,255,0.06)' d='M0,80 C240,130 480,30 720,80 C960,130 1200,30 1440,80 L1440,160 L0,160 Z'/%3E%3C/svg%3E") repeat-x bottom;
    background-size: 720px 160px;
    animation: waveDrift 10s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

/* Wave layer 2 — offset, slower */
body.beach-theme::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: -30%;
    width: 200%;
    height: 110px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 110'%3E%3Cpath fill='rgba(33,158,188,0.12)' d='M0,55 C300,95 600,15 900,55 C1100,80 1280,25 1440,55 L1440,110 L0,110 Z'/%3E%3C/svg%3E") repeat-x bottom;
    background-size: 960px 110px;
    animation: waveDrift 14s ease-in-out infinite alternate-reverse;
    pointer-events: none;
    z-index: 0;
}

@keyframes waveDrift {
    from { transform: translateX(0); }
    to   { transform: translateX(-8%); }
}

/* ── Header ── */
body.beach-theme .main-header h1 {
    color: #ffffff;
    text-shadow: 0 2px 30px rgba(0, 30, 60, 0.6);
}

body.beach-theme .tagline {
    color: rgba(200, 235, 250, 0.95);
    text-shadow: 0 1px 10px rgba(0, 30, 60, 0.4);
}

body.beach-theme .brush-stroke {
    background: linear-gradient(90deg,
        transparent,
        rgba(255,255,255,0.85) 20%,
        rgba(255,255,255,0.85) 80%,
        transparent
    );
}

/* ── Blog section headings ── */
.blog-section {
    margin-bottom: 70px;
}

.section-label {
    display: inline-block;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.7;
}

.section-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.section-subtitle {
    font-size: 1rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 36px;
    opacity: 0.85;
}

.section-divider {
    width: 60px;
    height: 3px;
    margin-bottom: 36px;
    border: none;
    border-radius: 2px;
}

body.beach-theme .section-label {
    color: #8ecae6;
}

body.beach-theme .section-title {
    color: #ffffff;
    text-shadow: 0 1px 12px rgba(0, 30, 60, 0.4);
}

body.beach-theme .section-subtitle {
    color: rgba(200, 235, 250, 0.88);
}

body.beach-theme .section-divider {
    background: linear-gradient(90deg, #219ebc, #8ecae6);
}

/* ── Intro box ── */
body.beach-theme .intro {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 3px solid rgba(142, 202, 230, 0.7);
    color: rgba(230, 248, 255, 0.95);
}

body.beach-theme .intro::before {
    border-color: rgba(255, 255, 255, 0.12);
}

body.beach-theme .drop-cap::first-letter {
    color: #8ecae6;
}

/* ── Cards ── */
body.beach-theme .post-card {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(142, 202, 230, 0.35);
    color: #e6f4fb;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

body.beach-theme .post-card h2 {
    color: #ffffff;
}

body.beach-theme .post-card p {
    color: rgba(200, 235, 250, 0.82);
}

body.beach-theme .post-card:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(142, 202, 230, 0.7);
    box-shadow: 0 8px 32px rgba(0, 20, 50, 0.4), 0 0 0 1px rgba(142, 202, 230, 0.3);
    transform: translateY(-6px);
}

body.beach-theme .post-card::before {
    background: linear-gradient(90deg, transparent, rgba(142, 202, 230, 0.08), transparent);
}

body.beach-theme .card-number {
    color: rgba(142, 202, 230, 0.5);
}

body.beach-theme .ink-line {
    background: linear-gradient(90deg, #219ebc, #8ecae6);
}

/* ── Footer ── */
body.beach-theme .site-footer p {
    color: rgba(200, 235, 250, 0.75);
}

body.beach-theme .brush-stroke-small {
    background: linear-gradient(90deg,
        transparent,
        rgba(142, 202, 230, 0.6) 20%,
        rgba(142, 202, 230, 0.6) 80%,
        transparent
    );
}

/* ============================================
   END OCEAN THEME
   ============================================ */

/* Responsive design */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .article-header h1 {
        font-size: 2.2rem;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
    
    .intro {
        padding: 30px 20px;
    }
    
    .drop-cap::first-letter {
        font-size: 3.5rem;
    }
}