/**
 * Personal Pages - Menu & Mobile Menu Styles
 * 此文件包含个人页面的导航菜单和移动端菜单样式
 */

/* ============================================
   1. CSS 变量定义 (CSS Variables)
   ============================================ */

:root {
  color-scheme: dark;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --primary: #00c2ff;
  --secondary: #ff9f1c;
}

/* ============================================
   2. 基础重置样式 (Reset Styles)
   ============================================ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #000;
  color: #fff;
  line-height: 1.5;
}

/* ============================================
   3. 导航栏样式 (Navigation Styles)
   ============================================ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 64px;
  z-index: 100;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================
   4. Logo 样式 (Logo Styles)
   ============================================ */

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-wrapper a {
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease;
}

.logo-wrapper a:hover {
  opacity: 0.8;
}

.logo {
  width: auto;
  height: 48px;
  display: flex;
  align-items: center;
}

.logo img {
  height: 100%;
  width: auto;
  display: block;
}

.site-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: #fff;
}

/* ============================================
   5. 导航链接样式 (Navigation Links Styles)
   ============================================ */

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--secondary);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  width: 100%;
  background: var(--primary);
}

/* 次要色激活状态 - 用于About me页面和Website页面 */
.nav-links a.active-secondary {
  color: var(--secondary);
}

.nav-links a.active-secondary::after {
  width: 100%;
  background: var(--secondary);
}

/* ============================================
   6. 汉堡菜单按钮样式 (Menu Toggle Styles)
   ============================================ */

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
  display: block;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   7. Footer 样式 (Footer Styles)
   ============================================ */

footer {
  padding: 20px 64px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  margin-top: 60px;
}

footer p {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--primary);
}

/* ============================================
   8. 响应式样式 - 768px (Responsive - Tablet)
   ============================================ */

@media (max-width: 768px) {
  nav {
    padding: 16px 24px;
  }

  .logo {
    height: 36px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 80px 32px 32px;
    gap: 0;
    transition: right 0.3s ease;
    z-index: 100;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links a {
    display: block;
    padding: 20px 0;
    font-size: 16px;
    width: 100%;
  }

  footer {
    padding: 16px 24px;
    margin-top: 40px;
  }

  footer p {
    font-size: 11px;
  }
}

/* ============================================
   9. 响应式样式 - 480px (Responsive - Mobile)
   ============================================ */

@media (max-width: 480px) {
  footer {
    padding: 12px 16px;
    margin-top: 32px;
  }

  footer p {
    font-size: 10px;
  }
}
