/* ============================================
   NEO-BRUTALISM — 新粗野主义
   HuoLin Linktree
   Raw · Heavy · Confrontational
   ============================================ */

/* ========== Fonts (自托管，无需 Google Fonts) ========== */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/BebasNeue-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/DMSans-Light.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/DMSans-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/DMSans-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/DMSans-Bold.ttf') format('truetype');
}

/* Noto Sans SC — 中文字体（自托管） */
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/NotoSansSC-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/NotoSansSC-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('assets/fonts/NotoSansSC-Black.ttf') format('truetype');
}

:root {
  /* ── Colors ── */
  --bg: #0a0a0a;
  --surface: #ffffff;
  --text: #ffffff;
  --text-dark: #0a0a0a;
  --text-muted: rgba(255, 255, 255, 0.5);
  --border: #000000;
  --shadow: #2a2a2a;      /* visible against dark bg */
  --accent-cyan: #00f0ff;
  --accent-pink: #ff0066;
  --accent-yellow: #ffea00;

  /* ── Typography ── */
  --font-display: 'Bebas Neue', 'Noto Sans SC', sans-serif;
  --font-body: 'DM Sans', 'Noto Sans SC', sans-serif;

  /* ── Brutalist tokens ── */
  --border-w: 4px;
  --shadow-x: 8px;
  --shadow-y: 8px;
  --transition: 0.12s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========== Reset & Base ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* ========== Noise / Grain Texture ========== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ========== Brutalist Corner Brackets ========== */
.brutal-corner-tl,
.brutal-corner-tr,
.brutal-corner-bl,
.brutal-corner-br {
  position: fixed;
  z-index: 100;
  pointer-events: none;
}

.brutal-corner-tl {
  top: 24px;
  left: 24px;
  width: 40px;
  height: 40px;
  border-top: var(--border-w) solid var(--accent-cyan);
  border-left: var(--border-w) solid var(--accent-cyan);
}

.brutal-corner-tr {
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-top: var(--border-w) solid var(--accent-pink);
  border-right: var(--border-w) solid var(--accent-pink);
}

.brutal-corner-br {
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-bottom: var(--border-w) solid var(--accent-cyan);
  border-right: var(--border-w) solid var(--accent-cyan);
}

.brutal-corner-bl {
  bottom: 24px;
  left: 24px;
  width: 40px;
  height: 40px;
  border-bottom: var(--border-w) solid var(--accent-pink);
  border-left: var(--border-w) solid var(--accent-pink);
}

/* ========== Top Decorative Bar ========== */
.brutal-bar {
  width: 100%;
  height: 6px;
  background: var(--accent-cyan);
  margin-bottom: 40px;
  box-shadow: 0 4px 0 var(--accent-pink);
  position: relative;
}

.brutal-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 40%;
  height: 100%;
  background: var(--accent-pink);
  box-shadow: 4px 0 0 var(--accent-yellow);
}

/* ========== Container ========== */
.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 32px 24px 40px;
  max-width: 640px;
  margin: 0 auto;
}

/* ========== Profile Picture ========== */
#profilePicture {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 28px;
  transform: rotate(-1.5deg);
  transition: transform var(--transition);
}

#profilePicture:hover {
  transform: rotate(0deg) scale(1.02);
}

/* Brutalist frame — chunky white border + black border + shadow */
#profilePicture::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: var(--border-w) solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--shadow);
  z-index: -1;
}

#profilePicture img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  display: block;
  border: var(--border-w) solid var(--border);
  position: relative;
  z-index: 1;
  /* no border-radius — brutalist sharpness */
}

/* ========== User Name ========== */
#userName {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: 100%;
  margin-bottom: 4px;
  position: relative;
  word-break: keep-all;
}

/* Thick underline in accent cyan — brutalist */
#userName::after {
  content: '';
  display: block;
  width: 70%;
  height: 6px;
  background: var(--accent-cyan);
  margin: 6px auto 0;
  box-shadow: 4px 4px 0 var(--accent-pink);
}

/* ========== Divider ========== */
.brutal-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin: 24px 0 20px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.5em;
  color: var(--accent-cyan);
  user-select: none;
  position: relative;
}

