/* =========================================================
   蔡云帆 · Evan —— 极简一页
   只有名字和邮箱，别的一概不放。
   ========================================================= */
:root {
  --paper: #f6f4ef;
  --ink: #14140f;
  --muted: #8b877c;
  --line: #d9d4c7;
  --accent: #1f6f5c;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 背景淡淡的斜纹纸感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(20, 20, 15, 0.022) 0 1px,
    transparent 1px 9px
  );
}

.board {
  position: relative;
  text-align: center;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 英文名：小字、宽字距 */
.roman {
  margin: 0 0 14px;
  font-size: clamp(0.66rem, 1.6vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.6em;
  text-transform: uppercase;
  color: var(--muted);
  /* 字距让末尾多出一个空格，往左挪回来才真正居中 */
  margin-right: -0.6em;
}

/* 中文名：主角 */
.name {
  margin: 0;
  font-size: clamp(3.2rem, 13vw, 7.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* 联系方式区块 */
.contact {
  margin-top: clamp(30px, 5.5vh, 52px);
}

/* 「联系方式」标签 */
.label {
  margin: 0 0 14px;
  font-size: clamp(0.72rem, 1.7vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--muted);
  /* 同上：抵消字距造成的右侧空白 */
  margin-right: -0.32em;
}

/* 邮箱 */
.mail {
  display: inline-block;
  padding-bottom: 3px;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.25s, border-color 0.25s;
}

.mail:hover,
.mail:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.mail:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 2px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .board { animation: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14140f;
    --ink: #f2efe6;
    --muted: #8b877c;
    --line: #3a3830;
    --accent: #6fc7a8;
  }
  body::before {
    background-image: repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 9px
    );
  }
}
