/* ==========================================================
   home.css — 主页专用样式
   ========================================================== */

.logo-dot { color: var(--tomato); }

/* ---------- 开场 ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(32px, 5vw, 72px);
  min-height: calc(100vh - 72px); min-height: calc(100svh - 72px);
  padding-block: clamp(32px, 6vw, 72px);
}
.hero-title { font-size: var(--text-hero); font-weight: 800; margin: 26px 0 22px; }
.hero-title .line { display: block; }
.hero-title .name { position: relative; display: inline-block; color: var(--tomato); -webkit-text-stroke: 3px var(--line); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--shadow); }
.squiggle { position: absolute; left: 0; right: 0; bottom: -0.08em; width: 100%; height: 0.2em; color: var(--lemon); z-index: -1; }
.hero-sub { font-size: var(--text-lg); color: var(--muted); max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }

.hero-visual { position: relative; padding: 36px 20px; }
.vibe-window {
  position: relative; z-index: 1;
  background: var(--card); border: var(--border); border-radius: var(--radius-lg); box-shadow: 10px 10px 0 var(--shadow);
  overflow: hidden; transform: rotate(2deg);
}
.vibe-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: var(--lemon); border-bottom: var(--border); }
.vibe-bar i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); }
.vibe-bar i:first-child { background: var(--tomato); }
.vibe-bar span { margin-left: auto; font: 700 var(--text-sm) var(--font-mono); color: var(--on-accent); }
.vibe-log { list-style: none; margin: 0; padding: 22px 20px 26px; display: grid; gap: 12px; min-height: 300px; align-content: start; font-family: var(--font-mono); font-size: 0.95rem; }
.vibe-log li { opacity: 0; transform: translateY(6px); transition: opacity var(--duration-normal), transform var(--duration-normal) var(--ease-out-expo); line-height: 1.5; }
.vibe-log li.is-on { opacity: 1; transform: none; }
.vibe-me { justify-self: end; max-width: 88%; padding: 8px 14px; background: var(--sky); color: var(--on-accent); border: 2px solid var(--line); border-radius: 16px 16px 4px 16px; }
.vibe-ai { color: var(--muted); padding-left: 2px; }
.vibe-ai .vibe-text { color: var(--mint); font-weight: 700; }
:root[data-theme="light"] .vibe-ai .vibe-text { color: #0f8a62; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .vibe-ai .vibe-text { color: #0f8a62; } }
.is-typing .vibe-text::after { content: "▍"; margin-left: 1px; animation: blink 0.8s steps(2) infinite; }

.sticker { position: absolute; z-index: 2; }
.s-star { width: 86px; top: -4px; left: -10px; fill: var(--lemon); stroke: var(--line); stroke-width: 5; stroke-linejoin: round; animation: spin 14s linear infinite; }
.s-bolt { width: 64px; bottom: 6px; left: 12%; fill: var(--grape); stroke: var(--line); stroke-width: 5; stroke-linejoin: round; animation: bob 3s ease-in-out infinite; }
.s-badge {
  right: -6px; bottom: -8px; display: grid; place-items: center; align-content: center; width: 128px; height: 128px;
  font: 800 0.85rem/1.1 var(--font-display); text-align: center; color: var(--on-accent);
  background: var(--mint); border: var(--border); border-radius: 50%; box-shadow: var(--pop-sm); transform: rotate(10deg);
}
.s-badge b { font-size: 2.6rem; line-height: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-8deg); } }

/* ---------- 跑马灯 ---------- */
.marquee { overflow: hidden; background: var(--tomato); color: var(--on-accent); border-block: var(--border); transform: rotate(-1.5deg); margin: 20px -10px; }
.marquee-track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.marquee-run { display: flex; }
.marquee-run span { padding: 14px 22px; font: 800 clamp(1.1rem, 0.9rem + 1vw, 1.6rem) var(--font-display); white-space: nowrap; }
.marquee-run span::after { content: "✦"; margin-left: 44px; color: var(--lemon); -webkit-text-stroke: 1.5px var(--line); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 区块通用 ---------- */
main { overflow-x: clip; }
.section { padding-block: var(--space-section) 0; }

/* ---------- 作品 ---------- */
.works-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; }
.work-card {
  grid-column: span 4; display: flex; flex-direction: column;
  text-decoration: none; background: var(--card); border: var(--border); border-radius: var(--radius-lg); box-shadow: var(--pop);
  overflow: hidden;
  transition: transform var(--duration-normal) var(--ease-out-expo), box-shadow var(--duration-normal) var(--ease-out-expo);
}
a.work-card:hover { transform: translate(-4px, -4px) rotate(-0.6deg); box-shadow: 12px 12px 0 var(--c, var(--shadow)); }
a.work-card:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shadow); }
.work-card.is-feature { grid-column: span 8; display: grid; grid-template-columns: 1.3fr 1fr; }
.work-cover { position: relative; background: #0d0a14; border-bottom: var(--border); overflow: hidden; }
.is-feature .work-cover { border-bottom: 0; border-right: var(--border); }
.work-cover img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; transition: transform 0.6s var(--ease-out-expo); }
a.work-card:hover .work-cover img { transform: scale(1.05); }
.work-type { position: absolute; top: 14px; left: 14px; padding: 3px 12px; font: 800 var(--text-sm) var(--font-display); color: var(--on-accent); background: var(--c); border: 2px solid var(--line); border-radius: 999px; }
.work-body { display: flex; flex-direction: column; gap: 14px; padding: 26px; }
.work-body h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); font-weight: 800; }
.work-body p { color: var(--muted); }
.work-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.work-facts li { padding: 2px 10px; font-size: var(--text-sm); font-weight: 600; border: 2px dashed var(--line); border-radius: 999px; }
.work-play { margin-top: auto; align-self: start; font: 800 1.1rem var(--font-display); color: var(--c); }
.work-play .arrow { display: inline-block; transition: transform var(--duration-normal) var(--ease-spring); }
a.work-card:hover .work-play .arrow { transform: translateX(6px); }

