/* style.css */

/* === Variables === */
:root {
    --text-color: #cdd1d7;
    --bg-color: #1A1A1A;
    --link-color: #8fb3d1;
    --muted-color: #959aa1;
    --border-color: #36383c;
}

/* === Base === */
* {
    box-sizing: border-box;
}

html {
    background-color: var(--bg-color);
}

body {
    margin: 0;
    font-family: 'Ubuntu', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 18px;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.6;

    -webkit-text-stroke: 0.25px currentColor;
}

a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: var(--muted-color);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

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

/* 图片链接：下划线只画文字部分，图片与下划线无关 */
a:has(img) {
    text-decoration: none;
}

a:has(img) span {
    text-decoration: underline;
    text-decoration-color: var(--muted-color);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:has(img):hover span {
    text-decoration-color: var(--link-color);
}

/* === Layout === */
.page-content {
    width: 45%;
    max-width: 760px;
    margin: 0 auto;
}

.site-title {
    margin: 0.4em 0 0.2em;
    font-family: 'Ubuntu', sans-serif;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

nav ul {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-bottom: 20px;
}

nav li+li::before {
    content: '•';
    color: var(--muted-color);
    margin: 0 0.6em;
}

/* 导航小图标（图文混排） */
.nav-icon {
    height: 1.1em;
    vertical-align: -0.2em;
    margin-right: 0.35em;
    margin-left: 0.35em;
}

/* === 页面标题（frontmatter .title） === */
.page-title {
    font-size: 26px;
    line-height: 1.3;
    margin: 0.8em 0 0.4em;
}

/* 页面元信息（日期等） */
.date {
    font-size: 0.9em;
    color: var(--muted-color);
    margin: 0 0 1.2em;
}

/* 分隔线统一为虚线 */
hr {
    border: none;
    border-top: 1px dashed var(--border-color);
}

footer {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer hr {
    width: 100%;
}

/* 版权信息 */
.copyright {
    margin: 1.2em 0;
    font-size: 0.85em;
    letter-spacing: 0.5px;
    color: var(--muted-color);
}

/* === Responsive === */
@media (max-width: 768px) {
    .page-content {
        width: 100%;
        max-width: none;
        padding: 0 16px;
    }

    nav li+li::before {
        content: none;
    }

    nav ul {
        gap: 8px 16px;
    }
}