/* Base */
:root {
    --bg: #ffffff;
    --text: #0f172a;
    --muted: #6b7280;
    --border: #e5e7eb;
    --accent: #111827;
    --pill: #f1f5f9;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Space Mono', monospace;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: 90%;
    max-width: 980px;
    margin: 0 auto;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 18px 0;
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    height: 36px;
    width: auto;
}

nav a {
    margin-left: 16px;
    font-size: 14px;
}

/* Hero */
.hero {
    padding: 40px 0 40px;
}

.eyebrow {
    display: inline-block;
    letter-spacing: 2px;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

h1, h2, h3 {
    margin: 6px 0 12px;
    line-height: 1.25;
}

/* 打字机效果 - 固定最小高度防止跳动 */
.typewriter {
    display: block;
    min-height: 2.5em; /* 预留两行空间 */
}

/* 内联光标样式 */
.cursor {
    display: inline;
    border-right: 2px solid var(--text);
    margin-left: 1px;
    animation: caret 0.9s steps(1) infinite;
}

.cursor.hidden {
    border-color: transparent;
}

@keyframes caret {
    50% { opacity: 0; }
}

p {
    margin: 0 0 16px;
}

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

.button {
    padding: 10px 16px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-weight: 700;
}

.button.primary {
    background: var(--accent);
    color: #fff;
}

.button.ghost {
    background: transparent;
}

/* Grid panels */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 30px 0 10px;
}

.panel {
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 10px;
}

/* Lists */
.page-header {
    padding: 40px 0 16px;
}

.list {
    display: grid;
    gap: 14px;
    margin-bottom: 40px;
}

.card {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.card-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    align-items: stretch;
}

.card-image {
    width: 100%;
    height: 100%;
    min-height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--pill);
    border: 1px solid var(--border);
}

.muted {
    color: var(--muted);
    margin-bottom: 12px;
}

/* Detail */
.detail {
    padding: 30px 0 60px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.detail-image {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.markdown {
    max-width: 85%;
    margin: 0 auto;
    font-family: "Iowan Old Style", "Iowan Old Style Roman", "Times New Roman", Times, serif;
}


.markdown h1 {
    font-size: 1.5em;
    font-style: italic;
}

.markdown h2 {
    font-size: 1.2em;
}

.markdown h3 {
    font-size: 1.1em;
}

.markdown a {
    text-decoration: underline;
}

.markdown .bv-toc a,
.bv-toc a,
.bv-toc-link {
    text-decoration: none !important;
}

.markdown img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.markdown pre {
    background: #272822; /* Monokai */
    color: #f8f8f2;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #3e3d32;
    overflow: auto;
}

.markdown code {
    background: #2d2a2e; /* Monokai inline */
    color: #f8f8f2;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #3e3d32;
}

.markdown pre code {
    background: transparent;
    border: none;
}

.back-link {
    margin-top: 24px;
}

/* CTA */
.cta {
    margin: 40px 0 60px;
    padding: 20px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-actions {
    display: flex;
    gap: 10px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 16px 0 24px;
    color: var(--muted);
    font-size: 13px;
    margin-top: 40px;
}
.site-footer .container {
    text-align: center;
}

@media (max-width: 640px) {
    nav a { margin-left: 10px; }
    .hero { padding-top: 40px; }
    .card-row { grid-template-columns: 1fr; }
    .detail-hero { grid-template-columns: 1fr; }
}