.brutal-divider::before,
.brutal-divider::after {
  content: '';
  flex: 1;
  height: var(--border-w);
  background: var(--accent-pink);
  max-width: 60px;
}

.brutal-divider span {
  display: inline-block;
  line-height: 1;
}

/* ========== Toolbar Row（语言切换 + 相册按钮并排） ========== */
.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 6px auto 20px;
}

/* ========== Language Switch ========== */
.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 130px;
  height: 44px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dark);
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  line-height: 1.4;
}

@media (hover: hover) {
  .lang-switch-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: #f8f8f8;
  }
}

.lang-switch-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shadow);
  transition-duration: 0.05s;
}

/* ========== Album Button（工具栏内小按钮） ========== */
.album-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0;
  width: 130px;
  height: 44px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dark);
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  line-height: 1.4;
}

.album-btn i {
  font-size: 0.9rem;
}

@media (hover: hover) {
  .album-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: #f8f8f8;
  }
}

.album-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shadow);
  transition-duration: 0.05s;
}

/* ========== Links Section ========== */
#links {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 8px auto 32px;
}

/* Brutalist Card Button — the star of the show */
.link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  padding: 20px 24px;
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--shadow);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition), background var(--transition);
  cursor: pointer;
  letter-spacing: 0.3px;
}

/* No border-radius — brutalist sharp rectangles */

.link i,
.link .brand-icon {
  font-size: 1.3rem;
  width: 24px;
  height: 24px;
  text-align: center;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.link .link-label {
  flex: 1;
  text-align: center;
}

/* Hover: lift + cyan shadow */
@media (hover: hover) {
  .link:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0 var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: #f8f8f8;
  }

  .link:active {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 var(--shadow);
    transition-duration: 0.05s;
  }
}

/* Active/touch state */
.link:active {
  transform: translate(2px, 2px);
  box-shadow: 4px 4px 0 var(--shadow);
  transition-duration: 0.05s;
}

/* ========== Link Icon Brand Colors ========== */
/* 品牌颜色已由 Simple Icons SVG 内置，无需额外 CSS */
.link .fa-images {
  background: linear-gradient(135deg, #ff0066 0%, #00f0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Pet Section ========== */
#pet {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px 0 28px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Brutalist pet frame */
#pet::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: var(--border-w) solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--shadow);
  z-index: -1;
}

/* Yellow accent stripe at bottom of frame */
#pet::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: -10px;
  right: -10px;
  height: 6px;
  background: var(--accent-yellow);
  box-shadow: 0 4px 0 var(--accent-pink);
  z-index: -1;
}

#petImage {
  width: 180px;
  height: 180px;
  display: block;
  border: var(--border-w) solid var(--border);
  transition: transform 0.15s ease;
}

#pet:active #petImage {
  transform: scale(0.92);
}

/* Jump animation */
@keyframes petJump {
  0%   { transform: translateY(0); }
  15%  { transform: translateY(-24px); }
  30%  { transform: translateY(0); }
  45%  { transform: translateY(-32px); }
  65%  { transform: translateY(0); }
  80%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

#pet.jumping #petImage {
  animation: petJump 0.7s cubic-bezier(.22, 1, .36, 1);
}

/* ========== Pet Bubble ========== */
.pet-bubble {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 16px;
  padding: 12px 20px;
  min-width: 50px;
  max-width: 300px;
  width: max-content;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s 0.2s, transform 0.2s cubic-bezier(.34,1.56,.64,1);
  background: #fff;
  border: var(--border-w) solid var(--border);
  box-shadow: 4px 4px 0 var(--shadow);
  z-index: 10;
}

.pet-bubble.show {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease, visibility 0s 0s, transform 0.2s cubic-bezier(.34,1.56,.64,1);
}

/* Bubble tail — chunky triangle */
.pet-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top-color: var(--border);
}

.pet-bubble::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-3px);
  border: 8px solid transparent;
  border-top-color: #fff;
  z-index: 1;
}

/* ========== Footer / Hashtag ========== */
#hashtag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  padding: 16px 0 8px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  user-select: none;
}

#hashtag::before,
#hashtag::after {
  content: '//';
  color: var(--accent-cyan);
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0;
  opacity: 0.7;
}

/* ========== Image Popup (QR Code) — Brutalist ========== */
.img-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 300;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s 0.25s;
  padding: 24px;
}

