/* ============================================
   焦阳老师 - 个人品牌网站样式
   Design: 现代大气 | Modern & Grand
   ============================================ */

/* === CSS Variables === */
:root {
  --primary: #1A1A2E;
  --primary-light: #16213E;
  --accent: #E94560;
  --accent-hover: #D63850;
  --secondary: #0F3460;
  --bg: #FFFFFF;
  --bg-alt: #F8F9FA;
  --bg-dark: #0a0e1a;
  --text: #2D3436;
  --text-light: #636E72;
  --text-white: #F5F5F5;
  --border: #E9ECEF;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }
ul { list-style: none; }

/* === Container === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Section Base === */
.section {
  padding: 100px 0;
}
.section-dark {
  background: var(--bg-alt);
}
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-subtitle {
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}
.section-header h2 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: var(--primary);
  position: relative;
  display: inline-block;
}
.section-header h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin: 14px auto 0;
  border-radius: 2px;
}
.section-dark .section-header h2 { color: var(--text); }

/* ============================================
   NAVIGATION
   ============================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s ease;
  background: transparent;
}
#navbar.scrolled {
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(12px);
  padding: 10px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 22px;
  font-weight: 700;
  color: #fff !important;
  letter-spacing: 1px;
}
#navbar:not(.scrolled) .nav-logo { opacity: 1; }
.nav-menu {
  display: flex;
  gap: 32px;
}
.nav-menu a {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-menu a:hover { color: #fff; }
.nav-menu a:hover::after { width: 100%; }

/* Hamburger */
.nav-toggle { display: none; cursor: pointer; background: none; border: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span {
  width: 24px; height: 2px;
  background: #fff;
  transition: all 0.3s ease;
  display: block;
  border-radius: 1px;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   HERO SECTION
   ============================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  color: #fff;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 26, 46, 0.88) 0%,
    rgba(15, 52, 96, 0.78) 50%,
    rgba(233, 69, 96, 0.25) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  padding: 0 24px;
}
.hero-label {
  font-size: 14px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
  animation: fadeDown 0.8s ease both;
}
.hero-content h1 {
  font-size: clamp(48px, 9vw, 80px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: 4px;
  animation: fadeUp 0.8s ease 0.2s both;
}
.hero-content .highlight {
  background: linear-gradient(135deg, var(--accent), #FF6B81);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,0.85);
  line-height: 1.8;
  margin-bottom: 36px;
  font-weight: 300;
  animation: fadeUp 0.8s ease 0.4s both;
}
.cta-btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.35s ease;
  animation: fadeUp 0.8s ease 0.6s both;
}
.cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(233,69,96,0.35);
}
.scroll-indicator {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-indicator span {
  display: block;
  width: 22px; height: 34px;
  border: 2px solid rgba(255,255,255,0.45);
  border-radius: 11px;
  position: relative;
  animation: bounce 2s infinite;
}
.scroll-indicator span::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  background: #fff;
  border-radius: 2px;
  animation: scrollDot 2s infinite;
}

@keyframes fadeDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0);} 50%{transform:translateX(-50%) translateY(8px);} }
@keyframes scrollDot { 0%,100%{top:6px;opacity:1;} 50%{top:16px;opacity:0;} }

.fade-in { animation: fadeIn 1.2s ease both; }

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 56px;
  align-items: start;
}
.about-image {
  position: relative;
}
.about-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}
.image-frame {
  position: absolute;
  inset: -12px;
  border: 2px solid var(--accent);
  border-radius: calc(var(--radius-lg) + 4px);
  z-index: -1;
  opacity: 0.4;
}
.about-text h3 {
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.4;
}
.about-text p {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.8;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.tag {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ============================================
   EXPERTISE CARDS
   ============================================ */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.expertise-card {
  background: var(--bg);
  padding: 36px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.expertise-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.expertise-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}
.expertise-card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 56px; height: 56px;
  color: var(--accent);
  margin-bottom: 20px;
}
.card-icon svg { width: 100%; height: 100%; }
.expertise-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}
.expertise-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
}

/* ============================================
   CERTIFICATIONS
   ============================================ */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.cert-item {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: all 0.35s ease;
}
.cert-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.cert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.cert-item h4 {
  font-size: 15px;
  color: var(--primary);
  margin-bottom: 6px;
  font-weight: 600;
}
.cert-item p {
  font-size: 13px;
  color: var(--text-light);
}

