/* 首页专属：Letter Glitch 首屏、关于卡片、作品墙、思考列表 */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero);
  color: #d7efe4;
  min-height: min(72vh, 620px);
}

.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--hero);
}

.hero-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* 左侧压暗，保证标题可读；右侧留出故障字 */
.hero::before {
  background: linear-gradient(90deg, rgba(5, 8, 7, 0.96) 0%, rgba(5, 8, 7, 0.82) 34%, rgba(5, 8, 7, 0.28) 58%, transparent 78%);
}

.hero::after {
  background: radial-gradient(circle, rgba(5, 8, 7, 0) 52%, rgba(5, 8, 7, 0.88) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
  padding: 72px 0 80px;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: clamp(36px, 5.6vw, 58px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.08em;
  color: #e8fff4;
  text-shadow: 0 0 18px rgba(5, 8, 7, 0.9);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

.hero-role {
  margin: 0 0 22px;
  max-width: 28em;
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.65;
  color: rgba(215, 239, 228, 0.9);
  text-shadow: 0 0 16px rgba(5, 8, 7, 0.95);
}

.hero-sub {
  margin: 0 0 22px;
  max-width: 28em;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(215, 239, 228, 0.62);
  text-shadow: 0 0 16px rgba(5, 8, 7, 0.95);
}

.hero-links {
  display: flex;
  gap: 10px;
  color: rgba(97, 220, 163, 0.85);
}

.hero-links a,
.hero-links button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(97, 220, 163, 0.28);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.hero-links a:hover,
.hero-links button:hover,
.hero-links button[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
}


.home-sec {
  padding: 72px 0 24px;
}

.home-sec h2 {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.home-sec h2::before {
  content: "> ";
  color: var(--accent-2);
}

.about-copy {
  margin: 0 0 14px;
  max-width: 42em;
  color: var(--muted);
  font-size: 15px;
}

.beliefs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 36px;
}

.belief {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 20px 20px 22px;
}

.belief h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}

.belief h3::before {
  content: "#";
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 500;
  flex-shrink: 0;
}

.belief p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.work-card {
  display: block;
  color: inherit;
}

.work-card figure {
  margin: 0 0 12px;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: #0a100e;
  aspect-ratio: 16 / 10;
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}

.work-card:hover img {
  transform: scale(1.03);
}

.work-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
}

.work-card p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.tags .accent {
  color: var(--accent);
  border-color: rgba(97, 220, 163, 0.35);
  background: var(--accent-soft);
}

.note-list {
  display: grid;
  gap: 0;
}

.note-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  color: inherit;
}

.note-card:last-child {
  border-bottom: 1px solid var(--line);
}

.note-card time {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.note-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.note-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.note-card:hover h3 {
  color: var(--accent);
}

/* 三值 margin 会把 wrap 的左右 auto 冲掉，CTA 就会贴左、页脚却居中 */
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 56px;
  margin-inline: auto;
  padding: 48px 0 8px;
  border-top: 1px solid var(--line);
}

.cta-copy {
  min-width: 0;
}

.cta h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 28px);
}

.cta p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.contact-ways {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-ways li,
.contact-ways .wechat-anchor,
.contact-ways .mail-anchor {
  display: flex;
}

.contact-ways a,
.contact-ways button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 108px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.06em;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.contact-ways a:hover,
.contact-ways button:hover,
.contact-ways button[aria-expanded="true"] {
  color: var(--accent);
  border-color: rgba(97, 220, 163, 0.4);
}

@media (max-width: 760px) {
  .hero-inner {
    padding: 40px 0 48px;
  }

  .beliefs,
  .work-grid,
  .note-card {
    grid-template-columns: 1fr;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-ways {
    justify-content: flex-start;
  }

  .note-card {
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-card img,
  .work-card:hover img {
    transition: none;
    transform: none;
  }
}
