:root {
  --bg: #fffaf1;
  --ink: #1e1f1c;
  --muted: #6d6a61;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: #ffffff;
  --line: #24231f;
  --soft-line: #ded6c8;
  --accent: #ff759f;
  --accent-2: #4bb8ff;
  --accent-3: #ffd36a;
  --shadow: rgba(36, 35, 31, 0.14);
  --pixel: 4px;
  color-scheme: light;
}

body.is-dark {
  --bg: #17191f;
  --ink: #f6f1e7;
  --muted: #bcb4a4;
  --panel: rgba(35, 38, 48, 0.82);
  --panel-strong: #242833;
  --line: #f6f1e7;
  --soft-line: #3f4452;
  --accent: #ff82ad;
  --accent-2: #66c9ff;
  --accent-3: #ffe08a;
  --shadow: rgba(0, 0, 0, 0.34);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui,
    sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(90deg, rgba(255, 117, 159, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(75, 184, 255, 0.08) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

.page-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 30px 18px 56px;
}

.hero {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 620px;
  padding-top: 4px;
  overflow: hidden;
}

.notice {
  z-index: 1;
  max-width: min(100%, 640px);
  margin: 0 auto 48px;
  color: var(--muted);
  font-size: clamp(14px, 2.6vw, 16px);
  line-height: 1.7;
  text-align: center;
}

.notice strong {
  color: var(--accent-2);
}

.theme-toggle {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 10;
  width: 34px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.theme-toggle__screen {
  position: absolute;
  inset: 5px 6px 8px;
  border: 2px solid var(--muted);
  border-radius: 2px;
}

.theme-toggle__screen::after {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 10px;
  height: 2px;
  content: "";
  background: var(--muted);
  transform: translateX(-50%);
  box-shadow: 0 3px 0 var(--muted);
}

.pixel-cloud {
  position: absolute;
  width: 96px;
  height: 48px;
  opacity: 0.48;
  background:
    linear-gradient(var(--panel-strong), var(--panel-strong)) 12px 20px / 72px
      20px no-repeat,
    linear-gradient(var(--panel-strong), var(--panel-strong)) 28px 8px / 28px
      12px no-repeat,
    linear-gradient(var(--panel-strong), var(--panel-strong)) 56px 12px / 24px
      12px no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.06));
}

.cloud-left {
  top: 132px;
  left: 0;
}

.cloud-right {
  top: 94px;
  right: 18px;
}

.profile {
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(100%, 540px);
}

.avatar-frame {
  width: clamp(132px, 33vw, 184px);
  aspect-ratio: 1;
  padding: 8px;
  background:
    linear-gradient(45deg, var(--accent), transparent 38%),
    linear-gradient(135deg, transparent 58%, var(--accent-2)),
    var(--panel-strong);
  border: 3px solid var(--line);
  border-radius: 28px;
  box-shadow:
    8px 8px 0 var(--line),
    0 18px 42px var(--shadow);
  image-rendering: pixelated;
  transform: rotate(-1deg);
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  image-rendering: pixelated;
}

.domain {
  margin: 28px 0 6px;
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 800;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

h1 {
  font-size: clamp(42px, 11vw, 72px);
  line-height: 1;
  text-shadow:
    4px 0 0 rgba(255, 117, 159, 0.36),
    -4px 0 0 rgba(75, 184, 255, 0.3);
}

.tagline {
  max-width: min(100%, 480px);
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(16px, 4vw, 20px);
  line-height: 1.7;
  text-align: center;
}

.uptime-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 520px);
  margin-top: 22px;
  padding: 14px 16px;
  gap: 16px;
  border: 2px solid var(--soft-line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 5px 5px 0 rgba(36, 35, 31, 0.08);
}

.uptime-card__copy {
  display: grid;
  gap: 4px;
  min-width: 116px;
  text-align: left;
}

.stat-label {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.uptime-card time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.uptime-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(48px, 1fr));
  gap: 8px;
  width: min(100%, 300px);
}

.uptime-grid span {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 5px;
  border: 2px solid var(--soft-line);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(75, 184, 255, 0.14), transparent 45%),
    var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.uptime-grid strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.visitor-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin-top: 12px;
  padding: 4px 10px;
  gap: 7px;
  border: 2px solid var(--soft-line);
  border-radius: 999px;
  background: var(--panel-strong);
  box-shadow: 3px 3px 0 rgba(36, 35, 31, 0.08);
}

.visitor-card strong {
  color: var(--accent-2);
  font-size: 15px;
  line-height: 1;
  text-shadow: 1px 0 0 rgba(255, 117, 159, 0.2);
}

.visitor-card span:last-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.visitor-card .stat-label {
  font-size: 12px;
}

.visitor-card.is-loading strong {
  color: var(--muted);
}

.link-panel {
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: min(100%, 680px);
  margin-top: 42px;
  padding: 22px;
  gap: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 40px var(--shadow);
  backdrop-filter: blur(14px);
}

.pill-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px 8px 10px;
  gap: 10px;
  border: 2px solid var(--soft-line);
  border-radius: 999px;
  background: var(--panel-strong);
  font-size: 15px;
  font-weight: 800;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.pill-link:hover,
.pill-link:focus-visible {
  border-color: var(--line);
  box-shadow: 4px 4px 0 var(--line);
  transform: translate(-2px, -2px);
  outline: none;
}

.icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 7px;
  background: var(--accent-3);
  font-size: 14px;
  font-weight: 900;
}

.icon svg {
  width: 15px;
  height: 15px;
}

.icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pill-link:nth-child(3) .icon path {
  fill: currentColor;
  stroke: none;
}

.icon-bili {
  background: var(--accent);
  color: #fff;
}

.content-section {
  margin-top: 24px;
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 40px var(--shadow);
  backdrop-filter: blur(14px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-heading p {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-heading h2 {
  font-size: clamp(22px, 5vw, 30px);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  min-height: 170px;
  padding: 18px;
  border: 2px solid var(--soft-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 211, 106, 0.2), transparent 45%),
    var(--panel-strong);
}

.project-card__status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 22px;
  padding: 2px 10px;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--accent-3);
  font-size: 12px;
  font-weight: 900;
}

.project-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.project-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

@media (max-width: 760px) {
  .page-shell {
    padding-inline: 14px;
  }

  .hero {
    min-height: 580px;
  }

  .notice {
    margin-bottom: 34px;
  }

  .link-panel {
    padding: 16px;
  }

  .uptime-card {
    align-items: stretch;
    flex-direction: column;
    width: min(100%, 360px);
  }

  .uptime-card__copy {
    text-align: center;
  }

  .uptime-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 144px;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    margin-top: 4px;
  }
}

@media (max-width: 460px) {
  .theme-toggle {
    top: 14px;
    right: 12px;
  }

  .notice {
    padding-inline: 32px;
  }

  .avatar-frame {
    border-width: 2px;
    box-shadow:
      5px 5px 0 var(--line),
      0 14px 28px var(--shadow);
  }

  .link-panel {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .pill-link {
    justify-content: center;
    width: 100%;
  }

  .uptime-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cloud-left,
  .cloud-right {
    display: none;
  }
}
