:root {
  --terran-blue: #4a9eff;
  --terran-glow: #7ec8ff;
  --protoss-gold: #ffd700;
  --protoss-blue: #00d4ff;
  --zerg-purple: #9b59b6;
  --zerg-magenta: #e056a0;
  --bg-deep: #050510;
  --bg-card: rgba(10, 18, 40, 0.8);
  --bg-card-hover: rgba(15, 25, 55, 0.9);
  --text-main: #d0d8e8;
  --text-muted: #7088a8;
  --border-color: rgba(74, 158, 255, 0.12);
  --border-glow: rgba(74, 158, 255, 0.3);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg-deep);
}
#star-canvas {
  position: fixed !important;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* === NAV BAR - Holographic HUD === */
.main-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 40px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(5, 5, 16, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  animation: fadeInDown 0.8s ease-out;
}
.nav-brand {
  font-size: 1.3rem; font-weight: 700;
  color: #fff; text-decoration: none; letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(74,158,255,0.5), 0 0 40px rgba(74,158,255,0.2);
}
.nav-brand span {
  color: var(--terran-blue);
  text-shadow: 0 0 10px var(--terran-blue);
}
.nav-menu { display: flex; list-style: none; gap: 8px; }
.nav-menu a {
  color: var(--text-muted); text-decoration: none; font-size: 0.85rem;
  padding: 6px 16px; border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.3s;
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: 1px;
}
.nav-menu a:hover {
  color: var(--terran-glow);
  border-color: var(--border-glow);
  background: rgba(74,158,255,0.06);
  text-shadow: 0 0 8px rgba(74,158,255,0.4);
}
.nav-menu a.active {
  color: var(--terran-blue);
  border-color: var(--border-glow);
  background: rgba(74,158,255,0.08);
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--terran-blue); transition: 0.3s; }

