:root {
  --accent: #2f6b4f;
  --accent-soft: #e8f0ea;
  --bg: #f7f5f0;
  --ink: #24211d;
  --muted: #8a8178;
  --line: #e6e0d6;
  --card: #fffdf9;
}

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

[v-cloak] { display: none; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
}

.page { max-width: 960px; margin: 0 auto; padding: 56px 28px 48px; }
.page.narrow { max-width: 720px; }

/* ---------- 展示页 ---------- */
.hero { display: flex; gap: 32px; align-items: center; padding-bottom: 40px; border-bottom: 1px solid var(--line); }

.avatar {
  width: 112px; height: 112px; border-radius: 50%;
  overflow: hidden; flex: 0 0 112px;
  background: var(--accent-soft); border: 3px solid #fff;
  box-shadow: 0 8px 24px rgba(47, 107, 79, 0.15);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.fallback {
  display: grid; place-items: center;
  font-size: 44px; font-weight: 700; color: #fff; background: var(--accent);
}

.hero h1 { font-size: 34px; letter-spacing: 1px; }
.hero .title { color: var(--accent); font-weight: 600; margin-top: 4px; }
.hero .school { color: var(--muted); font-size: 14px; }
.hero .bio { margin-top: 12px; font-size: 15px; max-width: 560px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px; border-radius: 999px; font-size: 14px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}
.btn.primary { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(47, 107, 79, 0.25); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(47, 107, 79, 0.35); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }

section { padding: 36px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: none; }
section h2 { font-size: 19px; margin-bottom: 18px; }
section h2::before { content: '— '; color: var(--accent); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  background: var(--card); border: 1px solid var(--line);
  padding: 7px 18px; border-radius: 999px; font-size: 13px;
}

.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px; transition: transform 0.15s ease;
}
.project:hover { transform: translateY(-3px); }
.project h3 { font-size: 16px; margin-bottom: 8px; }
.project p { font-size: 13px; color: var(--muted); }
.project .tech { margin-top: 10px; color: var(--accent); font-size: 12px; }
.project a { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--accent); text-decoration: none; }

footer { padding-top: 32px; color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- 管理页 ---------- */
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.admin-head h1 { font-size: 24px; }
.admin-head a { color: var(--accent); text-decoration: none; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; margin-bottom: 24px; }

form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
form input[type="text"], form input:not([type]), form textarea {
  display: block; width: 100%; margin-top: 6px;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); font-family: inherit; font-size: 14px; color: var(--ink);
}
form input:focus, form textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 18px; }
fieldset legend { padding: 0 10px; font-size: 14px; color: var(--ink); }

.project-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; border: 1px dashed var(--line); border-radius: 10px; margin-bottom: 12px; }
.project-edit input { margin-top: 4px; }
.project-edit .wide { grid-column: 1 / -1; }

.file-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.file-row input[type="file"] { font-size: 13px; }

.preview { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

.tip { margin-top: 14px; color: var(--accent); font-size: 13px; }

.small-btn { padding: 6px 14px; font-size: 12px; }

@media (max-width: 720px) {
  .hero { flex-direction: column; text-align: center; }
  .hero .bio { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  .projects { grid-template-columns: 1fr; }
  .project-edit { grid-template-columns: 1fr; }
}
