:root {
  color-scheme: light;
  --canvas: #eaf4fa;
  --surface: rgba(255, 255, 255, .45);
  --surface-strong: rgba(255, 255, 255, .65);
  --ink: #1e2832;
  --muted: #536471;
  --line: rgba(35, 60, 80, .08);
  --accent: #3a6888;
  --accent-soft: rgba(58, 104, 136, .1);
  --shadow: rgba(25, 45, 60, .06);
  --display-serif: "Songti SC", "STSong", "SimSun", ui-serif, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #080c16;
  --surface: rgba(14, 22, 38, .52);
  --surface-strong: rgba(20, 30, 52, .68);
  --ink: #ecf1f7;
  --muted: #a7b5c6;
  --line: rgba(255, 255, 255, .07);
  --accent: #b6d3e9;
  --accent-soft: rgba(142, 183, 214, .12);
  --shadow: rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { min-width: 0; background: var(--canvas); }
body {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100svh;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background: var(--canvas);
  font: 400 16px/1.7 var(--sans);
}
main { position: relative; z-index: 1; display: flex; flex: 1; min-height: 0; }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; max-width: 100%; }

.identity-hero {
  flex: 1;
  width: 100%;
  min-height: 0;
  padding: 0 1rem 1.15rem;
  display: grid;
  grid-template-rows: minmax(2rem, 1fr) auto minmax(2rem, 1fr) auto;
  justify-items: center;
  text-align: center;
}
.identity-mark { grid-row: 2; display: flex; flex-direction: column; align-items: center; }
.identity-portrait {
  width: 5.25rem;
  height: 5.25rem;
  object-fit: cover;
  border: 2px solid color-mix(in srgb, var(--surface-strong) 88%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--accent) 10%, transparent),
    0 .8rem 2.35rem color-mix(in srgb, var(--shadow) 86%, transparent);
}
.identity-hero h1 {
  margin: 1.2rem 0 0;
  font-size: clamp(1.95rem, 2.7vw, 2.3rem);
  line-height: 1.22;
  letter-spacing: -.03em;
  font-weight: 515;
  color: var(--accent);
}
.home-wind-trace { width: 7.4rem; height: 1.2rem; margin-top: 1rem; opacity: .67; }
.home-wind-trace svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; }
.home-wind-trace path + path { opacity: .52; stroke-width: .65; }
.home-date { min-height: 1.4em; margin-top: .38rem; color: var(--muted); font-size: .75rem; line-height: 1.4; letter-spacing: .13em; }
.home-date:empty { visibility: hidden; }

.profile-links { grid-row: 4; display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem; }
.profile-links a {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 50%;
  transition: color 180ms ease, transform 180ms cubic-bezier(.22, 1, .36, 1);
}
.profile-links a::before {
  content: "";
  position: absolute;
  inset: .18rem;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 50%;
  transition: border-color 180ms ease, background-color 180ms ease;
}
.profile-links a::after {
  content: attr(data-profile-label);
  position: absolute;
  z-index: 2;
  top: calc(100% + .42rem);
  left: 50%;
  padding: .16rem .48rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-strong);
  box-shadow: 0 .35rem 1rem var(--shadow);
  font-size: .65rem;
  line-height: 1.45;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -.18rem);
  transition: opacity 150ms ease, transform 180ms cubic-bezier(.22, 1, .36, 1);
}
.profile-links svg {
  position: relative;
  z-index: 1;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}
.profile-links .profile-icon-netease { width: 1.02rem; height: 1.02rem; stroke-width: 1.32; }
.profile-links .profile-icon-bilibili { width: 1.05rem; height: 1.05rem; }
@media (hover: hover) {
  .profile-links a:hover { color: var(--accent); transform: translateY(-1px); }
  .profile-links a:hover::before { border-color: var(--accent); background: var(--accent-soft); }
  .profile-links a:hover::after { opacity: 1; transform: translate(-50%, 0); }
}
@media (hover: none) { .profile-links a:not(:focus-visible)::after { display: none; } }
.profile-links a:focus-visible { color: var(--accent); }
.profile-links a:focus-visible::before { border-color: var(--accent); background: var(--accent-soft); }
.profile-links a:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 47.5rem) {
  .identity-portrait { width: 4.75rem; height: 4.75rem; }
  .identity-hero h1 { font-size: 1.85rem; }
  .identity-hero { padding-bottom: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .confirmed-ambient * { animation: none !important; }
}
