/* ========== 基础 ========== */
:root {
  --bg: #0f1115;
  --bg-elev: #171a21;
  --text: #e8eaf0;
  --text-dim: #9aa0ae;
  --accent: #6ca0ff;
  --accent-soft: rgba(108, 160, 255, 0.15);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --max-width: 960px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", -apple-system, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #9cc0ff; }

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

/* ========== 顶部 Hero ========== */
.hero {
  padding: 110px 0 70px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% -20%, var(--accent-soft), transparent),
    var(--bg);
}

.hero-name {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero-tagline {
  margin: 18px auto 0;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.hero-nav {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-nav a {
  color: var(--text-dim);
  font-size: 0.95rem;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.hero-nav a:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg-elev);
}

/* ========== 区块 ========== */
.section { padding: 60px 0; }

.section-title {
  font-size: 1.6rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-sub {
  color: var(--text-dim);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

/* ========== 照片墙 ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.3s;
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.45), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover::after { opacity: 1; }

.gallery-item .caption {
  position: absolute;
  left: 14px;
  bottom: 10px;
  z-index: 1;
  font-size: 0.85rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s;
}

.gallery-item:hover .caption { opacity: 1; transform: translateY(0); }

/* ========== 关于我 ========== */
.about-block {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 18px;
}

.about-block h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.about-block p { color: var(--text-dim); }

/* ========== 联系方式 ========== */
.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  color: var(--text);
  transition: all 0.2s;
}

a.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--text);
}

.contact-icon { font-size: 1.5rem; }
.contact-text { font-size: 0.95rem; word-break: break-all; }

/* ========== 页脚 ========== */
.footer {
  padding: 40px 0 50px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

/* ========== 灯箱 ========== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 10, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.lightbox.open { opacity: 1; visibility: visible; }

.lightbox-figure {
  max-width: 88vw;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: 74vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-figure figcaption {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.lightbox button {
  position: fixed;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.lightbox button:hover { background: rgba(255, 255, 255, 0.18); }

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  line-height: 1;
}

.lightbox-prev, .lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 2rem;
}

.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

/* ========== 响应式微调 ========== */
@media (max-width: 640px) {
  .hero { padding: 80px 0 50px; }
  .section { padding: 44px 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
