/* 03-photo-portfolio — 苏晚晴 Photographer */

:root {
  --bg: #FAFAFA;
  --text: #1A1A1A;
  --text-muted: #6B7280;
  --accent: #8B7355;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.7);
  --shadow: rgba(0, 0, 0, 0.06);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

.font-serif {
  font-family: 'Playfair Display', serif;
}

/* Glass morphism */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--shadow);
}

.glass-dark {
  background: rgba(26, 26, 26, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Nav */
.nav-link {
  position: relative;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Photo card */
.photo-card {
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
}

.photo-card img,
.photo-placeholder {
  transition: transform 0.6s ease;
}

.photo-card:hover img,
.photo-card:hover .photo-placeholder {
  transform: scale(1.05);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.photo-card:hover .photo-overlay {
  opacity: 1;
}

.photo-card:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Category filter */
.filter-btn {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Placeholder gradients for photos */
.photo-gradient-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.photo-gradient-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.photo-gradient-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.photo-gradient-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.photo-gradient-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.photo-gradient-6 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.photo-gradient-7 { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }
.photo-gradient-8 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }

/* Hero */
.hero-bg {
  background: linear-gradient(135deg, rgba(250,250,250,0.9) 0%, rgba(250,250,250,0.7) 100%);
}

/* Button */
.btn-elegant {
  background: var(--text);
  color: white;
  letter-spacing: 0.05em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-elegant:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}

.btn-elegant:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-outline-elegant {
  border: 1px solid var(--text);
  color: var(--text);
  letter-spacing: 0.05em;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-outline-elegant:hover {
  background: var(--text);
  color: white;
}

.btn-outline-elegant:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Form */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.glass-input {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.08);
}

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.mobile-menu.open {
  max-height: 320px;
}

/* Divider */
.elegant-divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto;
}