.img-popup-overlay.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s 0s;
}

.img-popup-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 340px;
  width: 100%;
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: 10px 10px 0 var(--shadow);
  padding: 24px 20px 20px;
  transform: scale(0.9) translateY(8px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), opacity 0.2s ease;
}

.img-popup-overlay.active .img-popup-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Color accent strip at top of popup card */
.img-popup-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--accent-cyan);
  box-shadow: 0 3px 0 var(--accent-pink);
}

.img-popup-image {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border: var(--border-w) solid var(--border);
  background: #fff;
  display: block;
}

.img-popup-label {
  color: var(--text-dark);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 0 4px;
  text-align: center;
}

.img-popup-close {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow);
  cursor: pointer;
  line-height: 1;
  transition: transform var(--transition), box-shadow var(--transition);
}

.img-popup-close:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--accent-pink);
}

/* Visit button — brutalist mini */
.img-popup-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: 4px 4px 0 var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.img-popup-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.img-popup-btn i {
  font-size: 0.85rem;
}

/* Popup note text */
.img-popup-note {
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 8px 0 0;
  text-align: center;
  letter-spacing: 0.3px;
  line-height: 1.4;
  max-width: 100%;
  word-break: break-all;
  opacity: 0.6;
}

/* ========== Hint Popup（隐藏入口提示弹窗） ========== */
.hint-card {
  max-width: 400px;
  padding: 36px 28px 28px;
  text-align: center;
}

.hint-emoji {
  font-size: 3rem;
  margin-bottom: 12px;
  line-height: 1;
}

.hint-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hint-body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.6;
  padding: 0 8px;
  margin-bottom: 24px;
  opacity: 0.85;
}

.hint-detail {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.7;
  padding: 0 8px;
  margin-bottom: 24px;
  opacity: 0.75;
  text-align: left;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.hint-footer {
  display: flex;
  justify-content: center;
}

.hint-close-btn {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 10px 28px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dark);
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  line-height: 1;
}

.hint-close-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.hint-close-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shadow);
  transition-duration: 0.05s;
}

/* ========== Animations ========== */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered entrance for links — 动态延迟由 JS 设置 */
#links .link {
  animation: fadeUp 0.35s ease backwards;
}

/* Hashtag fade in */
#hashtag {
  animation: fadeUp 0.4s ease 0.4s backwards;
}

/* ========== Responsive ========== */

/* Tablet (≤ 768px) */
@media screen and (max-width: 768px) {
  .container {
    padding: 28px 20px 32px;
  }

  .brutal-corner-tl,
  .brutal-corner-tr,
  .brutal-corner-bl,
  .brutal-corner-br {
    width: 28px;
    height: 28px;
  }

  .brutal-corner-tl { top: 16px; left: 16px; }
  .brutal-corner-tr { top: 16px; right: 16px; }
  .brutal-corner-br { bottom: 16px; right: 16px; }
  .brutal-corner-bl { bottom: 16px; left: 16px; }

  .brutal-bar {
    margin-bottom: 32px;
  }

  #userName {
    font-size: 3.5rem;
  }

  #profilePicture img {
    width: 96px;
    height: 96px;
  }

  #profilePicture::before {
    inset: -8px;
  }

  .toolbar-row {
    gap: 10px;
  }

  .lang-switch-btn,
  .album-btn {
    padding: 0;
    width: 110px;
    height: 40px;
    font-size: 0.85rem;
  }

  .album-btn i {
    font-size: 0.85rem;
  }

  #links {
    gap: 14px;
    padding: 0 4px;
  }

  .link {
    padding: 16px 20px;
    font-size: 0.95rem;
    gap: 12px;
  }

  .link i,
  .link .brand-icon {
    font-size: 1.15rem;
    width: 22px;
    height: 22px;
  }

  #petImage {
    width: 160px;
    height: 160px;
  }

  .img-popup-card {
    max-width: 300px;
    padding: 20px 16px 18px;
  }

  #hashtag {
    font-size: 0.75rem;
    gap: 12px;
  }
}

