/* ============================================================
   元我 MetaMe · About 档案页（profile-archive）
   由 docs/myfile.html 转化而来，套用 MetaMe 浅色设计系统。
   所有规则限定在 .profile-archive 作用域内，避免污染全局与其它页面。
   颜色严格走 --tech-* token；间距用 --gap 倍数；圆角走 --tech-radius*。
   ============================================================ */

.profile-archive {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 48px);
}

/* ====== HERO ====== */
.profile-archive .hero {
  padding: calc(var(--gap) * 6) 0 calc(var(--gap) * 4);
  position: relative;
}

.profile-archive .hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: radial-gradient(ellipse 60% 50% at 50% 20%, color-mix(in srgb, var(--tech-accent) 12%, transparent) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.profile-archive .hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--gap) * 3);
}

@media (min-width: 768px) {
  .profile-archive .hero-inner {
    grid-template-columns: auto 1fr;
    gap: calc(var(--gap) * 4);
    align-items: start;
  }
}

.profile-archive .hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--tech-rule);
  overflow: hidden;
  background: var(--tech-card-bg);
  flex-shrink: 0;
}

.profile-archive .hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-archive .hero-text h1 {
  font-family: var(--font-ui);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--tech-ink);
  margin-bottom: calc(var(--gap) * 0.5);
}

.profile-archive .hero-subtitle {
  font-size: var(--text-lg, 1.125rem);
  color: var(--tech-accent);
  font-weight: 500;
  margin-bottom: calc(var(--gap) * 1);
}

.profile-archive .hero-location {
  font-size: var(--text-sm, 0.875rem);
  color: var(--tech-ink-muted);
  display: flex;
  align-items: center;
  gap: calc(var(--gap) * 0.25);
}

.profile-archive .hero-quote {
  position: relative;
  z-index: 1;
  margin-top: calc(var(--gap) * 3);
  padding: calc(var(--gap) * 2) calc(var(--gap) * 3);
  background: var(--tech-card-bg);
  border-left: 3px solid var(--tech-accent-2);
  border-radius: 0 var(--tech-radius) var(--tech-radius) 0;
  max-width: 720px;
  box-shadow: var(--tech-shadow-1);
}

.profile-archive .hero-quote p {
  font-size: 1rem;
  color: var(--tech-ink-body);
  line-height: 1.75;
  font-style: italic;
}

.profile-archive .hero-quote cite {
  display: block;
  margin-top: calc(var(--gap) * 0.5);
  font-size: var(--text-sm, 0.875rem);
  color: var(--tech-ink-muted);
  font-style: normal;
}

/* ====== SECTION ====== */
.profile-archive .section {
  padding: calc(var(--gap) * 4) 0;
  border-top: 1px solid var(--tech-rule);
}

.profile-archive .section-label {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tech-accent);
  margin-bottom: calc(var(--gap) * 0.5);
}

.profile-archive .section-title {
  font-family: var(--font-ui);
  font-size: var(--text-2xl, 1.5rem);
  font-weight: 600;
  color: var(--tech-ink);
  margin-bottom: calc(var(--gap) * 3);
  line-height: 1.2;
}

/* ====== PROFESSIONAL DIRECTION ====== */
.profile-archive .direction-block {
  display: grid;
  gap: calc(var(--gap) * 2);
}

.profile-archive .direction-statement {
  font-size: var(--text-xl, 1.25rem);
  font-weight: 500;
  color: var(--tech-ink);
  line-height: 1.75;
  max-width: 720px;
}

.profile-archive .direction-statement span {
  display: block;
  color: var(--tech-accent);
  margin-top: calc(var(--gap) * 0.25);
}

.profile-archive .direction-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: calc(var(--gap) * 1.5);
  margin-top: calc(var(--gap) * 1.5);
}

.profile-archive .pillar {
  padding: calc(var(--gap) * 2);
  background: var(--tech-card-bg);
  border: 1px solid var(--tech-rule);
  border-radius: var(--tech-radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-archive .pillar:hover {
  border-color: var(--tech-accent);
  box-shadow: var(--tech-shadow-2);
}

.profile-archive .pillar-icon {
  font-size: var(--text-xl, 1.25rem);
  margin-bottom: calc(var(--gap) * 0.5);
}

.profile-archive .pillar-title {
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  color: var(--tech-ink);
  margin-bottom: calc(var(--gap) * 0.25);
}

.profile-archive .pillar-desc {
  font-size: var(--text-sm, 0.875rem);
  color: var(--tech-ink-body);
  line-height: 1.6;
}

/* ====== TECH STACK ====== */
.profile-archive .tech-levels {
  display: grid;
  gap: calc(var(--gap) * 3);
}

.profile-archive .tech-level {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--gap) * 1.5);
}

@media (min-width: 640px) {
  .profile-archive .tech-level {
    grid-template-columns: 140px 1fr;
    align-items: start;
  }
}

