/* ============================================================
   pobo — Global Styles
   ============================================================ */

:root {
  --bg: #000000;
  --surface: #111111;
  --surface-hover: #1a1a1a;
  --border: #222222;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --text-muted: #666666;
  --accent: #ff9900;
  --accent-hover: #ffb040;
  --radius: 8px;
  --max-width: 1200px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code", Menlo, Consolas,
    monospace;
  --transition: 0.2s ease;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 32px;
  --spacing-lg: 64px;
  --spacing-xl: 128px;
}

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

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

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* 全站固定背景图（不随滚动移动），图未就位时保持黑底 */
  background-image: url('../images/bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

main {
  flex: 1;
  background: rgba(0, 0, 0, 0.72);
}

/* ---------- Typography ---------- */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  width: 100%;
  background: #000000;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

/* 大屏（≥1920px，如 4K）导航栏字号与 logo 等比放大 */
@media screen and (min-width: 1920px) {
  .site-nav a {
    font-size: 1.15rem;
  }

  .site-nav ul {
    gap: var(--spacing-lg);
  }

  .logo-img {
    height: 40px;
  }

  .search-toggle svg {
    width: 22px;
    height: 22px;
  }
}

.logo-text:hover {
  color: var(--accent);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--spacing-md);
  padding-left: 0;          /* 清除浏览器默认缩进 */
}

.site-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text-primary);
  border-color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  background: #000000;
  background-image: url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--spacing-md);
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: var(--spacing-sm);
}

.hero-logo {
  width: min(340px, 60vw);
  height: auto;
  display: block;
  margin: 0 auto var(--spacing-sm);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---------- Sections ---------- */
.section {
  padding: var(--spacing-lg) var(--spacing-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* ---------- Cards ---------- */
.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--spacing-md);
  transition: background var(--transition), border-color var(--transition);
}

.card:hover {
  background: var(--surface-hover);
  border-color: #333;
}

/* 整卡可点击：标题链接的伪元素覆盖整个卡片区域 */
.card h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.card h3 a {
  color: var(--text-primary);
  font-weight: 600;
}

.card h3 a:hover {
  color: var(--accent);
}

.card time {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-xs);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------- Gallery preview (首页轮播) ---------- */
.gallery-preview {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: var(--spacing-md);
  background: #000;
  height: 520px;
  max-height: 65vh;
}

.gallery-preview .carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

.gallery-preview .carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.carousel-arrow:hover {
  background: rgba(255, 153, 0, 0.8);
}

.carousel-arrow.prev {
  left: 16px;
}

.carousel-arrow.next {
  right: 16px;
}

.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 2;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}

.carousel-dots button.active {
  background: var(--accent);
}

/* ---------- Links grid ---------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.link-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--spacing-sm);
  text-align: center;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}

.link-card:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: #333;
}

/* ---------- About preview ---------- */
.about-preview p {
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
}

/* ---------- More link ---------- */
.more-link {
  display: inline-block;
  font-weight: 600;
  color: var(--accent);
  transition: color var(--transition);
}

.more-link:hover {
  color: var(--accent-hover);
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: var(--spacing-md);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: var(--spacing-lg);
  background: rgba(0, 0, 0, 0.72);
}

.footer-nav {
  margin-top: var(--spacing-xs);
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

/* ---------- Scroll animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Screen reader only ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Search ---------- */
.search-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.search-toggle svg {
  display: block;
}

.search-toggle:hover {
  color: var(--accent);
}

.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding: 15vh 24px 24px;
}

.search-overlay.active {
  display: flex;
}

.search-box {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--spacing-md);
  position: relative;
}

.search-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
}

.search-close:hover {
  color: var(--text-primary);
}

.search-input {
  width: 100%;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1.1rem;
  padding: 12px 16px;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
}

.search-results {
  margin-top: var(--spacing-sm);
}

.search-result-item {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.search-result-item:hover {
  background: var(--surface-hover);
}

.search-result-item strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.search-result-item span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-empty {
  color: var(--text-muted);
  padding: var(--spacing-sm) 0;
  text-align: center;
}