:root {
    --bg: #f3eee8;
    --paper: #fffaf5;
    --ink: #2c2a28;
    --muted: #6f6a65;
    --line: #d8cec4;
    --accent: #b65f44;
    --accent-soft: #f0ded4;
    --sage: #7f9274;
    --shadow: 0 18px 40px rgba(76, 54, 42, 0.12);
    --radius: 18px;
    --container: min(1140px, 92vw);
    --ease: 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
    --post-cover-ratio: 6 / 5;
    --article-cover-ratio: 6 / 5;
    --inline-image-ratio: 6 / 5;
    --article-cover-max-width: 820px;
    --inline-image-max-width: 760px;
}

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

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: "Manrope", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(600px 300px at 12% 0%, rgba(182, 95, 68, 0.12), transparent 70%),
        radial-gradient(500px 280px at 92% 8%, rgba(127, 146, 116, 0.11), transparent 70%),
        var(--bg);
    line-height: 1.65;
}

.grain::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.14;
    background-image: radial-gradient(circle at 1px 1px, #000 1px, transparent 0);
    background-size: 4px 4px;
    z-index: -1;
}

.wrap {
    width: var(--container);
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
    background: rgba(243, 238, 232, 0.75);
    border-bottom: 1px solid rgba(216, 206, 196, 0.7);
}

.nav {
    width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 14px;
}

.brand {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: inherit;
    text-decoration: none;
}

.brand small {
    font-family: "Manrope", sans-serif;
    font-size: 0.72rem;
    color: var(--muted);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: -4px;
}

.menu {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.menu a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.95rem;
    transition: color var(--ease);
}

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

.hero {
    padding: 58px 0 36px;
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    gap: 22px;
    align-items: stretch;
}

.hero-main {
    background: linear-gradient(160deg, var(--paper), #fdf7f1 60%, #f9eee7);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 34px;
    animation: rise 700ms var(--ease) both;
}

.eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 18px;
    background: var(--accent-soft);
    padding: 6px 10px;
    border-radius: 999px;
}

h1 {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.1rem, 4.2vw, 3.5rem);
    line-height: 1.06;
    margin-bottom: 14px;
}

.hero p {
    color: var(--muted);
    max-width: 62ch;
}

.hero-actions {
    margin-top: 26px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    border: 1px solid transparent;
    background: var(--ink);
    color: #fff;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform var(--ease), background var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-1px);
    background: #1d1b19;
}

.btn.alt {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.hero-side {
    background: #efe6dd;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    animation: rise 780ms var(--ease) both;
    animation-delay: 120ms;
}

.hero-side::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(44, 42, 40, 0.32), transparent 48%);
}

.hero-side img {
    width: 100%;
    height: 100%;
    min-height: 340px;
    object-fit: cover;
    display: block;
}

.hero-side-text {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    color: #fff;
    z-index: 1;
}

.hero-side-text h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.5rem;
}

.hero-side-text p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.88rem;
}

.section-head {
    margin-top: 10px;
    margin-bottom: 14px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.section-head h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
}

.section-head p {
    color: var(--muted);
    font-size: 0.9rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 38px;
}

.post {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
    animation: rise 680ms var(--ease) both;
}

.post:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: #c8b6a7;
}

.post-cover-frame {
    width: 100%;
    aspect-ratio: var(--post-cover-ratio);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, #f4ece4, #efe6dd);
    border-bottom: 1px solid rgba(216, 206, 196, 0.65);
}

.post-cover-frame::before,
.article-cover-frame::before,
.article-inline-image-frame::before {
    content: "";
    position: absolute;
    inset: -10%;
    background-image: var(--media-bg-image, none);
    background-size: cover;
    background-position: center;
    filter: blur(18px) saturate(1.08);
    transform: scale(1.08);
    opacity: 0.72;
    z-index: 0;
}

.post-cover-frame::after,
.article-cover-frame::after,
.article-inline-image-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 250, 245, 0.12), rgba(255, 250, 245, 0.08));
    z-index: 0;
}

.post-cover {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    position: relative;
    z-index: 1;
}

.post-body {
    padding: 16px 15px 18px;
}

.tag {
    font-size: 0.72rem;
    color: #fff;
    background: var(--sage);
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 10px;
}

.post h3 {
    font-size: 1.07rem;
    margin-bottom: 8px;
    line-height: 1.35;
}

.post h3 a {
    color: inherit;
    text-decoration: none;
}

.post h3 a:hover {
    color: var(--accent);
}

.post p {
    color: var(--muted);
    font-size: 0.9rem;
}

.meta {
    margin-top: 11px;
    color: #8f8780;
    font-size: 0.78rem;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}

.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
}

.panel h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.7rem;
    margin-bottom: 12px;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.member {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.member img {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    object-fit: cover;
    margin: 0 auto 8px;
    border: 2px solid #fff;
}

.member strong {
    display: block;
    font-size: 0.9rem;
}

.member span {
    font-size: 0.75rem;
    color: var(--muted);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.photo-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
}

.empty-state {
    background: var(--paper);
    border: 1px dashed #bfaea1;
    border-radius: 12px;
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

.writing-box {
    margin-bottom: 54px;
    background: linear-gradient(145deg, #fff8f2, #f6ebe2 55%, #efe4d8);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
}

.writing-box h3 {
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
    margin-bottom: 10px;
}

.writing-box p {
    color: var(--muted);
    margin-bottom: 14px;
}

.prompt {
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed #c8b8a8;
    border-radius: 12px;
    padding: 14px;
    color: #5f5751;
    font-size: 0.9rem;
}

.article-layout {
    width: min(860px, 92vw);
    margin: 0 auto;
    padding-top: 40px;
    padding-bottom: 48px;
}

.article-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.article-title {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
    margin: 12px 0 12px;
}

.article-cover-frame {
    width: min(100%, var(--article-cover-max-width));
    aspect-ratio: var(--article-cover-ratio);
    border-radius: 14px;
    border: 1px solid var(--line);
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, #f4ece4, #efe6dd);
}

.article-cover {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    position: relative;
    z-index: 1;
}

.article-content {
    color: #403a35;
    font-size: 1.02rem;
}

.article-content p {
    margin-bottom: 1em;
}

.article-inline-image {
    margin: 1.2em auto 1.4em;
    width: min(100%, var(--inline-image-max-width));
}

.article-inline-image-frame {
    width: 100%;
    aspect-ratio: var(--inline-image-ratio);
    border-radius: 12px;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, #f4ece4, #efe6dd);
}

.article-inline-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    position: relative;
    z-index: 1;
}

.article-inline-image figcaption {
    text-align: center;
    color: var(--muted);
    font-size: 0.86rem;
    margin-top: 7px;
}

.article-back {
    margin-top: 22px;
}

.article-back a {
    color: var(--accent);
    text-decoration: none;
}

.article-back a:hover {
    text-decoration: underline;
}

footer {
    border-top: 1px solid var(--line);
    padding: 22px 0 28px;
    color: var(--muted);
    font-size: 0.85rem;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .hero-side img {
        min-height: 280px;
    }
    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .panel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .nav {
        align-items: flex-start;
        gap: 8px;
        flex-direction: column;
    }
    .menu {
        gap: 10px;
    }
    .hero-main {
        padding: 24px;
    }
    .post-grid {
        grid-template-columns: 1fr;
    }
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
