/*
* LittleLink personal homepage customization
*/

:root {
  color-scheme: dark;
  font-size: 16px;
  --page-bg: #17232d;
  --page-bg-deep: #0f1922;
  --card-bg: rgba(28, 42, 52, 0.78);
  --card-bg-top: rgba(42, 61, 72, 0.76);
  --card-border: rgba(197, 229, 232, 0.24);
  --text: #f4fbff;
  --text-soft: #d7e6ea;
  --muted: #a9bdc5;
  --quiet: #8da7af;
  --accent: #67e0d4;
  --accent-soft: #a8d86f;
  --button-bg: rgba(239, 250, 255, 0.075);
  --button-bg-hover: rgba(239, 250, 255, 0.13);
  --button-border: rgba(217, 240, 243, 0.22);
  --button-border-hover: rgba(103, 224, 212, 0.58);
  --card-shadow: 0 28px 80px rgba(3, 10, 16, 0.42);
  --glow-shadow: 0 0 0 1px rgba(255, 255, 255, 0.035) inset;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 32px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 16%, rgba(103, 224, 212, 0.18), transparent 29rem),
    radial-gradient(circle at 82% 18%, rgba(116, 139, 213, 0.14), transparent 25rem),
    radial-gradient(circle at 60% 100%, rgba(168, 216, 111, 0.1), transparent 28rem),
    linear-gradient(145deg, #1d2c38 0%, #15232e 42%, #111c25 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
}

body::before {
  background-image:
    linear-gradient(rgba(236, 250, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 250, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 50% 26%, rgba(0, 0, 0, 0.72), transparent 72%);
  mask-image: radial-gradient(circle at 50% 26%, rgba(0, 0, 0, 0.72), transparent 72%);
}

body::after {
  z-index: -1;
  background:
    linear-gradient(122deg, transparent 0 38%, rgba(103, 224, 212, 0.08) 38.1% 38.4%, transparent 38.5% 100%),
    linear-gradient(27deg, transparent 0 68%, rgba(226, 239, 255, 0.045) 68.1% 68.3%, transparent 68.4% 100%);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.site-shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.profile-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 32px;
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(180deg, var(--card-bg-top), var(--card-bg)),
    rgba(27, 42, 52, 0.82);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  box-shadow: var(--card-shadow), var(--glow-shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.profile-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 50% 0%, rgba(236, 250, 255, 0.12), transparent 18rem),
    linear-gradient(116deg, transparent 0 62%, rgba(103, 224, 212, 0.12) 62.2% 62.5%, transparent 62.7% 100%);
}

.language-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  min-height: 36px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #eafcff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(236, 250, 255, 0.14);
  border: 1px solid rgba(236, 250, 255, 0.28);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(3, 12, 18, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.language-toggle:hover {
  background: rgba(236, 250, 255, 0.19);
  border-color: rgba(103, 224, 212, 0.58);
  transform: translateY(-1px);
}

.language-toggle-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 5px);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(103, 224, 212, 0.32), rgba(168, 216, 111, 0.22));
  border: 1px solid rgba(236, 250, 255, 0.18);
  transition: transform 0.18s ease;
}

body[data-lang="en"] .language-toggle-indicator {
  transform: translateX(calc(100% + 6px));
}

.language-pill,
.language-divider {
  position: relative;
  z-index: 1;
}

.language-pill {
  min-width: 36px;
  padding: 0 8px;
  color: rgba(234, 252, 255, 0.7);
  text-align: center;
  transition: color 0.18s ease;
}

body[data-lang="zh"] .language-option-zh,
body[data-lang="en"] .language-option-en {
  color: #ffffff;
}

.language-divider {
  color: rgba(234, 252, 255, 0.48);
}

.profile-header {
  position: relative;
  z-index: 1;
  padding-top: 20px;
}

.avatar-initials {
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.26), transparent 28%),
    linear-gradient(135deg, rgba(103, 224, 212, 0.36), rgba(95, 121, 168, 0.28)),
    rgba(239, 250, 255, 0.08);
  border: 1px solid rgba(236, 250, 255, 0.34);
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(3, 12, 18, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tagline {
  margin: 0 0 10px;
  color: var(--accent-soft);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: 2.65rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.profile-title {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 1.08rem;
  font-weight: 700;
}

.profile-bio {
  max-width: 420px;
  margin: 16px auto 26px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.button-stack {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.button,
button {
  font-family: inherit;
}

.button {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--button-text, var(--text));
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  background: var(--button-background, var(--button-bg));
  border: 1px solid var(--button-border, rgba(217, 240, 243, 0.22));
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
  color: var(--button-text, var(--text));
  background: var(--button-background-hover, var(--button-bg-hover));
  border-color: var(--button-border-hover, rgba(103, 224, 212, 0.58));
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(4, 14, 22, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.075);
}

.button:active {
  transform: translateY(0);
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
  opacity: 0.94;
}

footer {
  position: relative;
  z-index: 1;
  margin: 24px 0 0;
}

footer p {
  margin: 0;
  color: var(--quiet);
  font-size: 0.88rem;
}

[data-i18n] {
  transition: opacity 0.16s ease, color 0.16s ease;
}

body.is-switching-language [data-i18n] {
  opacity: 0.72;
}

@media (max-width: 34.375rem) {
  body {
    padding: 18px 14px;
    align-items: flex-start;
  }

  .profile-card {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .language-toggle {
    top: 16px;
    right: 16px;
    min-height: 34px;
  }

  .profile-header {
    padding-top: 40px;
  }

  .avatar-initials {
    width: 82px;
    height: 82px;
    margin-bottom: 18px;
    border-radius: 22px;
    font-size: 1.45rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .tagline {
    font-size: 0.86rem;
  }

  .profile-title {
    font-size: 1rem;
  }

  .profile-bio {
    margin-bottom: 22px;
    font-size: 0.95rem;
  }

  .button {
    min-height: 50px;
    border-radius: 15px;
    font-size: 0.96rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
