/* style.css — HUM 全维统合系统 作品集 */

/* ========================================
   Design Tokens
   ======================================== */
:root,
[data-theme='light'] {
  /* Surfaces — Warm parchment / ink-on-paper */
  --color-bg: #f5f2ec;
  --color-surface: #faf7f2;
  --color-surface-2: #fdfbf7;
  --color-surface-offset: #eee9e0;
  --color-surface-offset-2: #e4dfd4;
  --color-surface-dynamic: #d9d4c9;
  --color-divider: #d8d2c7;
  --color-border: #ccc4b6;

  /* Text — Ink tones */
  --color-text: #1a1a2e;
  --color-text-muted: #4a4842;
  --color-text-faint: #7a7870;
  --color-text-inverse: #f5f2ec;

  /* Primary — Lapis-teal */
  --color-primary: #0d6b73;
  --color-primary-hover: #095056;
  --color-primary-active: #063a3f;
  --color-primary-highlight: #c8dedb;

  /* Accent — Gold (for key nodes / "回归一") */
  --color-gold: #b8860b;
  --color-gold-hover: #9a7009;
  --color-gold-active: #7a5807;
  --color-gold-highlight: #ede2c6;

  /* Accent — Deep purple (consciousness) */
  --color-purple: #5b3a8a;
  --color-purple-hover: #452c6e;
  --color-purple-active: #2f1f52;
  --color-purple-highlight: #ddd0ec;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 280 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 280 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 280 / 0.12);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-en: 'Inter', 'Helvetica Neue', sans-serif;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* Dark Mode — Cosmic deep space */
[data-theme='dark'] {
  --color-bg: #0b0c1a;
  --color-surface: #12132a;
  --color-surface-2: #161834;
  --color-surface-offset: #1a1c3a;
  --color-surface-offset-2: #1e2040;
  --color-surface-dynamic: #282a4a;
  --color-divider: #1e2040;
  --color-border: #2e3060;

  --color-text: #dddbe4;
  --color-text-muted: #9a9cba;
  --color-text-faint: #6a6c8e;
  --color-text-inverse: #0b0c1a;

  --color-primary: #5ab0bd;
  --color-primary-hover: #4a99a6;
  --color-primary-active: #3a808c;
  --color-primary-highlight: #1a3040;

  --color-gold: #e8b842;
  --color-gold-hover: #f0c860;
  --color-gold-active: #f5d880;
  --color-gold-highlight: #3a2e18;

  --color-purple: #a87ee8;
  --color-purple-hover: #9465dc;
  --color-purple-active: #7d4cc8;
  --color-purple-highlight: #2e2440;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
}

/* System dark mode fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0b0c1a;
    --color-surface: #12132a;
    --color-surface-2: #161834;
    --color-surface-offset: #1a1c3a;
    --color-surface-offset-2: #1e2040;
    --color-surface-dynamic: #282a4a;
    --color-divider: #1e2040;
    --color-border: #2e3060;
    --color-text: #dddbe4;
    --color-text-muted: #9a9cba;
    --color-text-faint: #6a6c8e;
    --color-text-inverse: #0b0c1a;
    --color-primary: #5ab0bd;
    --color-primary-hover: #4a99a6;
    --color-primary-active: #3a808c;
    --color-primary-highlight: #1a3040;
    --color-gold: #e8b842;
    --color-gold-hover: #f0c860;
    --color-gold-active: #f5d880;
    --color-gold-highlight: #3a2e18;
    --color-purple: #a87ee8;
    --color-purple-hover: #9465dc;
    --color-purple-active: #7d4cc8;
    --color-purple-highlight: #2e2440;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.5);
  }
}

/* ========================================
   Layout Utilities
   ======================================== */
.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container-wide {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-32));
  position: relative;
}

.section-label {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-3);
  font-weight: 500;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-8);
  letter-spacing: 0.02em;
}

.text-gold {
  color: var(--color-gold);
}

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

.text-purple {
  color: var(--color-purple);
}

/* ========================================
   Header / Navigation
   ======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header--hidden {
  transform: translateY(-100%);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.logo svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
}

.logo-subtext {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
  padding: var(--space-1) 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-interactive);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link:hover::after {
  width: 100%;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid oklch(from var(--color-text) l c h / 0.12);
}

.theme-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-primary);
}

.mobile-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-8);
    z-index: 40;
  }

  .nav--open {
    display: flex;
  }

  .nav-link {
    font-size: var(--text-xl);
  }

  .mobile-nav-toggle {
    display: flex;
    z-index: 60;
    position: relative;
  }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-20) var(--space-4);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
}

.hero-bg svg {
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: var(--content-default);
}

.hero-eyebrow {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-6);
  opacity: 0;
  animation: fadeInUp 0.8s 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-4);
  opacity: 0;
  animation: fadeInUp 0.8s 0.4s forwards;
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--color-primary), var(--color-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 42ch;
  margin: 0 auto var(--space-10);
  opacity: 0;
  animation: fadeInUp 0.8s 0.6s forwards;
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s 0.8s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-interactive);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid oklch(from var(--color-text) l c h / 0.2);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   About / 创始人简介
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-12);
  align-items: start;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.about-portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-surface-offset), var(--color-surface-dynamic));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
}

.about-portrait svg {
  width: 60%;
  height: auto;
  opacity: 0.85;
}

.about-text h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  line-height: 1.2;
}

.about-text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
}

/* ========================================
   Seven Dimensions Matrix
   ======================================== */
