/* ============================================================
   mentarium —— 视觉规范
   极简主义：黑白为主，深蓝（--blue）为辅
   分割只用 1px 细黑线，不用色块拼接
   中文：楷体（KaiTi）；英文：Times New Roman
   ============================================================ */

:root {
  --ink: #141414;        /* 主色：近黑 */
  --paper: #ffffff;      /* 底色：白 */
  --blue: #16325c;       /* 辅色：深蓝 */
  --gray: #6b6b6b;       /* 次要文字 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  /* Times New Roman 不含中文字形，中文会自动落到楷体 */
  font-family: "Times New Roman", "KaiTi", "STKaiti", "楷体", serif;
  font-size: 16px;
  line-height: 1.9;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1040px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- 页眉 ---------- */
.site-header { border-bottom: 1px solid var(--ink); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand { font-size: 22px; letter-spacing: 4px; }
.brand a { color: var(--ink); }
.brand a:hover { text-decoration: none; }
.nav { display: flex; align-items: center; }
.nav a, .nav button {
  margin-left: 26px;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav a:hover, .nav button:hover { color: var(--blue); text-decoration: none; }

/* ---------- 首页大图与欢迎语 ---------- */
.hero { padding: 0; border-bottom: none; }
.hero img { width: 100%; max-height: 72vh; object-fit: cover; }
.welcome {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  text-align: center;
  padding: 26px 16px;
  font-size: 26px;
  letter-spacing: 6px;
}

/* ---------- 板块（细黑线分割） ---------- */
section { padding: 56px 0; border-bottom: 1px solid var(--ink); }
.sec-title {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 8px;
  color: var(--blue);
  text-align: center;
  margin-bottom: 32px;
}

/* ---------- 文章列表 ---------- */
.post-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--ink);
}
.post-item:last-child { border-bottom: none; }
.post-title { font-size: 19px; }
.post-meta { color: var(--gray); font-size: 14px; margin-top: 2px; letter-spacing: 1px; }

/* ---------- 作品两栏 ---------- */
.works-grid { display: grid; grid-template-columns: 1fr 1fr; }
.work-col { padding: 0 28px; }
.work-col:first-child { border-right: 1px solid var(--ink); }
.work-col h3 {
  text-align: center;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 6px;
  color: var(--blue);
  margin-bottom: 24px;
}
.work-item { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--ink); }
.work-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.work-item img { width: 100%; }
.work-title { margin-top: 10px; font-size: 17px; }
.work-desc { color: var(--gray); font-size: 14px; margin-top: 2px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 6px 20px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 2px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; text-decoration: none; }
.btn.small { padding: 3px 14px; font-size: 13px; }

/* ---------- 文章 / 介绍 正文页 ---------- */
.article-head { text-align: center; padding: 44px 0 30px; border-bottom: 1px solid var(--ink); }
.article-head h1 { font-weight: 400; font-size: 26px; letter-spacing: 2px; }
.article-head .meta { color: var(--gray); margin-top: 10px; font-size: 14px; letter-spacing: 1px; }
.article-body { padding: 40px 0 56px; }
.article-body p { margin: 0 0 1.2em; text-indent: 2em; }

/* ---------- 表单（开发者页面与弹窗共用） ---------- */
label { display: block; font-size: 14px; color: var(--gray); margin: 16px 0 6px; letter-spacing: 1px; }
input[type="text"], input[type="password"], textarea, select {
  width: 100%;
  border: 1px solid var(--ink);
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 15px;
}
input[type="file"] { font-family: inherit; font-size: 14px; }
textarea { resize: vertical; min-height: 140px; line-height: 1.7; }
.hint { color: var(--gray); font-size: 13px; margin: 10px 0; min-height: 20px; }

.dev-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--ink);
}
.dev-list-item:last-child { border-bottom: none; }
.tag {
  display: inline-block;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-size: 12px;
  padding: 0 8px;
  margin-right: 8px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.preview-img { max-width: 300px; border: 1px solid var(--ink); margin-top: 6px; }

/* ---------- 登录弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  border: 1px solid var(--ink);
  padding: 32px 36px;
  width: min(400px, 90vw);
}
.modal h3 {
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 4px;
  color: var(--blue);
  text-align: center;
  margin-bottom: 18px;
}
.modal input { width: 100%; margin-bottom: 6px; }
.modal .row { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.form-err { color: var(--blue); font-size: 14px; min-height: 22px; text-align: center; }

/* ---------- 其他 ---------- */
.empty { color: var(--gray); text-align: center; padding: 24px 0; }
footer { padding: 36px 0; text-align: center; color: var(--gray); font-size: 14px; letter-spacing: 2px; }

@media (max-width: 760px) {
  .works-grid { grid-template-columns: 1fr; }
  .work-col { padding: 0; }
  .work-col:first-child { border-right: none; border-bottom: 1px solid var(--ink); padding-bottom: 40px; margin-bottom: 40px; }
  .welcome { font-size: 20px; letter-spacing: 3px; }
  .site-header .wrap { flex-direction: column; gap: 10px; }
}
