@font-face {
  font-family: "Matrix Heading";
  src: url("assets/fonts/noto-serif-sc-heading.woff2") format("woff2");
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #faf8f3;
  --ink: #302624;
  --red: #8f222b;
  --gold: #a98446;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  border-top: 4px solid var(--red);
}

.matrix {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: calc(100vh - 4px);
  min-height: calc(100svh - 4px);
  flex-direction: column;
  align-items: center;
  padding-bottom: 180px;
  background: radial-gradient(ellipse at center top, #fffefc, transparent 630px);
}

.matrix::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url("assets/chifeng-landscape.webp") center bottom / max(100%, 760px) auto no-repeat;
  mask-image: linear-gradient(to bottom, transparent 48%, #0008 78%, #000 94%);
  content: "";
  pointer-events: none;
}

.heading {
  width: min(100% - 36px, 666px);
  padding-top: clamp(36px, 5vw, 65px);
  text-align: center;
}

.heading h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--red);
  font-family: "Matrix Heading", "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  font-size: clamp(26px, 9vw, 68px);
  font-weight: 900;
  letter-spacing: .1em;
  line-height: 1.25;
  white-space: nowrap;
}

.heading-prefix {
  display: flex;
  align-items: center;
  gap: clamp(9px, 3vw, 19px);
}

.heading-prefix::before,
.heading-prefix::after {
  width: clamp(16px, 5vw, 46px);
  height: 1px;
  background: var(--gold);
  content: "";
}

.heading-title {
  padding-inline-start: .1em;
}

.gold-rule {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(68%, 326px);
  margin: 17px auto 0;
}

.gold-rule::before,
.gold-rule::after {
  flex: 1;
  height: 1px;
  content: "";
  background: linear-gradient(to right, #d9c8a700, var(--gold));
}

.gold-rule::after {
  transform: scaleX(-1);
}

.gold-rule span {
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.accounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
  width: min(100% - 36px, 650px);
  margin: 32px 0 18px;
  padding: 0;
  list-style: none;
  text-align: center;
}

.account {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  padding: 6px 2px 8px;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.account-avatar {
  display: block;
  width: 79px;
  height: auto;
  aspect-ratio: 1;
  border: 1px solid #e9e0d5;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px #452a1c17;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.account-name {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.account-name-part {
  white-space: nowrap;
}

@media (hover: hover) {
  .account:hover {
    color: var(--red);
  }

  .account:hover .account-avatar {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px #6c30232e;
  }
}

.account:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}


@media (max-width: 560px) {
  .matrix {
    padding-bottom: 138px;
  }

  .heading {
    padding-top: 33px;
  }

  .gold-rule {
    margin-top: 17px;
  }

  .accounts {
    width: min(100% - 24px, 430px);
    gap: 11px 4px;
    margin: 19px 0 12px;
  }

  .account {
    gap: 7px;
    font-size: clamp(11px, 3.08vw, 12px);
    padding: 4px 1px 7px;
  }

  .account-avatar {
    width: clamp(52px, 16vw, 69px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-avatar {
    transition: none;
  }
}
