/* =========================================================
   郑嘉涛个人主页样式表 (css/style.css)
   ========================================================= */

:root {
  --bg: #f7f9fc;
  --bg-alt: #eef3f9;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --text: #182230;
  --text-muted: #5b6778;
  --border: rgba(24, 34, 48, 0.09);
  --primary: #1d5b96;
  --primary-hover: #164878;
  --accent: #e07a3f;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.14);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --transition: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --bg: #0e141b;
  --bg-alt: #141c26;
  --surface: #1a2432;
  --surface-glass: rgba(20, 28, 38, 0.84);
  --text: #edf2f7;
  --text-muted: #9aa7b8;
  --border: rgba(255, 255, 255, 0.09);
  --primary: #4b9ce2;
  --primary-hover: #6ab0ed;
  --accent: #f39c62;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.48);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* 顶部导航栏 */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(29, 91, 150, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: transform var(--transition), border-color var(--transition);
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.menu-toggle {
  display: none;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(29, 91, 150, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.88rem;
}

/* Hero 首屏 */
.hero {
  padding: 72px 0 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: 48px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(29, 91, 150, 0.1);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.pill-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.3rem);
  line-height: 1.2;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.accent-text {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.04rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-weight: 700;
  font-size: 1rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 30px;
  background: var(--border);
}

.hero-visual {
  position: relative;
}

.photo-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  aspect-ratio: 3 / 4;
  max-height: 500px;
  margin-left: auto;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.photo-frame:hover .hero-photo {
  transform: scale(1.04);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 45%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 18px;
  opacity: 0;
  transition: opacity var(--transition);
}

.photo-overlay span {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 999px;
}

.photo-frame:hover .photo-overlay {
  opacity: 1;
}

.floating-card {
  position: absolute;
  left: -24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.floating-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.floating-title {
  font-weight: 700;
  font-size: 0.92rem;
}

.floating-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* 通用区块 */
.section {
  padding: 84px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

/* 关于我 */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.about-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  font-size: 1.15rem;
  margin-bottom: 18px;
}

.profile-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

.profile-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-list .label {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex-shrink: 0;
}

.profile-list .value {
  font-weight: 600;
  text-align: right;
  font-size: 0.95rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
}

.motto-text {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95rem;
}

/* 微信手机样机展示 */
.wechat-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.phone-mockup {
  width: min(290px, 100%);
  padding: 12px;
  border-radius: 36px;
  background: #14171c;
  box-shadow: var(--shadow-lg);
  border: 3px solid #2b323d;
  position: relative;
}

.phone-notch {
  width: 90px;
  height: 16px;
  background: #14171c;
  border-radius: 0 0 12px 12px;
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.phone-screen {
  border-radius: 26px;
  overflow: hidden;
  cursor: pointer;
}

.phone-screen img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.phone-screen:hover img {
  transform: scale(1.03);
}

.showcase-hint {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* 母校风光 */
.campus-intro {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.campus-badge-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.campus-badge-item strong {
  display: block;
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.campus-badge-item span {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.gallery-img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.06);
}

.gallery-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-card:hover .gallery-zoom {
  opacity: 1;
}

.gallery-body {
  padding: 20px;
}

.gallery-body h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.gallery-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* 联系区块 */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.contact-text h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.contact-text p {
  color: var(--text-muted);
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.method-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.method-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: block;
}

.method-value {
  font-size: 1.02rem;
  flex: 1;
}

/* 页脚 */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.back-top-link:hover {
  color: var(--primary);
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 14, 20, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: min(920px, 90vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-content img {
  max-height: 76vh;
  max-width: 100%;
  border-radius: var(--radius-sm);
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-content figcaption {
  color: #e2e8f0;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-close {
  top: 22px;
  right: 26px;
  width: 44px;
  height: 44px;
  font-size: 1.7rem;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  font-size: 2rem;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Toast 提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: #182230;
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 滚动显现动画 */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 响应式适配 */
@media (max-width: 920px) {
  .hero-grid,
  .about-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .photo-frame {
    margin: 0 auto;
    max-width: 380px;
  }

  .floating-card {
    left: 12px;
    bottom: 14px;
  }

  .gallery-grid,
  .campus-intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px;
    display: none;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  .contact-card {
    padding: 24px;
  }

  .method-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-divider {
    display: none;
  }
}
