:root {
  --bg: #050814;
  --bg-elevated: #0b1021;
  --bg-elevated-soft: #11162a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --primary: #3b82f6;
  --primary-soft: rgba(59, 130, 246, 0.18);
  --accent: #22c55e;
  --text-main: #f9fafb;
  --text-subtle: #9ca3af;
  --tag-bg: rgba(148, 163, 184, 0.12);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.65);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text',
    'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #000 100%);
  color: var(--text-main);
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.96),
      rgba(15, 23, 42, 0.78),
      transparent
    );
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 30% 70% 60% 40%;
  background: conic-gradient(from 160deg, #3b82f6, #22c55e, #a855f7, #3b82f6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #e5e7eb;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.6);
}

.logo-text {
  font-size: 15px;
  color: #e5e7eb;
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.nav a {
  color: var(--text-subtle);
  padding: 6px 10px;
  border-radius: 999px;
  transition: all 0.16s ease-out;
}

.nav a:hover {
  color: var(--text-main);
  background: rgba(148, 163, 184, 0.24);
}

/* Hero */

.hero {
  padding: 64px 0 40px;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-detail {
  padding-top: 56px;
}

.hero-text h1 {
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.2;
  margin: 0 0 12px;
}

.hero-subtitle {
  margin: 0 0 18px;
  color: var(--text-subtle);
  font-size: 15px;
}

.hero-subtitle a {
  color: #93c5fd;
  border-bottom: 1px dashed rgba(147, 197, 253, 0.8);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tag {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 12px;
  color: #e5e7eb;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: none;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.4);
  transition: transform 0.14s ease, box-shadow 0.14s ease,
    filter 0.14s ease;
}

.btn-download {
  margin-top: 8px;
  font-size: 13px;
  padding-inline: 18px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 22px 52px rgba(59, 130, 246, 0.5);
}

/* hero metrics card 已移除 */

/* Sections */

.section {
  padding: 32px 0 28px;
}

.section-alt {
  background: radial-gradient(circle at top left, #111827 0, #020617 55%);
}

.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.section-header p {
  margin: 0;
  font-size: 14px;
  color: var(--text-subtle);
}

/* YS Suite */

.ys-suite-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.suite-card {
  padding: 16px 18px 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.38);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.5);
}

.suite-card.ys-active {
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 22px 60px rgba(37, 99, 235, 0.66);
}

.suite-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.suite-header h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.suite-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-subtle);
}

.suite-status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.9);
  white-space: nowrap; /* 防止“建设中”在窄屏下自动换行 */
}

.suite-status-live {
  border-color: rgba(34, 197, 94, 0.85);
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.16);
}

.suite-body {
  font-size: 13px;
}

.suite-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  color: var(--text-subtle);
}

.suite-skills {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suite-skill-pill {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(59, 130, 246, 0.6);
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
    border-color 0.12s ease-out, background 0.12s ease-out;
}

.suite-skill-pill:hover {
  transform: translateY(-1px);
  background: radial-gradient(circle at top left, #1d4ed8 0, #020617 70%);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.55);
}

.pill-title {
  font-size: 14px;
  margin-bottom: 2px;
}

.pill-desc {
  font-size: 12px;
  color: var(--text-subtle);
}

.suite-coming {
  margin: 8px 0 0;
  color: var(--text-subtle);
  font-size: 13px;
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.about-card {
  padding: 14px 16px 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.32);
}

.about-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.about-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-subtle);
}

/* Skills */

.skills-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.36);
  margin-bottom: 12px;
  gap: 2px;
}

.skills-tabs .tab {
  border: none;
  background: transparent;
  color: var(--text-subtle);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.14s ease-out;
}

.skills-tabs .tab.active {
  background: linear-gradient(135deg, #1d4ed8, #4f46e5);
  color: #e5e7eb;
}

.skills-panels {
  margin-top: 4px;
}

.skills-panel {
  display: none;
}

.skills-panel.active {
  display: block;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.skill-card {
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.32);
}

.skill-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.skill-header h3 {
  margin: 0;
  font-size: 15px;
}

.skill-level {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
}

.level-high {
  border-color: rgba(34, 197, 94, 0.7);
  color: #bbf7d0;
}

.level-mid {
  border-color: rgba(59, 130, 246, 0.7);
  color: #bfdbfe;
}

.skill-desc {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-subtle);
}

.skill-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tags li {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: #e5e7eb;
}

/* Projects */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  padding: 14px 16px 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 14px;
}

.project-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.project-card p {
  margin: 0 0 8px;
  color: var(--text-subtle);
}

.project-card ul {
  margin: 0;
  padding-left: 18px;
  color: #e5e7eb;
}

/* Contact */

.contact-card {
  padding: 14px 16px 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.36);
  font-size: 14px;
  color: var(--text-subtle);
}

.contact-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #e5e7eb;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  padding: 14px 0 18px;
  background: radial-gradient(circle at bottom, #020617 0, #000 60%);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-subtle);
}

.footer-note a {
  color: #93c5fd;
}

/* Responsive */

@media (max-width: 960px) {
  .hero-inner {
    flex-direction: column;
  }

  .about-grid,
  .skills-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 56px;
  }

  .nav {
    display: none;
  }

  .hero {
    padding-top: 40px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    justify-content: flex-start;
  }

  .about-grid,
  .skills-grid,
  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* YS 矩阵在手机端改为单列展示，避免内容挤压错乱 */
  .ys-suite-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