/* Mobile (≤ 480px) */
@media screen and (max-width: 480px) {
  .container {
    padding: 20px 16px 28px;
  }

  .brutal-corner-tl,
  .brutal-corner-tr,
  .brutal-corner-bl,
  .brutal-corner-br {
    width: 20px;
    height: 20px;
    border-width: 3px;
  }

  .brutal-corner-tl { top: 12px; left: 12px; }
  .brutal-corner-tr { top: 12px; right: 12px; }
  .brutal-corner-br { bottom: 12px; right: 12px; }
  .brutal-corner-bl { bottom: 12px; left: 12px; }

  .brutal-bar {
    height: 5px;
    margin-bottom: 24px;
  }

  :root {
    --border-w: 3px;
    --shadow-x: 6px;
    --shadow-y: 6px;
  }

  #userName {
    font-size: 2.6rem;
  }

  #userName::after {
    height: 4px;
    width: 80%;
    margin-top: 4px;
  }

  #profilePicture {
    margin-bottom: 20px;
  }

  #profilePicture img {
    width: 84px;
    height: 84px;
  }

  #profilePicture::before {
    inset: -6px;
  }

  .toolbar-row {
    gap: 8px;
  }

  .lang-switch-btn,
  .album-btn {
    padding: 0;
    width: 96px;
    height: 36px;
    font-size: 0.82rem;
  }

  .album-btn i {
    font-size: 0.8rem;
  }

  #links {
    gap: 12px;
    padding: 0;
  }

  .link {
    padding: 14px 16px;
    font-size: 0.88rem;
    gap: 10px;
  }

  .link i,
  .link .brand-icon {
    font-size: 1.05rem;
    width: 20px;
    height: 20px;
  }

  .brutal-divider {
    font-size: 1rem;
    margin: 16px 0 14px;
  }

  #pet {
    margin: 28px 0 20px;
  }

  #petImage {
    width: 140px;
    height: 140px;
  }

  .pet-bubble {
    font-size: 0.8rem;
    padding: 10px 16px;
    max-width: 260px;
    margin-bottom: 12px;
  }

  .img-popup-card {
    max-width: 260px;
    padding: 16px 14px 16px;
    box-shadow: 8px 8px 0 var(--shadow);
  }

  .img-popup-close {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    right: -6px;
    top: -6px;
  }

  #hashtag {
    font-size: 0.7rem;
    gap: 10px;
    letter-spacing: 1.5px;
  }

  #hashtag::before,
  #hashtag::after {
    font-size: 1rem;
  }
}

/* Large screen (≥ 1200px) */
@media screen and (min-width: 1200px) {
  .container {
    max-width: 720px;
    padding: 48px 32px 60px;
  }

  #userName {
    font-size: 5.5rem;
  }

  #profilePicture img {
    width: 130px;
    height: 130px;
  }

  #links {
    gap: 18px;
  }

  .link {
    padding: 24px 32px;
    font-size: 1.1rem;
    max-width: 560px;
  }

  #petImage {
    width: 200px;
    height: 200px;
  }

  .img-popup-card {
    max-width: 380px;
    padding: 28px 24px 24px;
  }
}

/* ============================================
   GALLERY — 图片相册（由 gallery.js 使用）
   ============================================ */

/* ===== Gallery Overlay ===== */
.gallery-overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 400;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility 0s .25s;
  padding: 24px;
}
.gallery-overlay.active {
  opacity: 1; visibility: visible;
  transition: opacity .25s ease, visibility 0s 0s;
}

/* ===== Gallery Modal ===== */
.gallery-modal {
  position: relative;
  width: 100%; max-width: 700px;
  max-height: 90vh;
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: var(--shadow-x) var(--shadow-y) 0 var(--shadow);
  display: flex; flex-direction: column;
  transform: scale(.92) translateY(10px); opacity: 0;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
  overflow: hidden;
}
.gallery-overlay.active .gallery-modal {
  transform: scale(1) translateY(0); opacity: 1;
}
.gallery-modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--accent-cyan);
  box-shadow: 0 3px 0 var(--accent-pink);
  z-index: 1;
}

/* ===== Gallery Header ===== */
.gallery-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 12px; flex-shrink: 0;
}
.gallery-title {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700; color: var(--text-dark); letter-spacing: .05em;
}

