/* Soratide — site styles (pure CSS, design tokens in kooboo-var.css) */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-main {
    min-height: 100dvh;
}

/* ---------- shared header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border-light);
}

.site-header-inner {
    max-width: 1024px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--color-primary);
}

.nav-links {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 32px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.nav-links a {
    transition: color 0.15s ease;
}

.nav-links a:hover {
    color: var(--color-text);
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-text);
}

.mobile-menu {
    display: none;
    border-top: 1px solid var(--color-border-light);
    background: var(--color-surface);
}

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

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.mobile-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    transition: background 0.15s ease, color 0.15s ease;
}

.mobile-menu a:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }
}

/* ---------- shared footer ---------- */

.site-footer {
    border-top: 1px solid var(--color-border-light);
    background: var(--color-surface);
}

.site-footer-inner {
    max-width: 1024px;
    margin: 0 auto;
    padding: 40px 20px;
}

.footer-top {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.footer-brand {
    max-width: 320px;
}

.footer-brand-name {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
}

.footer-brand-summary {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 40px;
    font-size: 14px;
}

.footer-col-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    color: var(--color-text-secondary);
}

.footer-col li + li {
    margin-top: 8px;
}

.footer-col a {
    transition: color 0.15s ease;
}

.footer-col a:hover {
    color: var(--color-text);
}

.footer-bottom {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    color: var(--color-text-muted);
}

.footer-bottom p {
    margin: 0;
}

@media (min-width: 768px) {
    .footer-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ---------- home: post list ---------- */

.post-list {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 20px 64px;
}

.post-list-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.post-list-items li:first-child .post-item {
    padding-top: 0;
}

.post-list-items li:last-child .post-item {
    border-bottom: none;
}

.post-thumb {
    display: block;
}

.post-thumb img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.post-text {
    flex: 1;
    min-width: 0;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    color: var(--color-text-muted);
}

.post-category {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
}

.post-title {
    margin: 8px 0 0;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.post-title a {
    transition: color 0.15s ease;
}

.post-title a:hover {
    color: var(--color-primary);
}

.post-summary {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

@media (min-width: 640px) {
    .post-item {
        flex-direction: row;
        gap: 24px;
    }

    .post-thumb {
        flex: 0 0 200px;
    }

    .post-thumb img {
        height: 128px;
    }

    .post-title {
        font-size: 22px;
    }
}

/* ---------- article detail ---------- */

.article {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 20px 64px;
}

.article-title {
    margin: 16px 0 0;
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.article-byline {
    margin: 16px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
}

.article-cover {
    margin: 32px 0 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-base);
}

.article-cover img {
    width: 100%;
}

.article-body {
    margin: 40px 0 0;
    white-space: pre-line;
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-secondary);
}

.article-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    font-size: 14px;
}

.article-footer p {
    margin: 0;
    color: var(--color-text-muted);
}

.back-link {
    color: var(--color-primary);
    font-weight: 500;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: var(--color-primary-dark);
}

@media (min-width: 768px) {
    .article-title {
        font-size: 40px;
    }

    .article-footer {
        flex-direction: row;
        align-items: center;
    }
}