/* ═══════════════════════════════════════════════════════════════
   AI+写作 个人作品集网站 — 全局样式
   设计系统：深空/深海主题
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Background layers — deep ocean / universe */
  --bg-deepest:    #020712;
  --bg-deep:       #0a1128;
  --bg-card:       #111b3d;
  --bg-surface:    #162147;

  /* Text hierarchy */
  --text-primary:  #e8edf5;
  --text-secondary:#8899b4;
  --text-muted:    #556680;

  /* Accent colors */
  --accent-blue:   #4a8ef0;
  --accent-cyan:   #3dd6d0;
  --accent-gold:   #c9a96e;
  --accent-purple: #7c5ce7;

  /* Functional */
  --particle:      #3dd6d0;
  --glow:          rgba(61, 214, 208, 0.15);
  --glow-strong:   rgba(61, 214, 208, 0.30);
  --border:        rgba(136, 153, 180, 0.12);
  --border-hover:  rgba(61, 214, 208, 0.30);

  /* Spacing (8px grid) */
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  40px;
  --space-xl:  64px;
  --space-2xl: 96px;
  --space-3xl: 160px;

  /* Typography */
  --font-title:   'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-body:    'Inter', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono:    'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;

  /* Sizes */
  --max-width:    1200px;
  --radius:       12px;
  --radius-sm:    8px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-deepest);
  overflow-x: hidden;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 4rem); }      /* Hero title */
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }   /* Section title */
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }     /* Card title */
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 600; }

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}
a:hover {
  color: var(--accent-blue);
}

/* ── Layout ──────────────────────────────────────────────── */
.section {
  min-height: 100vh;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  margin-bottom: var(--space-sm);
  opacity: 0.7;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s var(--ease-out),
              transform 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out);
  cursor: pointer;
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--glow);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}
.btn:hover {
  border-color: var(--accent-cyan);
  background: rgba(61, 214, 208, 0.06);
  color: var(--accent-cyan);
}
.btn-primary {
  border-color: var(--accent-cyan);
  background: rgba(61, 214, 208, 0.08);
  color: var(--accent-cyan);
}
.btn-primary:hover {
  background: rgba(61, 214, 208, 0.15);
}

/* ── Tags / Labels ───────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.tag-academic  { background: rgba(74, 142, 240, 0.12);  color: var(--accent-blue);   }
.tag-literary  { background: rgba(201, 169, 110, 0.12); color: var(--accent-gold);   }
.tag-business  { background: rgba(124, 92, 231, 0.12);  color: var(--accent-purple); }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  width: 60px;
  height: 1px;
  background: var(--border);
  margin: var(--space-md) 0;
}

/* ── Glow accent line ────────────────────────────────────── */
.accent-line {
  width: 40px;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 1px;
  margin-bottom: var(--space-md);
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deepest);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── Selection ───────────────────────────────────────────── */
::selection {
  background: rgba(61, 214, 208, 0.25);
  color: var(--text-primary);
}

/* ── Utility ─────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Responsive: Tablet ──────────────────────────────────── */
@media (max-width: 1023px) {
  .section {
    padding: var(--space-2xl) var(--space-md);
  }
}

/* ── Responsive: Mobile ──────────────────────────────────── */
@media (max-width: 767px) {
  .section {
    padding: var(--space-xl) var(--space-sm);
    min-height: auto;
  }
}