.work-card.is-next {
  align-items: center; justify-content: center; gap: 10px; padding: 32px; text-align: center;
  background: transparent; border-style: dashed; box-shadow: none; min-height: 280px;
}
.is-next h3 { font-size: 1.5rem; }
.is-next p { color: var(--muted); }
.next-mark {
  display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 8px;
  font: 800 2.4rem var(--font-display); color: var(--on-accent); background: var(--lemon);
  border: var(--border); border-radius: 50%; animation: bob 2.6s ease-in-out infinite;
}

/* ---------- 角色条 ---------- */
.cast { padding-top: var(--space-section); }
.cast-head { display: grid; gap: 12px; margin-bottom: 32px; }
.cast-head h2 { font-size: var(--text-xl); font-weight: 800; }
.cast-head p { color: var(--muted); max-width: 52ch; }
.cast-strip { overflow: hidden; border-block: var(--border); background: #1a1426; }
.cast-strip img { width: 100%; min-width: 900px; aspect-ratio: 1600 / 431; object-fit: cover; }

/* ---------- 步骤 ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.step {
  position: relative; display: grid; gap: 12px; align-content: start; padding: 30px 26px 30px;
  background: var(--card); border: var(--border); border-radius: var(--radius); box-shadow: var(--pop);
}
.step:nth-child(2) { transform: translateY(28px); }
.step:nth-child(3) { transform: translateY(56px); }
.step.reveal:not(.is-in) { transform: translateY(60px); }
.step-num {
  display: grid; place-items: center; width: 58px; height: 58px;
  font: 800 1.8rem var(--font-display); color: var(--on-accent); background: var(--c);
  border: var(--border); border-radius: 16px; transform: rotate(-6deg);
}
.step h3 { font-size: 1.5rem; font-weight: 800; }
.step p { color: var(--muted); }

/* ---------- 关于我 ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; padding-top: calc(var(--space-section) + 40px); }
.about-card { padding: clamp(28px, 4vw, 48px); background: var(--lemon); color: var(--on-accent); border: var(--border); border-radius: var(--radius-lg); box-shadow: var(--pop); }
.about-card .section-num { color: var(--on-accent); opacity: 0.7; }
.about-card h2 { font-size: var(--text-xl); font-weight: 800; margin-bottom: 18px; }
.about-text { font-size: var(--text-lg); max-width: 36ch; }
.likes { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.likes .tag { --line: #1b1530; font-size: 1rem; padding: 4px 14px; background: var(--card); color: var(--ink); }
.likes .tag:nth-child(odd) { transform: rotate(-3deg); }
.likes .tag:nth-child(even) { transform: rotate(2deg); }

.timeline { padding: 28px; border: var(--border); border-radius: var(--radius-lg); background: var(--card); }
.timeline h3 { font-size: 1.4rem; margin-bottom: 18px; }
.timeline ol { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 3px dashed var(--line); display: grid; gap: 18px; }
.timeline li { position: relative; display: grid; gap: 2px; }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 5px; width: 14px; height: 14px; background: var(--tomato); border: 3px solid var(--line); border-radius: 50%; }
.timeline li.is-next::before { background: var(--card); }
.timeline time { font: 700 var(--text-sm) var(--font-mono); color: var(--muted); }
.timeline li span { font-weight: 600; }

/* ---------- 结尾 ---------- */
.outro { display: grid; justify-items: center; gap: 32px; padding-block: var(--space-section); text-align: center; }
.outro h2 { font-size: var(--text-hero); font-weight: 800; color: var(--grape); -webkit-text-stroke: 3px var(--line); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--shadow); }

/* ---------- 窄屏 ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-visual { max-width: 520px; }
  .work-card, .work-card.is-feature { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; }
  .step:nth-child(n) { transform: none; }
  .about { grid-template-columns: 1fr; padding-top: var(--space-section); }
}
@media (max-width: 640px) {
  .work-card.is-feature { display: flex; }
  .is-feature .work-cover { border-right: 0; border-bottom: var(--border); }
  .hero-title .name { -webkit-text-stroke-width: 2px; text-shadow: 4px 4px 0 var(--shadow); }
  .s-badge { width: 100px; height: 100px; }
  .s-badge b { font-size: 2rem; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}
