/* ========================================
   Leeの探索空间 - 全站通用样式
   ======================================== */

/* CSS 变量 - 主题色系（浅色） */
:root {
  --primary: #0d9488;
  --primary-light: #14b8a6;
  --primary-dark: #0f766e;
  --accent: #0d9488;
  --accent-light: #14b8a6;
  --accent-blue: #3d79f2;
  --bg-dark: #f4f4ef;
  --bg-card: #ffffff;
  --bg-card-hover: #ebeae4;
  --text-primary: #09090b;
  --text-secondary: #3f3f46;
  --text-muted: #a1a1aa;
  --border: #d4d4d8;
  --border-light: #c4c4c8;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --gradient-1: linear-gradient(135deg, #0d9488, #0f766e);
  --gradient-2: linear-gradient(135deg, #a700fa, #db2777);
  --gradient-3: linear-gradient(135deg, #14b8a6, #059669);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* 全局重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(244, 244, 239, 0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.2rem;
}

.navbar-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text-primary);
  background: rgba(13, 148, 136, 0.08);
}

.navbar-links a.active {
  color: var(--primary);
}

/* 移动端汉堡菜单 */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* 主内容区 */
.main-content {
  padding-top: 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hero 区域 */
.hero {
  padding: 6rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(13, 148, 136, 0.06) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(-5%, -5%); }
  100% { transform: translate(5%, 5%); }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  position: relative;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-icon.research { background: rgba(13, 148, 136, 0.08); }
.card-icon.teaching { background: rgba(13, 148, 136, 0.1); }
.card-icon.personal { background: rgba(167, 0, 250, 0.1); }
.card-icon.tools { background: rgba(5, 150, 105, 0.1); }
.card-icon.nav { background: rgba(217, 119, 6, 0.1); }

.card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.card .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.08);
  color: var(--primary);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.tag.cyan { background: rgba(13, 148, 136, 0.08); color: #0d9488; border-color: rgba(13, 148, 136, 0.2); }
.tag.green { background: rgba(5, 150, 105, 0.08); color: #059669; border-color: rgba(5, 150, 105, 0.2); }
.tag.purple { background: rgba(167, 0, 250, 0.08); color: #a700fa; border-color: rgba(167, 0, 250, 0.2); }
.tag.amber { background: rgba(217, 119, 6, 0.08); color: #d97706; border-color: rgba(217, 119, 6, 0.2); }

/* Section 标题 */
.section {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.section-header .section-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.section-header .section-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .separator { color: var(--text-muted); }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: auto;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover { color: var(--primary); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: var(--bg-card);
}

/* 粒子背景 Canvas */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* 响应式 */
@media (max-width: 768px) {
  .navbar-toggle { display: block; }
  
  .navbar-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(244, 244, 239, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  
  .navbar-links.open { display: flex; }
  
  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1rem; }
  .card-grid { padding: 1rem; gap: 1rem; grid-template-columns: 1fr; }
  .section { padding: 1rem; }
}

/* 页面过渡动画 */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }
/* 导航栏「个人」按钮样式 — 绿色药丸按钮与常规项区分 */
.navbar-links a.nav-auth-link {
  color: #059669 !important;
  font-weight: 600;
  border: 1px solid rgba(5, 150, 105, 0.3);
  border-radius: 999px;
  padding: 0.4rem 1rem !important;
  margin-left: 0.5rem;
}
.navbar-links a.nav-auth-link:hover {
  border-color: #059669;
  background: rgba(5, 150, 105, 0.08) !important;
}


/* ── 动态页脚（global-footer.js 生成）── */
.footer-inner{
    max-width:1200px;
    margin:0 auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:1rem;
}
.footer-left{
    display:flex;
    align-items:center;
    gap:4px;
    flex-wrap:wrap;
}
.footer-left a{
    color:var(--primary-light);
    text-decoration:none;
}
.footer-left a:hover{
    text-decoration:underline;
}
.footer-links{
    display:flex;
    gap:1.2rem;
    flex-wrap:wrap;
}
.footer-links a{
    color:var(--text-secondary);
    text-decoration:none;
    font-size:0.85rem;
    transition:color 0.2s;
}
.footer-links a:hover{
    color:var(--primary-light);
}
.footer-links i{
    margin-right:3px;
}
