/* 
 * 张博亮博士个人官方主页极简设计体系 (custom.css)
 * 扁平化极简主义：融合 Dieter Rams 极简原则、Swiss Typography、Apple、Linear 与 Vercel 设计哲学
 * 纯粹、克制、严谨、主次分明、全屏幕自适应
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', Menlo, Monaco, Consolas, monospace;

  /* 高对比度中性底色与微弱 Zinc 灰色发丝边框 (Monochrome & Subtle Zinc) */
  --bg-page: #faf9f5;
  --bg-surface: #ffffff;
  --bg-subtle: #f4f4f5;
  --bg-hover: #e4e4e7;
  --border-color: #e4e4e7;
  --border-color-hover: #d4d4d8;
  
  --text-main: #09090b;
  --text-muted: #52525b;
  --text-light: #71717a;
  
  /* 唯一焦点交互强调色 (Muted Blue Accent) */
  --color-primary: #18181b;
  --color-primary-hover: #27272a;
  --color-accent: #2563eb;
  --color-accent-subtle: rgba(37, 99, 235, 0.08);

  /* 扁平克制发丝投影 */
  --shadow-flat: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-flat-hover: 0 4px 12px -2px rgba(0, 0, 0, 0.05);

  /* 动效缓动函数 */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-smooth: 200ms;
}

.dark {
  /* Deep Charcoal / Midnight Zinc 深邃质感 */
  --bg-page: #09090b;
  --bg-surface: #121215;
  --bg-subtle: #18181b;
  --bg-hover: #27272a;
  --border-color: #27272a;
  --border-color-hover: #3f3f46;
  
  --text-main: #fafafa;
  --text-muted: #a1a1aa;
  --text-light: #71717a;
  
  --color-primary: #f4f4f5;
  --color-primary-hover: #e4e4e7;
  --color-accent: #3b82f6;
  --color-accent-subtle: rgba(59, 130, 246, 0.12);

  --shadow-flat: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-flat-hover: 0 4px 16px -2px rgba(0, 0, 0, 0.4);
}

/* 基础重置与排版规范 */
html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.012em;
  overflow-x: hidden;
  width: 100%;
}

/* 严格限定标题字重为 600 (Semibold)，禁绝沉重粗体 */
h1, h2, h3, h4, h5, h6, .font-bold, .font-extrabold {
  font-weight: 600 !important;
}

/* 优质阅读屏宽限制 (65ch - 75ch) */
.measure-prose {
  max-width: 68ch;
}

/* 顶部微磨砂极简导航栏 (Apple & Swiss Typography) */
.official-nav {
  background: rgba(250, 249, 245, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--duration-smooth) var(--ease-smooth), border-color var(--duration-smooth) var(--ease-smooth);
}

.dark .official-nav {
  background: rgba(9, 9, 11, 0.85);
}

/* 导航链接样式 */
.nav-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  transition: color var(--duration-smooth) var(--ease-smooth), background-color var(--duration-smooth) var(--ease-smooth);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-main);
  background-color: var(--bg-subtle);
}

/* 扁平极简发丝卡片 (Hairline Clean Card) */
.official-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-flat);
  transition: border-color var(--duration-smooth) var(--ease-smooth), box-shadow var(--duration-smooth) var(--ease-smooth), transform var(--duration-smooth) var(--ease-smooth);
}

.official-card:hover {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-flat-hover);
}

/* 人体工程学胶囊按钮 (Min 40px Touch Target) */
.btn-primary-pill {
  background-color: var(--text-main);
  color: var(--bg-surface);
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  min-height: 40px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--duration-smooth) var(--ease-smooth), transform var(--duration-smooth) var(--ease-smooth);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary-pill:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary-pill {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  min-height: 40px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--duration-smooth) var(--ease-smooth), border-color var(--duration-smooth) var(--ease-smooth), color var(--duration-smooth) var(--ease-smooth);
  white-space: nowrap;
}

.btn-secondary-pill:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-color-hover);
}

/* 极简分类标签 (Clean Filter Pills - Min 40px Touch Target) */
.filter-pill-btn {
  padding: 0.5rem 1rem;
  min-height: 40px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 9999px;
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  transition: all var(--duration-smooth) var(--ease-smooth);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-pill-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-hover);
  border-color: var(--border-color-hover);
}

.filter-pill-btn.active {
  background-color: var(--text-main);
  color: var(--bg-surface);
  border-color: var(--text-main);
  font-weight: 600;
}

/* 统一单色中性徽章 (Linear/Vercel Monochromatic Neutral Chips) */
.chip-neutral {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  line-height: 1.25;
}

.chip-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background-color: var(--color-accent);
  flex-shrink: 0;
}

/* 大号数据看板 (Google / Claude Metric Presentation - Tabular Digits) */
.stat-figure {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text-main);
}

/* 扁平搜索框 (Google Search Minimal) */
.clean-search-input {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 0.625rem;
  min-height: 42px;
  font-size: 0.84rem;
  transition: all var(--duration-smooth) var(--ease-smooth);
}

.clean-search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--color-accent);
}

/* 求学时间轴细线 */
.edu-timeline-step {
  position: relative;
  padding-left: 1.5rem;
  padding-bottom: 1.75rem;
}

.edu-timeline-step::before {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 0.45rem;
  bottom: 0;
  width: 1px;
  background: var(--border-color);
}

.edu-timeline-step:last-child::before {
  display: none;
}

.edu-timeline-step:last-child {
  padding-bottom: 0;
}

.edu-timeline-dot {
  position: absolute;
  left: 0.05rem;
  top: 0.4rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  background-color: var(--color-accent);
}

/* 优雅细滚动条 */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(120, 120, 128, 0.2);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 120, 128, 0.35);
}

/* 隐藏横向滚动条但保留滑动功能 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 文本截断辅助 */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 证书预览弹窗动效 (Apple Modal Transitions) */
#cert-modal {
  transition: opacity var(--duration-smooth) var(--ease-smooth);
}

#cert-modal > div {
  transition: transform var(--duration-smooth) var(--ease-smooth);
}

#cert-modal.hidden > div {
  transform: scale(0.96);
}

#cert-modal:not(.hidden) > div {
  transform: scale(1);
}

/* 宽屏 16:9 与 21:9 超宽屏超清展示增强 */
@media (min-width: 1440px) {
  body {
    font-size: 15px;
  }
}

/* Hero 高级微交互标签按钮与时间轴节点动效 */
.hero-chip-btn {
  transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-chip-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px -2px rgba(37, 99, 235, 0.12);
}
.dark .hero-chip-btn:hover {
  box-shadow: 0 4px 14px -2px rgba(59, 130, 246, 0.18);
}