.profile-archive .tech-level-label {
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  color: var(--tech-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: calc(var(--gap) * 0.25);
}

.profile-archive .tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--gap) * 0.5);
}

.profile-archive .tech-tag {
  display: inline-block;
  padding: calc(var(--gap) * 0.25) calc(var(--gap) * 1.5);
  font-size: var(--text-sm, 0.875rem);
  font-family: var(--font-mono);
  border-radius: var(--tech-radius);
  background: color-mix(in srgb, var(--tech-accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--tech-accent) 20%, transparent);
  color: var(--tech-ink);
  white-space: nowrap;
}

.profile-archive .tech-tag.expert {
  background: color-mix(in srgb, var(--tech-accent) 18%, transparent);
  border-color: var(--tech-accent);
  color: #fff;
}

.profile-archive .tech-note {
  margin-top: calc(var(--gap) * 3);
  padding: calc(var(--gap) * 2);
  background: var(--tech-card-bg);
  border: 1px solid var(--tech-rule);
  border-radius: var(--tech-radius);
  font-size: var(--text-sm, 0.875rem);
  color: var(--tech-ink-body);
  line-height: 1.75;
}

.profile-archive .tech-note strong {
  color: var(--tech-ink);
}

/* ====== CSS CASE EVOLUTION ====== */
.profile-archive .evolution-section {
  background: var(--tech-card-bg);
  border: 1px solid var(--tech-rule);
  border-radius: var(--tech-radius-lg);
  padding: calc(var(--gap) * 4);
  margin-top: calc(var(--gap) * 3);
  box-shadow: var(--tech-shadow-1);
}

.profile-archive .evolution-title {
  font-size: var(--text-xl, 1.25rem);
  font-weight: 600;
  color: var(--tech-ink);
  margin-bottom: calc(var(--gap) * 0.5);
}

.profile-archive .evolution-motto {
  font-size: 1rem;
  color: var(--tech-accent);
  font-style: italic;
  margin-bottom: calc(var(--gap) * 3);
}

.profile-archive .evolution-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: calc(var(--gap) * 1.5);
}

.profile-archive .flow-step {
  text-align: center;
  padding: calc(var(--gap) * 2) calc(var(--gap) * 1.5);
  position: relative;
}

.profile-archive .flow-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tech-accent) 18%, transparent);
  border: 1px solid var(--tech-accent);
  color: var(--tech-accent);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 700;
  margin-bottom: calc(var(--gap) * 0.5);
}

.profile-archive .flow-step-title {
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  color: var(--tech-ink);
  margin-bottom: calc(var(--gap) * 0.25);
}

.profile-archive .flow-step-desc {
  font-size: var(--text-xs, 0.75rem);
  color: var(--tech-ink-body);
  line-height: 1.6;
}

/* ====== TIMELINE ====== */
.profile-archive .pf-timeline {
  position: relative;
  padding-left: calc(var(--gap) * 3);
}

.profile-archive .pf-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--tech-rule);
}

.profile-archive .pf-timeline-item {
  position: relative;
  padding-bottom: calc(var(--gap) * 3);
}

.profile-archive .pf-timeline-item:last-child {
  padding-bottom: 0;
}

.profile-archive .pf-timeline-dot {
  position: absolute;
  left: calc(-1 * var(--gap) * 3 + 2px);
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tech-accent);
  border: 2px solid var(--tech-card-bg);
}

.profile-archive .pf-timeline-year {
  font-size: var(--text-sm, 0.875rem);
  font-weight: 700;
  color: var(--tech-accent);
  font-family: var(--font-mono);
  margin-bottom: calc(var(--gap) * 0.25);
}

.profile-archive .pf-timeline-desc {
  font-size: 1rem;
  color: var(--tech-ink-body);
  line-height: 1.75;
}

.profile-archive .pf-timeline-desc strong {
  color: var(--tech-ink);
}

/* ====== WRITING STATS ====== */
.profile-archive .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: calc(var(--gap) * 1.5);
}