/* === PAGE WRAPPER === */
.page-wrapper { position: relative; z-index: 1; padding-top: 76px; padding-bottom: 60px; }
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* === PROFILE CARD - Command Center === */
.profile-section {
  display: flex; justify-content: center; align-items: center;
  min-height: calc(100vh - 76px); padding: 40px 0;
}
.profile-card {
  position: relative; width: 460px;
  border-radius: 8px; padding: 28px 30px 28px 100px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  box-shadow: 0 0 40px rgba(74,158,255,0.08), 0 8px 32px rgba(0,0,0,0.5);
  animation: card-in 0.8s forwards ease-out;
  overflow: visible;
}
.profile-card::before {
  content: ""; position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 8px; z-index: -1;
  background: linear-gradient(135deg, rgba(74,158,255,0.15), transparent 50%, rgba(0,212,255,0.1));
}
@keyframes card-in {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Hexagonal avatar with energy ring */
.profile-avatar {
  position: absolute; left: -40px; top: 50%; transform: translateY(-50%);
  width: 110px; height: 110px; z-index: 2;
  animation: avatar-in 0.6s ease-out 0.3s both;
}
@keyframes avatar-in {
  0% { opacity: 0; transform: translateY(-50%) scale(0.3) rotate(-180deg); }
  100% { opacity: 1; transform: translateY(-50%) scale(1) rotate(0deg); }
}
.avatar-hex {
  width: 100%; height: 100%;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  overflow: hidden;
  border: none;
  position: relative;
}
.avatar-hex img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-ring {
  position: absolute; top: -6px; left: -6px;
  width: 122px; height: 122px;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: conic-gradient(from 0deg, var(--terran-blue), var(--protoss-blue), var(--zerg-purple), var(--terran-blue));
  animation: ring-rotate 4s linear infinite;
  z-index: -1;
}
@keyframes ring-rotate {
  to { transform: rotate(360deg); }
}
.avatar-glow {
  position: absolute; top: -12px; left: -12px;
  width: 134px; height: 134px;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: radial-gradient(circle, rgba(74,158,255,0.3) 0%, transparent 70%);
  animation: glow-pulse 2s ease-in-out infinite alternate;
  z-index: -2;
}
@keyframes glow-pulse {
  0% { opacity: 0.5; } 100% { opacity: 1; }
}

.profile-text h1 {
  font-size: 1.5rem; font-weight: 700; color: #fff;
  margin-bottom: 4px; letter-spacing: 1px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.profile-text .subtitle {
  font-size: 0.82rem; color: var(--text-muted);
  font-style: italic; letter-spacing: 0.5px;
}
.profile-text .role {
  font-size: 0.65rem; color: var(--terran-blue);
  display: inline-block; padding: 3px 12px;
  background: rgba(74,158,255,0.1);
  border: 1px solid rgba(74,158,255,0.2);
  border-radius: 3px; letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(74,158,255,0.3);
}
.profile-tagline { display: none; }

/* Profile button */
.profile-btn {
  width: 40px; height: 40px; border-radius: 6px;
  background: rgba(74,158,255,0.15);
  border: 1px solid rgba(74,158,255,0.3);
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  animation: pop-btn 0.4s both ease-out 0.6s;
  transition: all 0.3s;
}
.profile-btn:hover {
  background: rgba(74,158,255,0.25);
  box-shadow: 0 0 15px rgba(74,158,255,0.3);
}
@keyframes pop-btn {
  0% { transform: translateY(-50%) scale(0); }
  80% { transform: translateY(-50%) scale(1.1); }
  100% { transform: translateY(-50%) scale(1); }
}
.profile-btn .hamburger { width: 16px; height: 12px; position: relative; }
.profile-btn .hamburger span,
.profile-btn .hamburger span::before,
.profile-btn .hamburger span::after {
  display: block; width: 100%; height: 2px;
  background: var(--terran-blue); position: absolute; transition: 0.3s;
}
.profile-btn .hamburger span { top: 50%; transform: translateY(-50%); }
.profile-btn .hamburger span::before, .profile-btn .hamburger span::after { content: ""; }
.profile-btn .hamburger span::before { top: -5px; }
.profile-btn .hamburger span::after { top: 5px; }
.profile-btn.active .hamburger span { background: transparent; }
.profile-btn.active .hamburger span::before { top: 0; transform: rotate(45deg); }
.profile-btn.active .hamburger span::after { top: 0; transform: rotate(-45deg); }

/* Social box */
.social-box {
  position: absolute; top: 50%; right: 42px; transform: translateY(-50%);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.social-box.open { opacity: 1; pointer-events: auto; }
.social-box a {
  position: absolute; width: 36px; height: 36px; border-radius: 6px;
  background: rgba(10,18,40,0.9); border: 1px solid rgba(74,158,255,0.25);
  color: var(--terran-glow);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 0.9rem;
  top: 50%; left: 50%; margin-top: -18px; margin-left: -18px;
  transition: all 0.3s; backdrop-filter: blur(10px);
}
.social-box a:hover { background: rgba(74,158,255,0.2); border-color: var(--terran-blue); }
.social-box.open a:nth-child(1) { transform: rotate(0deg) translateX(55px) rotate(0deg); transition-delay: 0s; }
.social-box.open a:nth-child(2) { transform: rotate(72deg) translateX(55px) rotate(-72deg); transition-delay: 0.08s; }
.social-box.open a:nth-child(3) { transform: rotate(144deg) translateX(55px) rotate(-144deg); transition-delay: 0.16s; }
.social-box.open a:nth-child(4) { transform: rotate(216deg) translateX(55px) rotate(-216deg); transition-delay: 0.24s; }
.social-box.open a:nth-child(5) { transform: rotate(288deg) translateX(55px) rotate(-288deg); transition-delay: 0.32s; }

/* === SECTIONS === */
.section { margin: 80px 0; opacity: 0; transform: translateY(30px); animation: fadeInUp 0.8s forwards; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.4s; }
.section:nth-child(4) { animation-delay: 0.6s; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.section-title {
  font-size: 1.3rem; color: #fff; margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px;
  text-transform: uppercase; letter-spacing: 2px;
}
.section-title i { color: var(--terran-blue); font-size: 1rem; }
.section-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--border-glow), transparent);
  margin-left: 10px;
}

/* === ABOUT === */
.about-text { line-height: 1.9; color: var(--text-muted); font-size: 0.92rem; }
.about-text p { margin-bottom: 12px; }
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--terran-glow); }
.about-highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.highlight-item {
  text-align: center; padding: 22px 12px;
  background: var(--bg-card); border-radius: 8px;
  border: 1px solid var(--border-color); transition: all 0.3s;
}
.highlight-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(74,158,255,0.1);
}
.highlight-item i { font-size: 1.4rem; color: var(--terran-blue); margin-bottom: 8px; display: block; }
.highlight-item .label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.highlight-item .value { font-size: 1rem; color: #fff; font-weight: 600; margin-top: 4px; }

/* === SKILLS - Semantic Groups === */
.race-group { margin-bottom: 24px; }
.race-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}
.race-icon {
  width: 28px; height: 28px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  background: rgba(74,158,255,0.15); color: var(--terran-blue);
  border: 1px solid rgba(74,158,255,0.3);
}
.race-name {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 600;
  color: var(--terran-blue);
}

