/* ============================================
   AI4S-YB Landing Page
   Aesthetic: Deep Ocean × Neural Frontier
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Noto+Serif+SC:wght@400;700&display=swap');

:root {
  --void: #06090f;
  --abyss: #0a1019;
  --surface-glass: rgba(14, 22, 38, 0.65);
  --text: #e8edf5;
  --text-secondary: #8899b4;
  --text-dim: #5a6d8a;
  --cyan: #00e5cc;
  --cyan-dim: rgba(0, 229, 204, 0.12);
  --cyan-glow: rgba(0, 229, 204, 0.25);
  --coral: #ff6b5a;
  --violet: #a78bfa;
  --border: rgba(136, 153, 180, 0.1);
  --border-light: rgba(136, 153, 180, 0.18);
  --content-max: 1200px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-display: "Cormorant Garamond", "Noto Serif SC", "Songti SC", serif;
  --font-body: "DM Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--void);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; line-height: 1.75; color: var(--text-secondary); }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; color: var(--text); line-height: 1.15; }
strong { color: var(--text); }

#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.3s ease;
}

.nav-bar.scrolled {
  background: rgba(6, 9, 15, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  padding: 0.65rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--cyan), #00b4a0);
  color: var(--void);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
}

.logo-icon-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
}

.logo-divider {
  width: 1px;
  height: 1.2rem;
  background: var(--border-light);
}

.logo-text {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-links a {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta,
.repo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-cta:hover,
.repo-link:hover {
  border-color: var(--cyan);
  background: var(--cyan-dim);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 140vw;
  height: 80vh;
  background:
    radial-gradient(ellipse 50% 60% at 35% 40%, rgba(0, 229, 204, 0.08), transparent),
    radial-gradient(ellipse 40% 50% at 70% 30%, rgba(167, 139, 250, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 50% 80%, rgba(255, 107, 90, 0.04), transparent);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 56rem;
  text-align: center;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero-title {
  margin-top: 2rem;
  font-size: clamp(3rem, 8vw, 6.5rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.hero-accent {
  background: linear-gradient(135deg, var(--cyan), var(--violet), var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  max-width: 38rem;
  margin: 1.8rem auto 0;
  font-size: 1.1rem;
  line-height: 1.85;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 3.5rem;
  background: linear-gradient(to bottom, var(--cyan), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-glow {
  background: linear-gradient(135deg, var(--cyan), #00b4a0);
  color: var(--void);
  box-shadow: 0 0 24px var(--cyan-glow), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.btn-glow:hover { box-shadow: 0 0 40px var(--cyan-glow), 0 8px 32px rgba(0, 0, 0, 0.4); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--text-dim);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.section {
  position: relative;
  padding: 6rem 1.5rem;
  z-index: 1;
}

.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-dark {
  background: linear-gradient(180deg, rgba(10, 16, 25, 0), var(--abyss) 15%, var(--abyss) 85%, rgba(10, 16, 25, 0));
}

.section-header { margin-bottom: 1.5rem; }

.section-number {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  letter-spacing: -0.01em;
}

.section-subtitle {
  max-width: 42rem;
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.vision-grid,
.about-layout,
.repo-overview {
  display: grid;
  gap: 3rem;
}

.vision-cards,
.work-grid,
.repo-grid,
.join-grid {
  display: grid;
  gap: 1.25rem;
}

.vision-cards { grid-template-columns: repeat(3, 1fr); }
.work-grid,
.repo-grid { grid-template-columns: repeat(2, 1fr); }
.join-grid { grid-template-columns: repeat(4, 1fr); }
.about-layout { grid-template-columns: 1.5fr 1fr; align-items: start; }
.repo-overview { grid-template-columns: 1.6fr 1fr; padding: 1.9rem; margin-bottom: 1.5rem; }

.about-stats,
.repo-overview,
.v-card,
.work-card,
.join-card,
.repo-card {
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.about-stats,
.v-card,
.work-card,
.join-card,
.repo-card { padding: 1.75rem; }

.text-large {
  font-size: 1.2rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.vision-text p + p,
.about-main p + p,
.repo-overview-main p + p { margin-top: 1rem; }

.v-card,
.work-card,
.join-card,
.repo-card { transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; }

.v-card:hover,
.join-card:hover,
.repo-card:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 229, 204, 0.06);
}

.work-card:hover {
  border-color: rgba(136, 153, 180, 0.25);
  transform: translateY(-3px);
}

.v-card-icon,
.work-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: var(--cyan-dim);
  color: var(--cyan);
  margin-bottom: 1rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.stat-item:last-child { border-bottom: none; }

.stat-label,
.repo-stat-label {
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.work-card-top,
.repo-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.work-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--cyan-dim);
  color: var(--cyan);
}

.work-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.work-tags,
.repo-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.work-tags { margin-top: 1.2rem; }

.work-tags span,
.repo-badge {
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.repo-badge-featured {
  background: var(--cyan-dim);
  border-color: rgba(0, 229, 204, 0.2);
  color: var(--cyan);
}

.repo-overview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; }

.repo-stat {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.repo-stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
}

.repo-card { min-height: 220px; }
.join-card { display: flex; flex-direction: column; }
.join-card p { flex: 1; }

.join-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.join-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cyan);
  transition: gap 0.2s ease;
}

.join-link:hover { gap: 0.7rem; }
.cta-bottom { text-align: center; }
.section-cta { padding-bottom: 4rem; }

.cta-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 50%;
  background: radial-gradient(ellipse 50% 70% at 50% 0%, rgba(0, 229, 204, 0.06), transparent);
  pointer-events: none;
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.footer-note,
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }
.delay-4 { transition-delay: 400ms; }

@media (max-width: 1024px) {
  .vision-cards,
  .work-grid,
  .repo-grid,
  .about-layout,
  .repo-overview { grid-template-columns: 1fr; }
  .join-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 7rem 1.25rem 3rem; min-height: 90vh; }
  .hero-title { font-size: clamp(2.4rem, 10vw, 3.8rem); }
  .hero-desc { font-size: 1rem; }
  .hide-mobile { display: none; }
  .section { padding: 4rem 1.25rem; }
  .join-grid,
  .repo-overview-stats { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  .repo-card-top { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .btn { transition: none; }
  .scroll-line,
  .work-status::before { animation: none; opacity: 0.6; }
  #particle-canvas { display: none; }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}