/* Brutalist close button */
.gallery-close-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700; color: var(--text-dark); line-height: 1;
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow); cursor: pointer;
  transition: transform .12s cubic-bezier(.22,1,.36,1), box-shadow .12s;
}
.gallery-close-btn:hover {
  transform: translate(-1px,-1px);
  box-shadow: 5px 5px 0 var(--accent-pink);
}

/* ===== Gallery Grid ===== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 16px;
  padding: 12px 24px 24px; overflow-y: auto; max-height: 65vh;
}
.gallery-grid::-webkit-scrollbar { width: 8px; }
.gallery-grid::-webkit-scrollbar-track { background: #eee; }
.gallery-grid::-webkit-scrollbar-thumb {
  background: var(--border); border: 2px solid var(--border);
}

/* Thumbnail card */
.gallery-grid-item {
  position: relative; cursor: pointer; overflow: hidden;
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: 5px 5px 0 var(--shadow);
  transition: transform .12s cubic-bezier(.22,1,.36,1), box-shadow .12s, border-color .12s;
  animation: galleryFadeUp .35s ease backwards;
}
.gallery-grid-item:hover {
  transform: translate(-3px,-3px);
  box-shadow: 8px 8px 0 var(--accent-cyan);
  border-color: var(--accent-cyan);
}
.gallery-grid-item:active {
  transform: translate(1px,1px);
  box-shadow: 3px 3px 0 var(--shadow);
  transition-duration: .05s;
}
.gallery-grid-item img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
  background: #e0e0e0;
  pointer-events: none; -webkit-user-drag: none;
  user-select: none; -webkit-touch-callout: none;
}
.gallery-grid-item .gallery-img-overlay {
  position: absolute; inset: 0; z-index: 2;
  cursor: pointer; background: transparent;
}
.gallery-grid-item .gallery-grid-label {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 7px 10px;
  background: rgba(0,0,0,.7); color: #fff;
  font-family: var(--font-body); font-size: .75rem;
  font-weight: 700; text-align: center;
  letter-spacing: .3px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.gallery-grid-item .gallery-img-error { display: none; }
.gallery-grid-item .gallery-error-icon {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  background: #f0f0f0; color: #999; font-size: 1.6rem;
}

/* ===== Pagination Bar ===== */
.gallery-page-hidden { display: none; }
.gallery-pagination {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 12px 24px 20px; flex-shrink: 0;
  border-top: 4px solid var(--border);
}
.gallery-page-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; cursor: pointer;
  font-family: var(--font-body); font-size: .8rem; font-weight: 600;
  color: var(--text-dark); background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform .12s, box-shadow .12s, border-color .12s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.gallery-page-btn:hover {
  transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 var(--accent-cyan);
  border-color: var(--accent-cyan);
}
.gallery-page-btn:active {
  transform: translate(1px,1px);
  box-shadow: 2px 2px 0 var(--shadow);
  transition-duration: .05s;
}
.gallery-page-btn.is-disabled {
  opacity: .25; pointer-events: none; box-shadow: none;
}
.gallery-page-indicator {
  font-family: var(--font-display);
  font-size: 1.05rem; color: var(--text-dark);
  letter-spacing: .05em; min-width: 60px;
  text-align: center; user-select: none;
}

/* ===== Lightbox ===== */
.gallery-lightbox {
  display: none; flex-direction: column; flex: 1; min-height: 0;
}

/* Lightbox header */
.gallery-lb-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; flex-shrink: 0;
}
.gallery-lb-back {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; cursor: pointer;
  font-family: var(--font-body); font-size: .8rem; font-weight: 600;
  color: var(--text-dark); background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.gallery-lb-back:hover {
  transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 var(--accent-cyan);
  border-color: var(--accent-cyan);
}
.gallery-lb-back i { font-size: .75rem; }

/* Lightbox body */
.gallery-lb-body {
  position: relative; flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0 20px; min-height: 0;
}
.gallery-lb-image {
  max-width: 100%; max-height: 55vh; object-fit: contain; display: block;
  border: var(--border-w) solid var(--border);
  box-shadow: 5px 5px 0 var(--shadow);
  background: var(--surface);
  animation: galleryLbIn .25s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none; -webkit-user-drag: none;
  user-select: none; -webkit-touch-callout: none;
  opacity: 1;
  transition: opacity .35s ease;
}
.gallery-lb-image.gallery-img-error { display: none; }
.gallery-lb-body .gallery-lb-overlay {
  position: absolute; inset: 0; z-index: 1; background: transparent;
}

/* Prev / Next nav buttons */
.gallery-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--text-dark); cursor: pointer;
  background: var(--surface);
  border: var(--border-w) solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.gallery-lb-nav:hover {
  transform: translateY(-50%) translate(-1px,-1px);
  box-shadow: 5px 5px 0 var(--accent-cyan);
  border-color: var(--accent-cyan);
}
.gallery-lb-nav:active {
  transform: translateY(-50%) translate(1px,1px);
  box-shadow: 2px 2px 0 var(--shadow);
  transition-duration: .05s;
}
.gallery-lb-prev { left: 20px; }
.gallery-lb-next { right: 20px; }