.profile-archive .stat-card {
  padding: calc(var(--gap) * 2);
  background: var(--tech-card-bg);
  border: 1px solid var(--tech-rule);
  border-radius: var(--tech-radius);
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-archive .stat-card:hover {
  border-color: var(--tech-accent);
  box-shadow: var(--tech-shadow-2);
}

.profile-archive .stat-value {
  font-size: var(--text-3xl, 1.875rem);
  font-weight: 700;
  color: var(--tech-ink);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.profile-archive .stat-unit {
  font-size: var(--text-sm, 0.875rem);
  color: var(--tech-accent);
  font-weight: 500;
}

.profile-archive .stat-label {
  font-size: var(--text-xs, 0.75rem);
  color: var(--tech-ink-muted);
  margin-top: calc(var(--gap) * 0.25);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ====== PLATFORMS ====== */
.profile-archive .platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: calc(var(--gap) * 0.5);
}

.profile-archive .platform-link {
  display: flex;
  align-items: center;
  gap: calc(var(--gap) * 1.5);
  padding: calc(var(--gap) * 1.5) calc(var(--gap) * 2);
  background: var(--tech-card-bg);
  border: 1px solid var(--tech-rule);
  border-radius: var(--tech-radius);
  transition: border-color 0.2s ease, background 0.2s ease;
  text-decoration: none;
  color: var(--tech-ink);
}

.profile-archive .platform-link:hover {
  border-color: var(--tech-accent);
  background: var(--tech-surface);
  text-decoration: none;
}

.profile-archive .platform-icon {
  font-size: var(--text-xl, 1.25rem);
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.profile-archive .platform-info {
  display: flex;
  flex-direction: column;
}

.profile-archive .platform-name {
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  color: var(--tech-ink);
}

.profile-archive .platform-url {
  font-size: var(--text-xs, 0.75rem);
  color: var(--tech-ink-muted);
  font-family: var(--font-mono);
  overflow-wrap: break-word;
}

/* ====== CERTIFICATIONS ====== */
.profile-archive .cert-list {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--gap) * 1.5);
}

.profile-archive .cert-item {
  display: flex;
  align-items: center;
  gap: calc(var(--gap) * 0.5);
  padding: calc(var(--gap) * 0.5) calc(var(--gap) * 2);
  background: color-mix(in srgb, var(--tech-accent-2) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--tech-accent-2) 22%, transparent);
  border-radius: var(--tech-radius);
  font-size: var(--text-sm, 0.875rem);
  color: var(--tech-accent-2);
  font-weight: 500;
}

/* ====== PERSONAL ====== */
.profile-archive .personal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: calc(var(--gap) * 2);
}

.profile-archive .personal-item {
  padding: calc(var(--gap) * 2);
  background: var(--tech-card-bg);
  border: 1px solid var(--tech-rule);
  border-radius: var(--tech-radius);
}

.profile-archive .personal-label {
  font-size: var(--text-xs, 0.75rem);
  color: var(--tech-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: calc(var(--gap) * 0.25);
}

.profile-archive .personal-value {
  font-size: 1rem;
  color: var(--tech-ink);
  line-height: 1.6;
}

/* ====== BLOG ARCH ====== */
.profile-archive .blog-arch {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--gap) * 1.5);
}

@media (min-width: 640px) {
  .profile-archive .blog-arch {
    grid-template-columns: 1fr 1fr;
  }
}

.profile-archive .blog-arch-item {
  padding: calc(var(--gap) * 2);
  background: var(--tech-card-bg);
  border: 1px solid var(--tech-rule);
  border-radius: var(--tech-radius);
}

.profile-archive .blog-arch-label {
  font-size: var(--text-xs, 0.75rem);
  color: var(--tech-ink-muted);
  margin-bottom: calc(var(--gap) * 0.25);
}

.profile-archive .blog-arch-value {
  font-size: var(--text-sm, 0.875rem);
  color: var(--tech-ink);
  font-family: var(--font-mono);
}

/* ====== FOOTER ====== */
.profile-archive .page-footer {
  padding: calc(var(--gap) * 4) 0;
  border-top: 1px solid var(--tech-rule);
  text-align: center;
}

.profile-archive .footer-philosophy {
  font-size: var(--text-sm, 0.875rem);
  color: var(--tech-ink-muted);
  line-height: 1.75;
  font-style: italic;
  max-width: 720px;
  margin: 0 auto;
}

.profile-archive .footer-philosophy strong {
  color: var(--tech-ink-body);
  font-style: normal;
}

/* ====== PRINT ====== */
@media print {
  .profile-archive .hero::before { display: none; }
  .profile-archive .section { border-top-color: #ddd; }
  .profile-archive .hero-quote { border-left-color: #999; background: #f5f5f5; }
  .profile-archive .pillar,
  .profile-archive .stat-card,
  .profile-archive .platform-link,
  .profile-archive .personal-item,
  .profile-archive .blog-arch-item,
  .profile-archive .evolution-section,
  .profile-archive .tech-note {
    background: #f9f9f9;
    border-color: #ddd;
  }
  .profile-archive .tech-tag { border-color: #999; background: #eee; color: #111; }
  .profile-archive .tech-tag.expert { background: #333; color: #fff; border-color: #333; }
  .profile-archive .cert-item { background: #f3fbfb; border-color: #b9e6e6; color: #00838f; }
  .profile-archive a { color: #0066cc; }
}

/* ====== REDUCED MOTION ====== */
@media (prefers-reduced-motion: reduce) {
  .profile-archive .pillar,
  .profile-archive .stat-card,
  .profile-archive .platform-link { transition: none; }
}
