:root {
    --bg: #ffffff;
    --text: #3c3c43;
    --heading: #111827;
    --muted: #6b7280;
    --subtle: #9ca3af;
    --border: #e5e7eb;
    --brand: #3451b2;
    --type-scale: 0.94;
    --content-max: 68rem;
    --reading-max: 46rem;
    --font: "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", ui-sans-serif, system-ui, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    background: var(--bg);
}

body {
    margin: 0;
    padding: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: var(--font);
    font-size: calc(1rem * var(--type-scale));
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--brand);
}

img,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

code,
pre,
kbd,
samp {
    font-family: var(--mono);
}

code {
    padding: 0 0.3rem;
    border-radius: 0;
    background: rgba(148, 163, 184, 0.16);
}

pre {
    overflow-x: auto;
    padding: 1rem 1.1rem;
    border-radius: 0;
    background: rgba(148, 163, 184, 0.12);
}

.wrapper {
    width: 100%;
}

.main {
    width: min(calc(100% - 88px), var(--content-max));
    margin: 0 auto;
    padding: 0 0 88px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 58px;
    padding: 0.95rem 0 0.9rem;
    border-bottom: 1px solid transparent;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.18s ease;
}

.site-header.site-header-scrolled {
    border-bottom-color: var(--border);
}

.top {
    flex: 0 0 auto;
    min-width: 0;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    color: var(--heading);
}

.site-brand:hover .site-title {
    color: var(--brand);
}

.site-avatar {
    width: 28px;
    height: 28px;
    border-radius: 0;
}

.site-logo {
    width: 22px;
    height: 22px;
    border-radius: 0;
}

.site-title {
    font-size: calc(1rem * var(--type-scale));
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -0.02em;
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.nav-container {
    flex: 1 1 auto;
    min-width: 0;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.15rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav-item,
.nav-current,
.read-more,
.page-link,
.tag-cloud-item a,
.archive-list-item a {
    transition: color 0.2s ease;
}

.nav-item,
.nav-current {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: none;
    font-size: calc(0.92rem * var(--type-scale));
    line-height: 1.4;
    color: #5f6677;
    white-space: nowrap;
}

.nav-item:hover,
.nav-current {
    color: var(--heading);
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.nav > a:last-child {
    display: inline-flex;
    align-items: center;
    padding-left: 1rem;
    margin-left: 0.1rem;
    border-left: 1px solid var(--border);
}

.social-icon {
    width: 1.05rem;
    height: 1.05rem;
    opacity: 0.88;
}

.hero-block {
    max-width: 47rem;
    margin: 4.15rem 0 4.9rem;
    text-align: left;
}

.hero-block-compact {
    margin-top: 2.75rem;
    margin-bottom: 2.8rem;
}

.hero-caption {
    margin-bottom: 0.65rem;
    font-size: calc(0.8rem * var(--type-scale));
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--subtle);
}

.hero-caption a {
    color: inherit;
}

.hero-title {
    margin: 0;
    font-size: calc(clamp(1.75rem, 3vw, 2.35rem) * var(--type-scale));
    line-height: 1.18;
    font-weight: 650;
    letter-spacing: -0.035em;
    color: var(--heading);
}

.hero-tagline {
    margin: 0;
    color: var(--muted);
    font-size: calc(clamp(1.05rem, 1.6vw, 1.2rem) * var(--type-scale));
    line-height: 1.85;
    white-space: pre-wrap;
}

.hero-tagline p {
    margin: 0;
}

.hero-tagline-home {
    max-width: 46rem;
    font-size: calc(var(--home-hero-tagline-size, clamp(1.72rem, 2.2vw, 2.12rem)) * var(--type-scale));
    line-height: 1.46;
    font-weight: 650;
    letter-spacing: -0.035em;
    color: var(--home-hero-tagline-color, #67676c);
}

.hero-block-home {
    margin-bottom: 3.4rem;
}

.items-sol {
    display: flex;
    flex-direction: column;
}

.item-sol {
    display: flex;
    gap: 2.4rem;
    align-items: flex-start;
    padding: 2rem 0 2.3rem;
    border-bottom: 1px solid var(--border);
}

.item-side {
    flex: 0 0 11rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0.2rem;
}

.item-date {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: calc(0.9rem * var(--type-scale));
    line-height: 1.75;
    color: #7a8294;
    white-space: nowrap;
}

.item-date::before {
    content: "";
    flex: 0 0 auto;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 0;
    background: currentColor;
}

.item-main-sol {
    flex: 1 1 auto;
    min-width: 0;
}

.item-title-sol {
    margin: 0;
    font-size: calc(clamp(1.35rem, 1.6vw, 1.75rem) * var(--type-scale));
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--heading);
}

.item-title-sol a {
    color: inherit;
}

.item-title-sol a:hover {
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.item-excerpt,
.item-excerpt-fallback {
    margin-top: 0.9rem;
    max-width: 44rem;
    color: #525866;
    line-height: 1.92;
}

.item-preview-long .item-excerpt-body > :first-child,
.item-preview-long .item-excerpt > :first-child {
    margin-top: 0;
}

.item-preview-long .item-excerpt-body > :last-child,
.item-preview-long .item-excerpt > :last-child {
    margin-bottom: 0;
}

.item-preview-long pre {
    display: none;
}

.item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.05rem;
}

.inline-tags,
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: calc(0.9rem * var(--type-scale));
}

.inline-tag,
.tag-item {
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    color: var(--muted);
    font-size: calc(0.95rem * var(--type-scale));
}

.read-more {
    color: var(--brand);
    white-space: nowrap;
    margin-left: auto;
}

.read-more:hover {
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.post-shell {
    max-width: 44rem;
    margin: 3rem auto 0;
}

.post-title {
    margin: 0 0 1rem;
    font-size: calc(clamp(2rem, 3.2vw, 2.8rem) * var(--type-scale));
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--heading);
}

.post-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--muted);
}