.dimensions-intro {
  text-align: center;
  max-width: var(--content-narrow);
  margin: 0 auto var(--space-12);
}

.dimensions-intro p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.7;
}

.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--space-4);
}

.dimension-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-interactive);
  position: relative;
  overflow: hidden;
}

.dimension-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--dim-color, var(--color-primary));
  opacity: 0.8;
}

.dimension-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--dim-color, var(--color-primary));
}

.dimension-number {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-2);
}

.dimension-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  color: var(--dim-color, var(--color-primary));
}

.dimension-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.dimension-name-en {
  font-family: var(--font-en);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.dimension-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Central unifying concept */
.dimensions-center {
  text-align: center;
  margin-top: var(--space-12);
  padding: var(--space-10);
  background: linear-gradient(135deg, oklch(from var(--color-gold) l c h / 0.08), oklch(from var(--color-primary) l c h / 0.05));
  border-radius: var(--radius-xl);
  border: 1px solid oklch(from var(--color-gold) l c h / 0.15);
}

.dimensions-center .unify-text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.05em;
}

.dimensions-center p {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}

/* ========================================
   Works Matrix
   ======================================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: var(--space-6);
}

.work-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: all var(--transition-interactive);
  position: relative;
  overflow: hidden;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: oklch(from var(--color-primary) l c h / 0.2);
}

.work-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, oklch(from var(--color-primary) l c h / 0.06), transparent 70%);
  pointer-events: none;
}

.work-icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}

.work-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.work-tag {
  display: inline-block;
  font-family: var(--font-en);
  font-size: var(--text-xs);
  color: var(--color-gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.work-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ========================================
   Methodology
   ======================================== */
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .method-grid {
    grid-template-columns: 1fr;
  }
}

.method-card {
  text-align: center;
  padding: var(--space-8);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-text) l c h / 0.06);
}

.method-number {
  font-family: var(--font-en);
  font-size: var(--text-3xl);
  font-weight: 200;
  color: oklch(from var(--color-primary) l c h / 0.3);
  line-height: 1;
  margin-bottom: var(--space-4);
}

.method-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.method-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Method flow connector */
.method-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-8) 0;
  color: var(--color-text-faint);
}

.method-flow svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .method-flow {
    transform: rotate(90deg);
  }
}

/* ========================================
   Mission / 使命结尾
   ======================================== */
.mission {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mission::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, oklch(from var(--color-gold) l c h / 0.06), transparent 60%);
  pointer-events: none;
}

.mission-content {
  position: relative;
  z-index: 1;
  max-width: var(--content-narrow);
  margin: 0 auto;
}

.mission-quote {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-6);
}

.mission-quote .highlight {
  color: var(--color-gold);
}

.mission-sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ========================================
   Contact
   ======================================== */
.contact {
  text-align: center;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-en);
  font-size: var(--text-xl);
  color: var(--color-primary);
  text-decoration: none;
  padding: var(--space-4) var(--space-8);
  border: 1px solid oklch(from var(--color-primary) l c h / 0.2);
  border-radius: var(--radius-full);
  margin-top: var(--space-6);
  transition: all var(--transition-interactive);
}

.contact-email:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact-email svg {
  width: 20px;
  height: 20px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.08);
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
}

.footer-logo svg {
  width: 24px;
  height: 24px;
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-family: var(--font-en);
}

/* ========================================
   Scroll Reveal Animations — CSS only, content always visible
   ======================================== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  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);
}

.reveal:nth-child(2) {
  transition-delay: 0.1s;
}
.reveal:nth-child(3) {
  transition-delay: 0.2s;
}
.reveal:nth-child(4) {
  transition-delay: 0.3s;
}
.reveal:nth-child(5) {
  transition-delay: 0.4s;
}
.reveal:nth-child(6) {
  transition-delay: 0.5s;
}
.reveal:nth-child(7) {
  transition-delay: 0.6s;
}

/* ========================================
   Starfield background animation
   ======================================== */
@keyframes drift {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-10px, -10px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.8;
  }
}

.starfield circle {
  animation: pulse 3s ease-in-out infinite;
}

.starfield circle:nth-child(2n) {
  animation-delay: 1s;
  animation-duration: 4s;
}

.starfield circle:nth-child(3n) {
  animation-delay: 2s;
  animation-duration: 5s;
}

.hero-bg-wrapper {
  animation: drift 20s ease-in-out infinite;
}
