:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text-main: #1a2333;
  --text-muted: #5f6879;
  --line: #dbe2ee;
  --accent: #1e6bb8;
  --accent-soft: #eaf2fb;
  --shadow: 0 10px 34px rgba(18, 34, 66, 0.08);
  --font-sans: 'SF Pro Text', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
  --font-serif: 'Iowan Old Style', 'Source Han Serif SC', 'Songti SC', 'STSong', serif;
}

html {
  color: var(--text-main);
  background: var(--bg);
  scroll-behavior: smooth;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-y: overlay;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.01em;
}

html[transition] {
  transition: all 500ms ease;
}

body {
  max-width: 980px;
  padding: 0 22px 36px;
  margin: 0 auto;
  position: relative;
}

body::before,
body::after {
  content: '';
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(6px);
  pointer-events: none;
}

body::before {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(30, 107, 184, 0.15) 0%, rgba(30, 107, 184, 0) 75%);
  top: -90px;
  right: -80px;
}

body::after {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(31, 176, 124, 0.11) 0%, rgba(31, 176, 124, 0) 75%);
  left: -120px;
  bottom: -130px;
}

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

ol,
ul {
  list-style: none;
}

p,
h1,
h2,
h3,
h4,
h5,
ul,
ol,
li,
blockquote {
  padding: 0;
  margin: 0;
}

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

input,
select,
textarea {
  font-family: inherit;
  outline: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
}

pre,
code {
  font-family: inherit;
}

input:-webkit-autofill {
  -webkit-text-fill-color: var(--text-main) !important;
  -webkit-transition: background-color 2592000s ease-in-out 0s;
  transition: background-color 2592000s ease-in-out 0s;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background-color: #98a5ba;
}

::selection {
  background-color: #1f355d;
  color: #f2f6ff;
}

.hide {
  display: none !important;
}

.page {
  animation: page-enter 420ms ease;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hover-underline {
  position: relative;
}

.hover-underline::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  left: 0;
  bottom: -3px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms ease;
}

.hover-underline:hover::after {
  transform: scaleX(1);
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 24px 0 28px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 6px 20px rgba(16, 32, 62, 0.2);
  background-image: url(../img/logo.jpg);
  background-size: cover;
  background-position: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text strong {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.brand-text span {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-link {
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 180ms ease;
}

.menu-link:hover {
  color: var(--text-main);
  border-color: var(--line);
  background: var(--surface-soft);
}

.footer {
  margin-top: 30px;
  padding: 12px 0;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-btn {
  position: fixed;
  z-index: 99;
  width: 36px;
  height: 36px;
  cursor: pointer;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(14, 25, 40, 0.5);
  box-shadow: 0 8px 24px rgba(9, 15, 26, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.footer-btn i {
  font-size: 22px;
  background-color: #ffffff;
}

.footer-btn.theme-toggler {
  right: 18px;
  bottom: 70px;
}

.footer-btn.to-top {
  right: 18px;
  bottom: -56px;
  transition: bottom 220ms ease;
}

.footer-btn.to-top.show {
  bottom: 20px;
}

.svg-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  background-color: #000000;
}

.icon-loading {
  mask-image: url('../img/icon-loading.svg');
  -webkit-mask-image: url('../img/icon-loading.svg');
}

.icon-theme-dark {
  mask-image: url('../img/icon-theme-dark.svg');
  -webkit-mask-image: url('../img/icon-theme-dark.svg');
}

.icon-theme-light {
  mask-image: url('../img/icon-theme-light.svg');
  -webkit-mask-image: url('../img/icon-theme-light.svg');
}

.icon-arrow-top {
  mask-image: url('../img/icon-arrow-top.svg');
  -webkit-mask-image: url('../img/icon-arrow-top.svg');
}

@media screen and (max-width: 760px) {
  body {
    padding: 0 14px 30px;
  }

  .header {
    position: static;
    margin: 16px 0 20px;
    padding: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .brand {
    width: 100%;
  }

  .menu {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .menu-link {
    padding: 6px 10px;
    font-size: 13px;
  }
}