:root {
    --bg-primary: #f5f0e6;
    --bg-secondary: #ebe5d8;
    --bg-card: #faf7f0;
    --bg-hover: #f0ebe0;
    --text-primary: #3d2b1f;
    --text-secondary: #5c4a3d;
    --text-muted: #8b7355;
    --accent: #8b4513;
    --accent-light: #a0522d;
    --accent-dark: #6b3410;
    --border: #d4c4a8;
    --border-light: #c9b896;
    --ink: #2c1810;
    --gold: #b8860b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 17px;
    background-image:
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4c4a8' fill-opacity='0.3'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

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

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

/* Header */
.site-header {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(235, 229, 216, 0.95) 100%);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(60, 40, 20, 0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
}

.logo-icon {
    font-size: 2rem;
    color: var(--accent);
}

.logo-text {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

.main-nav a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--ink);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.hero-banner {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--bg-primary), transparent);
}

.hero-content {
    position: relative;
    padding: 60px 0 80px;
    z-index: 1;
}

.hero-small {
    padding: 60px 0;
}

.hero h1 {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 3.2rem;
    font-weight: 400;
    margin-bottom: 24px;
    line-height: 1.2;
    color: var(--ink);
}

.hero-small h1 {
    font-size: 2.4rem;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

.hero-author {
    margin-top: 20px;
    font-size: 1rem;
    color: var(--accent);
    font-style: italic;
}

/* Decorative elements */
.chinese-border {
    border: 2px solid var(--border);
    border-image: linear-gradient(45deg, var(--accent), var(--gold), var(--accent)) 1;
}

.scroll-decoration {
    position: relative;
    padding: 40px;
}

.scroll-decoration::before,
.scroll-decoration::after {
    content: '☯';
    position: absolute;
    font-size: 1.5rem;
    color: var(--border);
}

.scroll-decoration::before {
    top: 10px;
    left: 10px;
}

.scroll-decoration::after {
    bottom: 10px;
    right: 10px;
}

/* Quote Block */
.quote-block {
    padding: 80px 24px;
    text-align: center;
    background: var(--bg-secondary);
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    position: relative;
}

.quote-block::before {
    content: '「';
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-100px);
    font-size: 4rem;
    color: var(--border);
    font-family: serif;
}

.quote-block::after {
    content: '」';
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(60px);
    font-size: 4rem;
    color: var(--border);
    font-family: serif;
}

.quote-text {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.6rem;
    font-style: italic;
    color: var(--ink);
    max-width: 700px;
    margin: 0 auto 20px;
    line-height: 1.8;
}

.quote-author {
    color: var(--accent);
    font-size: 1rem;
}

/* Section */
.section {
    padding: 80px 0;
}

.section-title {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 16px;
    text-align: center;
    color: var(--ink);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 24px auto 48px;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.card {
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(60, 40, 20, 0.08);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(60, 40, 20, 0.15);
}

.card-image {
    height: 200px;
    background: linear-gradient(135deg, #d4c4a8 0%, #c9b896 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--accent);
}

.card-image svg {
    width: 80px;
    height: 80px;
    fill: var(--accent);
}

.feature-icon svg {
    width: 64px;
    height: 64px;
    fill: var(--accent);
}

.card-content {
    padding: 28px;
}

.card-category {
    color: var(--accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
    font-weight: 600;
}

.card-title {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: 16px;
    line-height: 1.4;
}

.card-title a {
    color: var(--ink);
}

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

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.read-more {
    color: var(--accent);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 12px;
    color: var(--accent-dark);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 48px 32px;
    background: var(--bg-card);
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(60, 40, 20, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 24px;
    color: var(--accent);
}

.feature-title {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--ink);
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Article Content */
.article-header {
    padding: 80px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.article-meta span {
    margin: 0 8px;
}

.article-title {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 2.8rem;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 24px;
    color: var(--ink);
}

.article-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

.article-content {
    padding: 60px 0;
}

.article-content h2 {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin: 48px 0 24px;
    color: var(--ink);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.article-content h3 {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    margin: 36px 0 18px;
    color: var(--ink);
}

.article-content p {
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 20px 24px;
    margin: 32px 0;
    font-style: italic;
    color: var(--ink);
    background: var(--bg-secondary);
    border-radius: 0 4px 4px 0;
}

.article-content blockquote footer {
    margin-top: 12px;
    font-style: normal;
    color: var(--accent);
    font-size: 0.9rem;
}

.article-content ul,
.article-content ol {
    margin: 24px 0;
    padding-left: 24px;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 12px;
}

/* Sidebar */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-block {
    background: var(--bg-card);
    border-radius: 4px;
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.sidebar-title {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    margin-bottom: 12px;
}

.sidebar-list a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    padding: 80px 0 40px;
    border-top: 2px solid var(--border);
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-about p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 16px;
    line-height: 1.7;
}

.footer-title {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--ink);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom p {
    margin-bottom: 8px;
}

/* Page specific */
.masters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.master-card {
    text-align: center;
    padding: 40px 28px;
    background: var(--bg-card);
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: box-shadow 0.3s ease;
}

.master-card:hover {
    box-shadow: 0 8px 24px rgba(60, 40, 20, 0.12);
}

.master-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-secondary), var(--border));
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 2px solid var(--border);
}

.master-name {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--ink);
}

.master-years {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.master-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Koans */
.koan-card {
    background: var(--bg-card);
    border-radius: 4px;
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    position: relative;
}

.koan-card::before {
    content: '禪';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    color: var(--border);
    opacity: 0.5;
}

.koan-number {
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 16px;
}

.koan-text {
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--ink);
}

.koan-source {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 20px;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-form textarea {
    min-height: 160px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background: var(--accent-dark);
}

.contact-info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--accent);
}

.contact-info-item h4 {
    font-family: 'Noto Serif', Georgia, serif;
    font-weight: 400;
    margin-bottom: 4px;
    color: var(--ink);
}

.contact-info-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 16px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs span {
    margin: 0 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .main-nav {
        display: none;
        width: 100%;
        padding-top: 20px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 16px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-small h1 {
        font-size: 1.8rem;
    }

    .hero-banner {
        height: 300px;
    }

    .article-title {
        font-size: 2rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .quote-text {
        font-size: 1.3rem;
    }

    .quote-block::before,
    .quote-block::after {
        display: none;
    }
}