.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.skill-item {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 8px; padding: 16px; transition: all 0.3s;
}
.skill-item:hover { background: var(--bg-card-hover); border-color: var(--border-glow); transform: translateY(-2px); }
.skill-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.skill-name { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: #fff; }
.skill-name i { font-size: 1.1rem; width: 22px; text-align: center; }
.skill-level { font-size: 0.75rem; font-weight: 600; color: var(--terran-blue); }

.skill-bar { height: 4px; background: rgba(255,255,255,0.04); border-radius: 2px; overflow: hidden; }
.skill-bar-fill {
  height: 100%; border-radius: 2px; width: 0; transition: width 1.5s ease-out;
  background: linear-gradient(90deg, var(--terran-blue), var(--terran-glow)); box-shadow: 0 0 8px rgba(74,158,255,0.3);
}
.skill-bar-fill.animate { width: var(--target-width); }

/* === BLOG ENTRY - Command Center === */
.blog-entry {
  text-align: center; padding: 45px 30px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 8px; position: relative; overflow: hidden;
}
.blog-entry::before {
  content: ">> INCOMING TRANSMISSION"; position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; color: var(--terran-blue); opacity: 0.5;
  letter-spacing: 3px; text-transform: uppercase;
  animation: blink-text 2s ease-in-out infinite;
}
@keyframes blink-text { 0%,100% { opacity: 0.3; } 50% { opacity: 0.7; } }
.blog-entry h2 { font-size: 1.3rem; color: #fff; margin-bottom: 10px; letter-spacing: 1px; }
.blog-entry p { color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; }
.blog-entry-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 28px;
  background: rgba(74,158,255,0.1); border: 1px solid rgba(74,158,255,0.3);
  color: var(--terran-blue); text-decoration: none; border-radius: 4px;
  font-size: 0.9rem; font-weight: 500; transition: all 0.3s;
  text-transform: uppercase; letter-spacing: 1px;
}
.blog-entry-btn:hover {
  background: rgba(74,158,255,0.2);
  box-shadow: 0 0 20px rgba(74,158,255,0.2);
  transform: translateY(-2px);
}

/* === FOOTER === */
.main-footer {
  text-align: center; padding: 30px 20px;
  color: var(--text-muted); font-size: 0.8rem;
  border-top: 1px solid var(--border-color); margin-top: 60px;
}
.main-footer a { color: var(--terran-blue); text-decoration: none; }

/* === MOBILE === */
@media (max-width: 768px) {
  .main-nav { padding: 0 20px; }
  .nav-menu {
    position: fixed; top: 56px; left: 0; right: 0;
    background: rgba(5,5,16,0.95); flex-direction: column;
    padding: 16px; gap: 0;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%); opacity: 0; pointer-events: none; transition: all 0.3s;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-menu a { padding: 12px 0; border-bottom: 1px solid var(--border-color); border-radius: 0; }
  .nav-menu a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }

  /* Mobile profile card — centered standalone hero */
  .profile-section {
    min-height: calc(100vh - 76px);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px 0 !important;
  }
  .profile-card {
    position: relative;
    width: calc(100% - 40px) !important;
    max-width: 380px !important;
    margin: 0 auto !important;
    padding: 14px 18px !important;
    border-radius: 999px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 14px;
    background: var(--bg-card) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: m-card-in 0.6s ease-out both !important;
  }
  @keyframes m-card-in { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }
  .profile-avatar {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 52px !important;
    height: 52px !important;
    margin: 0 !important;
    flex-shrink: 0;
    animation: m-avatar-in 0.5s ease-out 0.2s both !important;
  }
  @keyframes m-avatar-in { 0% { opacity: 0; transform: scale(0.3); } 60% { transform: scale(1.1); } 100% { opacity: 1; transform: scale(1); } }
  .avatar-ring {
    width: 64px !important;
    height: 64px !important;
    top: -6px !important;
    left: -6px !important;
  }
  .avatar-glow {
    width: 74px !important;
    height: 74px !important;
    top: -11px !important;
    left: -11px !important;
  }
  .profile-content {
    flex: 1;
    min-width: 0;
    text-align: left !important;
    padding: 0 !important;
    overflow: visible;
  }
  .profile-text h1 {
    justify-content: flex-start !important;
    font-size: 1.05rem !important;
    margin: 0 0 2px !important;
  }
  .profile-text .role,
  .profile-text .subtitle { display: none !important; }
  .profile-tagline {
    display: block;
    margin: 0;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: linear-gradient(90deg, rgba(74,158,255,0) 0%, rgba(74,158,255,1) 50%, rgba(74,158,255,0) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 2.5s linear infinite;
  }
  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  .profile-btn {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 0 !important;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    animation: none;
  }
  .profile-btn .hamburger { width: 16px; height: 12px; }
  .profile-btn .hamburger span::before { top: -5px; }
  .profile-btn .hamburger span::after { top: 5px; }

  /* Social links: dropdown below the pill */
  .social-box {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: 8px !important;
    left: auto !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 20 !important;
  }
  .social-box.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .social-box a {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    transform: none !important;
    transition: all 0.2s;
  }
  .social-box.open a:nth-child(1),
  .social-box.open a:nth-child(2),
  .social-box.open a:nth-child(3),
  .social-box.open a:nth-child(4),
  .social-box.open a:nth-child(5) { transform: none !important; }

  .about-text { text-align: center; }
  .about-highlights { grid-template-columns: 1fr; gap: 12px; }
  .skills-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  .profile-card { width: calc(100% - 24px) !important; max-width: none !important; }
  .profile-text h1 { font-size: 0.88rem !important; }
  .section { margin: 40px 0; }
}

/* === BLACK HOLE LOADER — 全屏品牌加载 === */
#bh-loader {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 10000;
  background: #050510;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.6s ease;
}

