/* ========================================
   fuqi.work - Personal Website Styles
   ======================================== */

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

:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #1f2940;
  --bg-card-hover: #253352;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0b0;
  --text-muted: #6a6a7a;
  --accent: #d4a574;
  --accent-light: #e8c49a;
  --accent-dark: #b8895a;
  --border: rgba(212, 165, 116, 0.15);
  --border-hover: rgba(212, 165, 116, 0.35);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* Navigation */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  transition: var(--transition);
}

/* Page content wrapper */
.page-content {
  padding-top: 64px;
  min-height: calc(100vh - 64px);
}

/* Hero section (homepage) */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(212, 165, 116, 0.03) 0%, transparent 70%);
  animation: hero-glow 8s ease-in-out infinite alternate;
}

@keyframes hero-glow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.5; }
  100% { transform: translate(5%, -5%) scale(1.1); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 2px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 60px;
  line-height: 1.8;
}

.hero-accent {
  color: var(--accent);
}

/* Section */
.section {
  padding: 80px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.section-heading {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 40px;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card:hover::before {
  opacity: 1;
}

.card-icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: block;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-link::after {
  content: '→';
  transition: transform var(--transition);
}

.card:hover .card-link::after {
  transform: translateX(4px);
}

/* Map list cards (for maps page) */
.map-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: all var(--transition);
  text-decoration: none;
}

.map-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.map-card-icon {
  width: 64px;
  height: 64px;
  background: rgba(212, 165, 116, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.map-card-info {
  flex: 1;
}

.map-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.map-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.map-card-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.map-card:hover .map-card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* Photo grid (placeholder) */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.photo-item {
  aspect-ratio: 4/3;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.photo-item:hover {
  border-color: var(--border-hover);
  transform: scale(1.02);
}

.photo-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.photo-placeholder .icon {
  font-size: 36px;
  margin-bottom: 8px;
  display: block;
}

.photo-placeholder .text {
  font-size: 12px;
}

/* Word/Article list */
.word-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.word-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: all var(--transition);
}

.word-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.word-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.word-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.word-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* About page */
.about-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px;
}

.about-header {
  text-align: center;
  margin-bottom: 48px;
}

.about-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent-light));
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  border: 3px solid var(--border-hover);
}

.about-name {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.about-role {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

.about-bio {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 40px;
}

.about-bio p {
  margin-bottom: 16px;
}

.about-section {
  margin-bottom: 32px;
}

.about-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-tag {
  padding: 6px 14px;
  background: rgba(212, 165, 116, 0.08);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.about-tag:hover {
  background: rgba(212, 165, 116, 0.15);
  border-color: var(--border-hover);
  color: var(--accent-light);
}

/* Placeholder state */
.placeholder {
  text-align: center;
  padding: 100px 24px;
}

.placeholder-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.placeholder-title {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.placeholder-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  color: var(--text-muted);
  font-size: 14px;
  transition: color var(--transition);
}

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

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 0;
    border-bottom: 1px solid var(--border);
  }

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

  .nav-links li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 15px;
    margin-bottom: 40px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    font-size: 24px;
  }

  .map-card {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .about-container {
    padding: 48px 24px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 26px;
  }

  .nav-inner {
    padding: 0 16px;
  }

  .section {
    padding: 48px 16px;
  }
}
