/*
Theme Name: 食想 Shixiang
Theme URI: https://example.com/
Author: Shixiang
Description: 食想｜執業食品技師產業筆記 — 簡約、內容導向的食品產業知識型個人品牌 WordPress 主題。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: shixiang
*/

:root {
    --green: #365848;
    --green-dark: #263f34;
    --black: #202522;
    --text: #3d4540;
    --muted: #737b76;
    --line: #e6e9e6;
    --soft: #f5f6f3;
    --white: #ffffff;
    --max-width: 1180px;
    --reading-width: 760px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Noto Sans TC",
        "PingFang TC",
        "Microsoft JhengHei",
        sans-serif;
    font-size: 17px;
    line-height: 1.9;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--green);
}

.container {
    width: min(calc(100% - 40px), var(--max-width));
    margin-inline: auto;
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-name {
    color: var(--black);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: .08em;
}

.brand-tagline {
    color: var(--muted);
    font-size: 11px;
    margin-top: 4px;
    letter-spacing: .08em;
}

.main-navigation ul {
    display: flex;
    gap: 28px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-navigation a {
    font-size: 14px;
    color: var(--text);
}

.menu-toggle {
    display: none;
    border: 0;
    background: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero */

.hero {
    padding: 110px 0 100px;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8faf7 100%
        );
}

.hero-inner {
    max-width: 900px;
}

.hero-eyebrow {
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .14em;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0;
    max-width: 800px;
    color: var(--black);
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.25;
    letter-spacing: -.03em;
}

.hero-description {
    max-width: 720px;
    margin: 30px 0 0;
    color: var(--text);
    font-size: 19px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 25px;
    border: 1px solid var(--green);
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    transition: .2s ease;
}

.button:hover {
    background: var(--green);
    color: white;
}

.button-primary {
    background: var(--green);
    color: white;
}

.button-primary:hover {
    background: var(--green-dark);
}

/* Sections */

.section {
    padding: 90px 0;
}

.section-soft {
    background: var(--soft);
}

.section-heading {
    margin-bottom: 45px;
}

.section-kicker {
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    margin-bottom: 10px;
}

.section-title {
    margin: 0;
    color: var(--black);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.35;
}

.section-description {
    max-width: 720px;
    color: var(--muted);
    margin-top: 15px;
}

/* Posts */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.post-card {
    border-top: 1px solid var(--line);
    padding-top: 22px;
}

.post-card-category {
    color: var(--green);
    font-size: 12px;
    font-weight: 700;
}

.post-card-title {
    margin: 12px 0 10px;
    color: var(--black);
    font-size: 21px;
    line-height: 1.5;
}

.post-card-excerpt {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.post-card-date {
    display: block;
    margin-top: 16px;
    color: #8a918d;
    font-size: 12px;
}

/* Topics */

.topic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.topic-card {
    background: white;
    padding: 40px;
}

.topic-card h3 {
    margin: 0 0 15px;
    color: var(--black);
    font-size: 24px;
}

.topic-card p {
    color: var(--muted);
    margin: 0 0 25px;
}

/* About */

.about-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 70px;
    align-items: start;
}

.about-title {
    color: var(--black);
    font-size: 32px;
    line-height: 1.4;
    margin: 0;
}

.about-content {
    font-size: 17px;
}

.about-content p {
    margin-top: 0;
    margin-bottom: 22px;
}

/* Contact */

.contact-box {
    max-width: 850px;
}

.contact-box p {
    color: var(--muted);
}

.contact-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

/* Page / Article */

.page-header {
    padding: 80px 0 50px;
    background: var(--soft);
}

.page-title {
    margin: 0;
    color: var(--black);
    font-size: clamp(34px, 5vw, 55px);
    line-height: 1.3;
}

.page-description {
    max-width: 720px;
    margin-top: 18px;
    color: var(--muted);
}

.article {
    max-width: var(--reading-width);
    margin: 0 auto;
    padding: 80px 0;
}

.article-meta {
    color: var(--green);
    font-size: 13px;
    margin-bottom: 15px;
}

.article-title {
    margin: 0 0 30px;
    color: var(--black);
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.35;
}

.article-content {
    font-size: 18px;
    line-height: 2;
}

.article-content h2 {
    margin-top: 55px;
    color: var(--black);
    font-size: 30px;
    line-height: 1.5;
}

.article-content h3 {
    margin-top: 40px;
    color: var(--black);
    font-size: 23px;
}

.article-content blockquote {
    border-left: 3px solid var(--green);
    margin: 35px 0;
    padding: 10px 25px;
    color: var(--muted);
}

.article-author {
    margin-top: 70px;
    padding-top: 35px;
    border-top: 1px solid var(--line);
}

.article-author h3 {
    color: var(--black);
}

.author-description {
    color: var(--muted);
}

/* Archive */

.archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px 40px;
}

/* Footer */

.site-footer {
    padding: 65px 0 30px;
    border-top: 1px solid var(--line);
    background: #fafbf9;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.footer-brand {
    color: var(--black);
    font-size: 25px;
    font-weight: 800;
}

.footer-description {
    max-width: 460px;
    color: var(--muted);
    font-size: 14px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    align-content: start;
}

.footer-nav a {
    color: var(--muted);
    font-size: 14px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 60px;
    padding-top: 25px;
    border-top: 1px solid var(--line);
    color: #8a918d;
    font-size: 12px;
}

/* Responsive */

@media (max-width: 800px) {

    body {
        font-size: 16px;
    }

    .container {
        width: min(calc(100% - 30px), var(--max-width));
    }

    .header-inner {
        min-height: 70px;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 70px;
        background: white;
        border-bottom: 1px solid var(--line);
        padding: 20px 15px;
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation li {
        border-bottom: 1px solid var(--line);
    }

    .main-navigation a {
        display: block;
        padding: 13px 0;
    }

    .hero {
        padding: 75px 0 70px;
    }

    .hero-description {
        font-size: 17px;
    }

    .section {
        padding: 65px 0;
    }

    .post-grid,
    .topic-grid,
    .archive-grid,
    .about-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .topic-card {
        padding: 30px;
    }

    .about-grid {
        gap: 30px;
    }

    .article {
        padding: 55px 0;
    }

    .article-content {
        font-size: 17px;
    }

    .footer-bottom {
        flex-direction: column;
        margin-top: 40px;
    }
}