.post-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-meta .date {
    font-size: calc(0.95rem * var(--type-scale));
}

.post-flags {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.post-flag {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.14rem 0.48rem;
    border: 1px solid var(--border);
    color: #657082;
    font-size: calc(0.78rem * var(--type-scale));
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.post-content {
    color: var(--text);
    font-size: calc(1rem * var(--type-scale));
    line-height: 1.95;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 1.9rem 0 0.8rem;
    line-height: 1.25;
    color: var(--heading);
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content blockquote {
    margin: 0.9rem 0;
}

.post-content a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.post-content img,
.item-excerpt img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

.post-content blockquote {
    padding-left: 1rem;
    border-left: 2px solid var(--border);
    color: var(--muted);
}

.audio-container,
.video-container {
    margin: 1rem 0 1.25rem;
}

.audio,
.video {
    width: 100%;
}

.tag-cloud,
.archive-list {
    display: flex;
    flex-direction: column;
}

.tag-cloud-grouped {
    gap: 1.9rem;
}

.tag-group-section {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.tag-group-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tag-group-title {
    margin: 0;
    font-size: calc(1.05rem * var(--type-scale));
    line-height: 1.3;
    font-weight: 700;
    color: var(--heading);
}

.tag-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    padding-top: 0.45rem;
    padding-inline: clamp(0.7rem, 2vw, 1rem);
}

.tag-cloud-item {
    display: block;
    width: fit-content;
    margin: 0;
    padding: 0;
    border: 0;
}

.archive-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.tag-cloud-item a {
    display: inline;
    padding-bottom: 0.08rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

.tag-cloud-item-label {
    display: inline;
    white-space: nowrap;
}

.archive-list-item a {
    font-weight: 500;
}

.tag-cloud-item-count,
.archive-item-date,
.archive-list-header,
.pages-info {
    color: var(--muted);
    font-size: calc(0.9rem * var(--type-scale));
}

.tag-cloud-item-count {
    display: inline;
    font-size: calc(0.82rem * var(--type-scale));
    letter-spacing: 0.01em;
}

.archive-list-header {
    margin-top: 1.25rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border);
    font-size: calc(0.78rem * var(--type-scale));
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pages-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    color: var(--muted);
    font-size: calc(0.9rem * var(--type-scale));
}

.page-link {
    color: var(--muted);
}

.page-link:hover {
    color: var(--brand);
}

.page-link-disabled {
    opacity: 0.35;
}

#footer {
    display: none;
}

@media (max-width: 767px) {
    .main {
        width: min(calc(100% - 28px), var(--content-max));
    }

    .site-header {
        position: static;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.75rem 0 0.8rem;
    }

    .nav {
        justify-content: flex-start;
        gap: 0.85rem;
    }

    .hero-block {
        margin-top: 2rem;
        margin-bottom: 2.4rem;
    }

    .hero-tagline-home {
        font-size: calc(1.4rem * var(--type-scale));
        line-height: 1.5;
    }

    .item-sol {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 0;
    }

    .item-side {
        flex: none;
        width: 100%;
        gap: 0.85rem;
    }

    .item-date {
        font-size: calc(0.85rem * var(--type-scale));
    }

    .item-title-sol {
        font-size: calc(1.25rem * var(--type-scale));
    }

    .item-meta {
        align-items: flex-start;
    }

    .post-meta-row {
        align-items: flex-start;
    }

    .item-actions {
        margin-left: 0;
    }

    .read-more {
        margin-left: 0;
    }

    .post-shell {
        margin-top: 2.5rem;
    }

    .post-title {
        font-size: calc(1.8rem * var(--type-scale));
    }
}
