/* MM personal homepage — minimal business */

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --line: #ececec;
  --soft: #fafafa;
  --accent: #1a1a1a;
  --link: #1a1a1a;
  --max: 760px;
  --radius: 4px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font: 16px/1.7 var(--font);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--link); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.15s; }
a:hover { border-bottom-color: var(--fg); }

/* ===== topnav ===== */
.topnav {
  position: sticky; top: 0;
  background: rgba(255,255,255,0.94);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 24px;
  z-index: 10;
  font-size: 0.95rem;
}
.topnav .brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--fg);
  border-bottom: none;
  flex-shrink: 0;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--fg); color: #fff;
  font-size: 0.78rem; letter-spacing: 0.5px; font-weight: 700;
}
.brand-name { font-size: 0.98rem; }
.topnav .links {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  margin-left: auto;
}
.topnav .links a {
  color: var(--muted); border-bottom: none;
  font-size: 0.92rem; padding: 4px 0;
  transition: color 0.15s;
}
.topnav .links a:hover { color: var(--fg); }
.topnav .links a.active { color: var(--fg); }

/* ===== main ===== */
main { max-width: var(--max); margin: 0 auto; padding: 40px 24px 80px; }

/* ===== hero ===== */
.hero { padding: 40px 0 48px; border-bottom: 1px solid var(--line); margin-bottom: 56px; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--fg); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.3rem; margin-bottom: 20px;
  letter-spacing: 1.5px;
  user-select: none;
}
.hero h1 { font-size: 2.4rem; font-weight: 700; margin: 0 0 10px; letter-spacing: -0.5px; line-height: 1.15; }
.subtitle { font-size: 1.1rem; color: var(--muted); margin: 0 0 8px; }
.meta { font-size: 0.95rem; color: var(--muted); margin: 0; }
.meta a { color: var(--muted); }
.meta a:hover { color: var(--fg); }

/* ===== blocks ===== */
.block { margin-bottom: 56px; scroll-margin-top: 80px; }
.block h2 {
  font-size: 0.78rem; font-weight: 700; margin: 0 0 20px;
  color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase;
}

#about-content p { margin: 0 0 14px; }
#about-content p:last-child { margin-bottom: 0; }
.block-extra { margin-top: 36px; }
.block-extra .timeline { margin-bottom: 24px; }
.block-extra .tags { margin-top: 24px; }

/* ===== timeline ===== */
.timeline { position: relative; padding-left: 22px; border-left: 2px solid var(--line); }
.timeline-item { position: relative; margin-bottom: 26px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: -27px; top: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--fg);
}
.timeline-period { font-size: 0.82rem; color: var(--muted); font-family: var(--mono); letter-spacing: 0.3px; }
.timeline-role { font-weight: 600; margin: 4px 0 2px; font-size: 1.02rem; }
.timeline-org { color: var(--muted); font-size: 0.95rem; margin-bottom: 4px; }
.timeline-desc { color: var(--fg); font-size: 0.95rem; line-height: 1.6; }

/* ===== tags ===== */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 20px;
  font-size: 0.85rem; color: var(--fg); background: var(--soft);
}

/* ===== writing list (按分类) ===== */
.cat-list .writing-item { padding: 18px 0; border-bottom: 1px solid var(--line); }
.cat-list .writing-item:first-child { padding-top: 0; }
.cat-list .writing-item:last-child { border-bottom: none; padding-bottom: 0; }
.writing-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 4px; font-family: var(--mono); letter-spacing: 0.3px; }
.writing-title { font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; line-height: 1.4; }
.writing-title a { color: var(--fg); border-bottom: none; }
.writing-title a:hover { color: var(--fg); border-bottom: 1px solid var(--fg); }
.writing-excerpt { color: var(--muted); font-size: 0.93rem; line-height: 1.55; }

/* ===== today ===== */
#today-content .quote {
  font-size: 1.1rem; font-weight: 500; margin: 0 0 14px;
  padding: 4px 0 4px 16px; border-left: 3px solid var(--fg);
  line-height: 1.6;
}
#today-content .note { color: var(--fg); margin: 0 0 14px; }
#today-content .todo {
  background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; font-size: 0.95rem; margin: 0;
}
#today-content .todo-label { font-weight: 700; font-size: 0.72rem; color: var(--muted); margin: 0 0 6px; letter-spacing: 1.5px; text-transform: uppercase; }
#today-content .date { font-family: var(--mono); font-size: 0.82rem; color: var(--muted); margin: 0 0 12px; letter-spacing: 0.3px; }

/* ===== contact ===== */
.contact p { margin: 0 0 6px; }
.muted { color: var(--muted); }

/* ===== footer ===== */
footer {
  border-top: 1px solid var(--line); padding: 24px; text-align: center;
  color: var(--muted); font-size: 0.85rem;
}
footer p { margin: 0; }

/* ===== mobile ===== */
@media (max-width: 720px) {
  .topnav { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .topnav .brand { gap: 6px; }
  .brand-name { display: none; }
  .topnav .links {
    width: 100%;
    gap: 14px;
    margin-left: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .topnav .links::-webkit-scrollbar { display: none; }
  .topnav .links a { white-space: nowrap; font-size: 0.88rem; }
  main { padding: 20px 16px 60px; }
  .hero { padding: 24px 0 32px; margin-bottom: 36px; }
  .hero h1 { font-size: 1.85rem; }
  .avatar { width: 56px; height: 56px; font-size: 1.05rem; margin-bottom: 16px; }
  .block { margin-bottom: 40px; }
  .block h2 { font-size: 0.72rem; margin-bottom: 16px; }
  .timeline { padding-left: 18px; }
  .timeline-item::before { left: -23px; width: 8px; height: 8px; }
  .block-extra { margin-top: 28px; }
}
