/* 元创互联 - 视觉系统：数字极简 + 科技创意 */
:root {
  --color-primary: #3a86ff;
  --color-secondary: #8338ec;
  --color-accent: #ff006e;
  --bg-white: #ffffff;
  --bg-card: #f8f9fa;
  --text-dark: #212529;
  --text-mid: #6c757d;
  --border: #e9ecef;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --space-unit: 8px;
  --font-sans: "Inter", "PingFang SC", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 var(--space-unit);
}

h2 {
  font-size: 2rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 calc(var(--space-unit) * 2);
}

h3 {
  font-size: 1.5rem;
  line-height: 1.4;
  font-weight: 600;
  margin: 0 0 var(--space-unit);
}

p {
  margin: 0 0 1rem;
  color: var(--text-mid);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--space-unit) * 2);
}

.section {
  padding: calc(var(--space-unit) * 12) 0;
}

.section--alt {
  background: var(--bg-card);
}

.section__eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary);
  margin-bottom: var(--space-unit);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-dark);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--color-primary);
}

.logo__mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.nav {
  display: none;
  align-items: center;
  gap: calc(var(--space-unit) * 0.5);
}

.nav a {
  padding: 0.5rem 0.75rem;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: 8px;
  text-decoration: none;
}

.nav a:hover,
.nav a.is-active {
  background: var(--bg-card);
  color: var(--color-primary);
  text-decoration: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 1px;
}

.nav--open {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }
}

/* Buttons */
.cta-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.cta-button--primary {
  background: linear-gradient(135deg, var(--color-primary), #2563eb);
  color: #fff;
}

.cta-button--secondary {
  background: var(--bg-white);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.cta-button--accent {
  background: var(--color-accent);
  color: #fff;
}

.cta-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cta-button:active::after {
  width: 200px;
  height: 200px;
}

/* Hero */
.hero {
  padding: calc(var(--space-unit) * 10) 0 calc(var(--space-unit) * 14);
  background: linear-gradient(160deg, #f0f7ff 0%, #faf5ff 45%, #fff5f8 100%);
  position: relative;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: calc(var(--space-unit) * 4);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--space-unit) * 8);
  }
}

.hero__title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, var(--text-dark), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__role {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.skill-tags span {
  padding: 0.35rem 0.75rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--text-dark);
}

.hero__visual {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--color-primary), var(--color-secondary));
  position: relative;
  box-shadow: var(--shadow-md);
  transform: translateZ(0);
}

.hero__visual-inner {
  position: absolute;
  inset: 12%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: calc(var(--space-unit) * 4);
  font-size: 0.75rem;
  color: var(--text-mid);
}

.scroll-hint__line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--color-primary), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scaleY(0.8);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Cards grid */
.cards-grid {
  display: grid;
  gap: calc(var(--space-unit) * 3);
}

@media (min-width: 768px) {
  .cards-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card,
.service-card,
.blog-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: translateZ(0);
}

.project-card:hover,
.service-card:hover,
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.project-card__media {
  aspect-ratio: 16/10;
  background: var(--bg-card);
  object-fit: cover;
}

.project-card__body,
.service-card__body,
.blog-card__body {
  padding: calc(var(--space-unit) * 2);
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.meta-tags span {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: #eef4ff;
  color: var(--color-primary);
  font-weight: 500;
}

.service-card__price {
  font-weight: 700;
  color: var(--color-accent);
  margin-top: 0.5rem;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(var(--space-unit) * 3);
  text-align: center;
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat__num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
}

.stat__label {
  font-size: 0.875rem;
  color: var(--text-mid);
}

/* Footer */
.site-footer {
  background: var(--text-dark);
  color: #adb5bd;
  padding: calc(var(--space-unit) * 8) 0 calc(var(--space-unit) * 4);
  margin-top: 0;
}

.site-footer a {
  color: #dee2e6;
}

.site-footer__grid {
  display: grid;
  gap: calc(var(--space-unit) * 4);
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.site-footer__bottom {
  margin-top: calc(var(--space-unit) * 6);
  padding-top: calc(var(--space-unit) * 3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-mid);
  margin-bottom: calc(var(--space-unit) * 2);
}

.breadcrumb a {
  color: var(--text-mid);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .form-row--2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: calc(var(--space-unit) * 3);
  box-shadow: var(--shadow-md);
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-mid);
}

/* Timeline */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: calc(var(--space-unit) * 3);
  margin-left: 0.5rem;
}

.timeline__item {
  position: relative;
  padding-bottom: calc(var(--space-unit) * 4);
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(var(--space-unit) * -3 - 5px);
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--bg-white);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.timeline__date {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-secondary);
}

/* Radar placeholder (SVG) */
.radar-wrap {
  max-width: 360px;
  margin: 0 auto;
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-bar__row {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
}

.skill-bar__track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.skill-bar__fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transform-origin: left;
  transition: transform 1s ease-out;
}

.skill-bar__fill.is-animated {
  animation: bar-grow 1.2s ease-out forwards;
}

@keyframes bar-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Compare table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-top: 1rem;
}

.compare-table th,
.compare-table td {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  text-align: left;
}

.compare-table th {
  background: var(--bg-card);
  font-weight: 600;
}

/* Animate on scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Utility */
.text-center {
  text-align: center;
}

.hide-until-lg {
  display: none;
}

@media (min-width: 1024px) {
  .hide-until-lg {
    display: inline-flex !important;
  }
}

.mt-0 {
  margin-top: 0;
}

.mb-lg {
  margin-bottom: calc(var(--space-unit) * 4);
}

.split {
  display: grid;
  gap: calc(var(--space-unit) * 4);
}

@media (min-width: 1024px) {
  .split--2 {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

code,
.pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