/* 中心品牌文字 */
#bh-loader .bh-brand {
  font-size: 2.2rem; font-weight: 700; letter-spacing: 6px;
  color: #fff;
  text-shadow: 0 0 20px rgba(74,158,255,0.5), 0 0 40px rgba(74,158,255,0.2);
  margin-bottom: 16px;
  animation: bh-brand-pulse 2s ease-in-out infinite;
}
#bh-loader .bh-brand span {
  color: var(--terran-blue);
  text-shadow: 0 0 14px var(--terran-blue), 0 0 32px var(--terran-blue);
}
@keyframes bh-brand-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* 副标题 */
#bh-loader .bh-tagline {
  font-size: 0.75rem; color: var(--text-muted);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 48px;
}

/* 加载进度条（Terran 风格） */
#bh-loader .bh-bar-track {
  width: 200px; height: 2px;
  background: rgba(74,158,255,0.08);
  border-radius: 1px; overflow: hidden;
  position: relative;
}
#bh-loader .bh-bar-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--terran-blue), var(--terran-glow));
  border-radius: 1px;
  animation: bh-bar-slide 1.4s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(74,158,255,0.4);
}
@keyframes bh-bar-slide {
  0% { left: -30%; width: 30%; }
  50% { left: 50%; width: 40%; }
  100% { left: 100%; width: 30%; }
}

/* 底部状态文字 */
#bh-loader .bh-status {
  margin-top: 20px;
  font-size: 0.65rem; color: rgba(74,158,255,0.35);
  letter-spacing: 2px; text-transform: uppercase;
}

/* 移动端适配 */
@media (max-width: 768px) {
  #bh-loader .bh-brand { font-size: 1.6rem; letter-spacing: 4px; }
  #bh-loader .bh-tagline { font-size: 0.65rem; letter-spacing: 2px; margin-bottom: 36px; }
  #bh-loader .bh-bar-track { width: 160px; }
}