/* ============================================
   PROJECTS GRID
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.project-card {
  display: flex;
  flex-direction: column;
  padding: 24px 28px;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-sm);
  transition: all 0.35s ease;
}
.project-card:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-left-width: 6px;
}
.project-client {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.project-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

/* ============================================
   CLIENTS SECTION
   ============================================ */
.client-logo-wrapper {
  text-align: center;
  margin-bottom: 40px;
}
.client-logo-img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  filter: grayscale(20%);
  transition: filter 0.4s ease;
}
.client-logo-img:hover { filter: grayscale(0%); }

.client-tags-scroll {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
}
.tags-track {
  display: inline-flex;
  gap: 12px;
  animation: scrollTags 60s linear infinite;
  white-space: nowrap;
  padding: 8px 0;
}
.tags-track:hover { animation-play-state: paused; }
.client-tag {
  padding: 8px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
  transition: all 0.3s ease;
  user-select: none;
}
.client-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff;
}
@keyframes scrollTags {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Duplicate for seamless loop */
.tags-track { display: contents; }
.tags-track > * { display: inline-block; }

/* Actually use a wrapper approach */
.client-tags-scroll .tags-track {
  display: inline-flex;
  gap: 12px;
  animation: scrollTags 60s linear infinite;
  white-space: nowrap;
  padding: 8px 0;
}
/* Clone tags via JS for seamless scrolling */

/* ============================================
   PHOTO GALLERY (Masonry)
   ============================================ */
.gallery-masonry {
  columns: 3;
  column-gap: 16px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s ease;
}
.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 14px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.35s ease;
}
.gallery-item:hover figcaption { opacity: 1; transform: translateY(0); }
.gallery-item figcaption span {
  font-weight: 700;
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

/* Vary heights for masonry effect */
.gallery-item:nth-child(odd) { margin-top: 12px; }
.gallery-item:nth-child(3n) img,
.gallery-item:nth-child(7n+2) img { aspect-ratio: 4 / 3; }
.gallery-item:nth-child(5n) img { aspect-ratio: 1 / 1; }

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.active {
  display: flex;
  animation: lbFadeIn 0.3s ease;
}
.lb-image {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lb-caption {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  margin-top: 16px;
  text-align: center;
}
.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.lb-close { top: 20px; right: 20px; font-size: 32px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover { background: rgba(233,69,96,0.7); }
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================
   CONTACT PLACEHOLDER
   ============================================ */
.contact-placeholder {
  text-align: center;
  padding: 72px 24px;
  max-width: 480px;
  margin: 0 auto;
}
.placeholder-icon {
  color: var(--accent);
  opacity: 0.6;
  margin-bottom: 24px;
}
.contact-placeholder h3 {
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 12px;
}
.contact-placeholder p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 28px 0;
  font-size: 14px;
  letter-spacing: 0.5px;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.215, 0.61, 0.355, 1);
  transition-delay: var(--delay, 0s);
}
.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .section { padding: 76px 0; }
  .about-grid { grid-template-columns: 300px 1fr; gap: 40px; }
  .gallery-masonry { columns: 2; }
  .nav-menu { gap: 20px; }
  .nav-menu a { font-size: 14px; }
}

/* Mobile */
@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-header { margin-bottom: 44px; }

  /* Navigation mobile */
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 0; right: -100%; width: 280px;
    height: 100vh; background: rgba(26,26,46,0.98);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 0;
    transition: right 0.4s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
  }
  .nav-menu.open { right: 0; }
  .nav-menu a {
    font-size: 18px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-menu a::after { bottom: 0; left: 0; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: right; }
  .nav-menu a:hover::after { transform: scaleX(1); transform-origin: left; }

  /* Hero mobile */
  .hero-label { letter-spacing: 3px; font-size: 12px; }
  .mobile-hide { display: none; }
  .scroll-indicator { display: none; }

  /* About mobile */
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-image { max-width: 320px; margin: 0 auto; }
  .about-text h3 { font-size: 22px; }

  /* Expertise mobile */
  .expertise-grid { grid-template-columns: 1fr; gap: 20px; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .projects-grid { grid-template-columns: 1fr; }
  .gallery-masonry { columns: 1; }

  /* Gallery items full width on mobile */
  .gallery-item { margin-bottom: 12px; }
  .gallery-item figcaption { opacity: 1; transform: translateY(0); }
}

/* Small phones */
@media (max-width: 420px) {
  .container { padding: 0 16px; }
  .cert-grid { grid-template-columns: 1fr; }
  .cta-btn { padding: 12px 30px; font-size: 14px; }
}