/* Lightbox footer */
.gallery-lb-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 24px 20px; flex-shrink: 0;
}
.gallery-lb-label {
  font-family: var(--font-body);
  font-size: .85rem; font-weight: 700; color: var(--text-dark);
}
.gallery-lb-counter {
  font-family: var(--font-display);
  font-size: 1rem; color: var(--text-dark);
  letter-spacing: .05em; opacity: .5;
}

/* ===== Animations ===== */
@keyframes galleryFadeUp {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes galleryLbIn {
  0%   { opacity: 0; transform: scale(.95); }
  100% { opacity: 1; transform: scale(1); }
}

/* Loading pulse for gallery images */
@keyframes galleryPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}
.gallery-lb-image.gallery-lb-loading {
  opacity: 0;
  animation: galleryPulse 1s ease-in-out infinite;
}

/* ===== Responsive ===== */
@media screen and (max-width: 768px) {
  .gallery-overlay { padding: 16px; }
  .gallery-modal { max-width: 100%; }
  .gallery-grid {
    grid-template-columns: repeat(2,1fr); gap: 12px;
    padding: 8px 16px 16px; max-height: 60vh;
  }
  .gallery-header { padding: 16px 16px 8px; }
  .gallery-title { font-size: 1.3rem; }
  .gallery-pagination { padding: 10px 16px 16px; gap: 10px; }
  .gallery-page-btn { font-size: .75rem; padding: 6px 12px; }
  .gallery-lb-body { padding: 0 12px; }
  .gallery-lb-prev { left: 12px; }
  .gallery-lb-next { right: 12px; }
  .gallery-lb-nav { width: 38px; height: 38px; font-size: .95rem; }
  .gallery-lb-footer {
    padding: 10px 16px 16px; flex-direction: column; gap: 4px; text-align: center;
  }
  .gallery-lb-image { max-height: 50vh; }
}

@media screen and (max-width: 480px) {
  .gallery-overlay { padding: 12px; }
  .gallery-grid {
    grid-template-columns: repeat(2,1fr); gap: 10px;
    padding: 6px 12px 12px; max-height: 55vh;
  }
  .gallery-header { padding: 12px 12px 6px; }
  .gallery-title { font-size: 1.1rem; }
  .gallery-close-btn { width: 32px; height: 32px; font-size: 1.2rem; }
  .gallery-pagination { padding: 8px 12px 14px; gap: 8px; }
  .gallery-page-btn { font-size: .7rem; padding: 5px 10px; }
  .gallery-page-indicator { font-size: .9rem; min-width: 44px; }
  .gallery-lb-nav { width: 34px; height: 34px; font-size: .85rem; }
  .gallery-lb-prev { left: 8px; }
  .gallery-lb-next { right: 8px; }
  .gallery-lb-image { max-height: 45vh; }
  .gallery-lb-footer { padding: 8px 12px 14px; }
  .gallery-lb-label { font-size: .8rem; }
  .gallery-lb-counter { font-size: .85rem; }
}

@media screen and (min-width: 1200px) {
  .gallery-modal { max-width: 780px; }
  .gallery-grid { gap: 18px; padding: 12px 28px 28px; }
  .gallery-lb-image { max-height: 60vh; }
}

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

  #links .link {
    animation: none !important;
    opacity: 1;
  }

  #hashtag {
    animation: none !important;
  }

  .link:hover {
    transform: none !important;
  }
}
