/* ─────────────────────────────────────────────────────────────
   Julie Yu · 个人网站
   2026-10-22：黑色首尾 + 浅色正文，亮黄 #ffdf00 只在深底做文字色。
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #fbf9f3;
  --bg-2: #f6f3ea;
  --bg-3: #efe6c9;
  --header-bg: #141412;
  --ink: #1a1a17;
  --ink-2: #4b4a43;
  --ink-3: #8a8a80;
  --ink-on-dark: #f4f1ea;
  --ink-2-on-dark: #c8c5bb;
  --ink-3-on-dark: #9a978c;
  --line: #ead888;
  --line-2: #dcc86a;
  --line-on-dark: rgba(255, 223, 0, 0.18);
  --accent: #ffdf00;
  --accent-deep: #b88600;

  /* 排版尺度：字距按字号的百分比给（参考站大标题统一 −5%） */
  --track-display: -0.015em;
  --track-h2: -0.035em;
  --track-h3: -0.025em;

  /* 正文：小米 MiSans（course.starxops.com 全站主字体）
     大标题：快看世界体（该站首屏标题用的展示字体） */
  --sans: "MiSans", -apple-system, BlinkMacSystemFont, "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --display: "快看世界体", "MiSans", -apple-system, BlinkMacSystemFont,
             "PingFang SC", sans-serif;

  --wrap: min(1120px, calc(100% - 80px));
}

@font-face {
  font-family: "快看世界体";
  src: url("fonts/kuaikan-shijie.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, dl, dd, dt, ul, ol, li, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 4px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: var(--ink); }

.wrap { width: var(--wrap); margin-inline: auto; }

/* 仅中文展示的内容：英文模式下隐藏。 */
html[lang^="en"] .zh-only { display: none; }
html:not([lang^="en"]) .en-only { display: none; }

/* 2026-10-22：文章区暂时从页面拿掉，HTML 结构保留。 */
.is-hidden { display: none !important; }

.skip-link {
  position: fixed;
  top: -80px;
  left: 20px;
  z-index: 99;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}
.skip-link:focus { top: 16px; }

/* ── 顶栏 ─────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line-on-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 72px;
}

.brand {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.4px;
  white-space: nowrap;
  color: var(--accent);
}
.brand:hover { color: #fff8dc; }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 13.5px;
  color: var(--ink-2-on-dark);
}
.nav a { transition: color 0.18s; }
.nav a:hover { color: var(--accent); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-2-on-dark);
  padding: 6px 9px;
  border: 1px solid rgba(244, 241, 234, .32);
  border-radius: 3px;
  transition: color 0.18s, border-color 0.18s;
}
.lang:hover { color: #fff; border-color: var(--accent); }

.header-cta {
  font-size: 13px;
  padding: 8px 15px;
  background: var(--accent);
  color: var(--ink);
  border-radius: 3px;
  transition: background 0.18s;
}
.header-cta:hover { background: #ffe44d; }

.menu { display: none; }
.menu i {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink-on-dark);
  margin: 5px 0;
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--header-bg);
  color: var(--ink-on-dark);
}

.hero-dots-fallback,
.hero-dot-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(#0000, #000 14%, #000 78%, #0000);
  -webkit-mask-image: linear-gradient(#0000, #000 14%, #000 78%, #0000);
}
.hero-dots-fallback {
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1.2px);
  background-size: 24px 24px;
  background-position: 12px 12px;
}
html.has-hero-dots .hero-dots-fallback { visibility: hidden; }

.color-band {
  height: 10px;
  background: var(--accent);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 88px 76px;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: 64px;
  align-items: center;
  min-height: 560px;
}

.hero-copy { min-width: 0; }

.hero-visual {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 460px;
}

.hero-visual-halo {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: min(94%, 470px);
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, rgba(255, 223, 0, .38), rgba(255, 223, 0, .12) 58%, rgba(255, 223, 0, 0) 74%);
  pointer-events: none;
}

.hero-visual-img {
  position: relative;
  z-index: 1;
  width: min(78%, 366px);
  height: auto;
  max-height: 520px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 22px 34px rgba(26, 26, 23, .13));
}

.hero-visual-card {
  position: relative;
  z-index: 2;
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.hero-visual-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.3px;
  color: var(--accent);
}
.hero-visual-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-2-on-dark);
}

.hero-eyebrow {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2-on-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: "";
  width: 32px;
  height: 4px;
  background: var(--accent);
  flex: none;
}

.hero h1 {
  margin-top: 30px;
  font-family: var(--display);
  font-size: clamp(38px, 4.4vw, 62px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: var(--track-display);
  max-width: 12.5em;
  color: var(--ink-on-dark);
}
.hero-headline-static,
#hero-headline-type,
.hero-headline-typed {
  line-height: inherit;
  letter-spacing: inherit;
}
.hero-accent { color: var(--accent); }

.hero-role {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  font-size: 14px;
  color: var(--ink-on-dark);
}
.hero-role strong { font-weight: 600; }
.hero-role span { color: var(--ink-2-on-dark); }
.hero-role span::before {
  content: "·";
  margin-right: 14px;
  color: var(--accent);
}

.hero-lead {
  margin-top: 22px;
  max-width: 40em;
  color: var(--ink-2-on-dark);
  font-size: 16px;
  line-height: 1.75;
}

.hero-actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  font-size: 13.5px;
  padding: 12px 18px;
  border-radius: 3px;
  transition: background .18s, border-color .18s, transform .18s;
}
.btn span[aria-hidden] { font-size: 15px; }
.btn-solid { background: var(--accent); color: var(--ink); }
.btn-solid:hover { background: #ffe44d; transform: translateY(-1px); }
.btn-ghost {
  border: 2px solid rgba(244, 241, 234, .42);
  color: var(--ink-on-dark);
  padding-inline: 17px;
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(255, 223, 0, .08);
}

/* ── 数据条 ───────────────────────────────────────────────── */

.proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  padding-block: 32px;
}

.proof-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-inline: 30px;
  border-right: 2px solid var(--line);
}
.proof-item:first-child { padding-left: 0; }
.proof-item:last-child { border-right: 0; }

.proof-item strong {
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 500;
  letter-spacing: var(--track-h2);
  line-height: 0.95;
}
.proof-item strong span { color: var(--accent-deep); font-weight: 500; }
.proof-item > span {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.6;
}

/* ── 区块通用 ─────────────────────────────────────────────── */

.section {
  padding-block: 104px;
  border-bottom: 2px solid var(--line);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.section-no {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.section-no::after {
  content: "";
  width: 26px;
  height: 3px;
  background: var(--accent);
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: var(--track-h2);
}

.section-lead {
  margin-top: 16px;
  max-width: 42em;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.75;
}
.section-head + .section-lead { margin-left: 34px; }

/* ── 01 核心能力 ──────────────────────────────────────────── */

/* 2026-10-12：四行文字列表改为四张海报。默认并排缩略，
   点击后该卡横向展开显示说明，其余三张收起。手机端转为纵向手风琴。 */
.cap-grid {
  margin-top: 44px;
  display: flex;
  align-items: stretch;
  gap: 14px;
}

/* Flex 项目才能靠 flex-grow 撑开——Grid 里这条属性无效。
   收起时四张等宽，展开的那张吃掉大部分宽度。 */
.cap-card { flex: 1 1 0; min-width: 0; }
.cap-card.is-open { flex-grow: 2.35; }

.cap-card {
  --cap-bg: var(--bg-2);
  --cap-fg: var(--ink);
  position: relative;
  min-width: 0;
  border-radius: 3px;
  background: var(--cap-bg);
  color: var(--cap-fg);
  overflow: hidden;
  transition: flex-grow .5s cubic-bezier(.22, .78, .26, 1), background .35s;
}
.cap-card:nth-child(1) { --cap-bg: var(--bg-2); --cap-fg: #2a2823; }
.cap-card:nth-child(2) { --cap-bg: #ffe566; --cap-fg: #2a2823; }
.cap-card:nth-child(3) { --cap-bg: var(--accent); --cap-fg: #27251e; }
.cap-card:nth-child(4) { --cap-bg: #2a2c25; --cap-fg: #eae3c6; }

.cap-toggle {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  min-height: 286px;
  padding: 22px 20px 24px;
  text-align: left;
  color: inherit;
  transition: padding .4s;
}

.cap-art {
  display: block;
  width: 100%;
  color: currentColor;
  opacity: .5;
  transition: opacity .35s, transform .5s cubic-bezier(.22,.78,.26,1);
}
.cap-art svg { width: 74px; height: 74px; display: block; }
.cap-card:hover .cap-art { opacity: .8; }

.cap-ord {
  margin-top: auto;
  padding-top: 60px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  opacity: .62;
}

.cap-title {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: var(--track-h3);
  line-height: 1.32;
}

.cap-panel { padding: 0 20px 26px; }
.cap-panel[hidden] { display: none; }
.cap-panel p {
  font-size: 14px;
  line-height: 1.8;
  opacity: .86;
}
.cap-panel p + p { margin-top: 10px; }

/* 展开态：桌面端横向让位 */
.cap-card.is-open {
  background: var(--cap-bg);
}
.cap-card.is-open .cap-toggle { min-height: 200px; padding-bottom: 16px; }
.cap-card.is-open .cap-art { opacity: .9; transform: translateY(-4px); }
.cap-card.is-open .cap-ord { padding-top: 30px; }
.cap-card.is-open .cap-title {
  font-size: clamp(22px, 2.1vw, 28px);
  letter-spacing: var(--track-h2);
}

@media (min-width: 761px) {
  .cap-grid:has(.is-open) .cap-card:not(.is-open) { opacity: .58; }
  .cap-grid:has(.is-open) .cap-card:not(.is-open):hover { opacity: 1; }
}

/* ── 02 经历 ──────────────────────────────────────────────── */

.exp-list { margin-top: 44px; }

.exp-list li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 32px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.exp-list li:first-child { border-top: 0; padding-top: 0; }

.exp-when {
  font-size: 12px;
  color: var(--ink-3);
}

.exp-list h3 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: var(--track-h3);
}
.exp-list h3 span { font-weight: 400; color: var(--ink-3); }

.exp-list p {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ink-2);
}

/* ── 03 项目 ──────────────────────────────────────────────── */

.work-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
}

.work-card { min-width: 0; }

.work-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.work-meta span:first-child {
  color: var(--ink);
  font-weight: 600;
}
.work-meta span + span::before {
  content: "·";
  margin-right: 12px;
  color: var(--line-2);
}

.work-card h3 {
  margin-top: 18px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: var(--track-h2);
  line-height: 1.25;
}

.work-card > p {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.85;
}

.work-nums { margin-top: 26px; }
.work-nums > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
  padding-block: 12px;
  border-top: 1px solid var(--line);
}
.work-nums dt { font-size: 13px; color: var(--ink-3); }
.work-nums dd {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── 04 文章 ──────────────────────────────────────────────── */

.write-list { margin-top: 40px; }

.write-list a {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding-block: 20px;
  border-top: 1px solid var(--line);
  transition: color 0.18s;
}
.write-list li:last-child a { border-bottom: 1px solid var(--line); }
.write-list a:hover { color: var(--accent-deep); }

.write-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.write-list a:hover .write-tag { color: var(--accent-deep); }

.write-list h3 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: var(--track-h3);
}

.write-arrow {
  font-size: 15px;
  color: var(--ink-3);
  transition: transform 0.18s, color 0.18s;
}
.write-list a:hover .write-arrow {
  color: var(--accent-deep);
  transform: translate(2px, -2px);
}

/* ── 05 资源库 ────────────────────────────────────────────── */

.section-resources {
  background: var(--bg-2);
  border-bottom: 2px solid var(--line);
}

.res-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 44px;
}

.res-group h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--accent);
}

/* 2026-10-12：由文字链接改为极简卡片，hover 上浮 + 边框转暖黄。 */
.res-cards {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.res-cards li { display: flex; }

.res-cards a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 16px 40px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg);
  transition: transform .24s cubic-bezier(.22,.78,.26,1),
              border-color .24s, background .24s, box-shadow .24s;
}
.res-cards a:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 10px 22px rgba(26, 26, 23, .07);
}

.res-cards strong {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: var(--track-h3);
}

.res-cards span {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.65;
}

.res-arrow {
  position: absolute;
  top: 15px;
  right: 15px;
  font-style: normal;
  font-size: 13px;
  color: var(--ink-3);
  opacity: .5;
  transition: opacity .24s, color .24s, transform .24s;
}
.res-cards a:hover .res-arrow {
  opacity: 1;
  color: var(--accent-deep);
  transform: translate(2px, -2px);
}

.res-note {
  margin-top: 34px;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ── 06 联系 ──────────────────────────────────────────────── */

.contact {
  background: var(--header-bg);
  color: var(--ink-on-dark);
  border-bottom: 0;
  padding-bottom: 96px;
}
.contact .section-head h2 { color: var(--ink-on-dark); }
.contact .section-lead { color: var(--ink-2-on-dark); }
.contact .section-no { color: var(--ink-3-on-dark); }

.contact-list {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line-on-dark);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}
.contact-list li { display: flex; align-items: center; }
.contact-list .contact-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-on-dark);
  line-height: 0;
  cursor: pointer;
}
.contact-list .contact-mark:hover { color: var(--accent); }
.contact-mark .mark-label,
.qr-pop .mark-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.contact-mark svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}
.contact-mark svg.is-wordmark {
  width: auto;
  height: 18px;
}

.qr-pop {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  overflow: auto;
}
.qr-pop::backdrop { background: rgba(20, 20, 18, .72); }
.qr-pop img { width: 100%; height: auto; display: block; }
.qr-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, .9);
  border-radius: 50%;
}
.qr-close svg { width: 14px; height: 14px; }

/* ── 页脚 ─────────────────────────────────────────────────── */

.site-footer {
  background: var(--header-bg);
  padding-block: 40px 48px;
  border-top: 1px solid rgba(244, 241, 234, .1);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 11.5px;
  color: var(--ink-3-on-dark);
}
.footer-brand { font-size: 13px; font-weight: 600; color: var(--ink-on-dark); }
.footer-inner a:hover { color: var(--accent); }

/* ── 响应式 ───────────────────────────────────────────────── */

@media (max-width: 1000px) {
  :root { --wrap: calc(100% - 56px); }
  .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 40px; }
  .contact-list { gap: 8px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* 中文：把履历和项目并为一本横向滚动画廊；英文保留原有版面。 */
html:not([lang^="en"]) .proof,
html:not([lang^="en"]) #work,
html:not([lang^="en"]) #experience .exp-list,
html:not([lang^="en"]) .nav a[href="#work"],
html:not([lang^="en"]) .write-list,
html:not([lang^="en"]) #writing .section-lead { display: none; }
html[lang^="en"] .project-rail { display: none; }

/* 2026-10-12：由「箭头翻页」改为「横向滚动画廊」（Julie 决定不做圆形）。
   索引栏在左，卡片横向拖着走，snap 对齐；无自动播放。 */
.project-rail {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rail-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding-block: 14px;
}

.rail-index {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rail-index::-webkit-scrollbar { display: none; }

.rail-index button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
  transition: color .22s, background .22s;
}
.rail-index button:hover { color: var(--ink); background: rgba(26, 26, 23, .04); }
.rail-index button[aria-current="true"] {
  color: var(--ink);
  background: var(--accent);
}
.rail-num { font-variant-numeric: tabular-nums; opacity: .72; }
.rail-name { font-weight: 500; letter-spacing: -.2px; }

.rail-nav { display: flex; align-items: center; gap: 10px; }
.rail-status {
  margin-right: 10px;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rail-prev, .rail-next {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 19px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.rail-prev:hover, .rail-next:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* 滚动轨道：卡片露出约 62% 视口宽，右侧留出下一张的边角做「还有内容」的暗示 */
.rail-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  padding-bottom: 4px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.rail-track::-webkit-scrollbar { height: 3px; }
.rail-track::-webkit-scrollbar-thumb { background: var(--line-2); }
.rail-track:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 4px; }

.rail-card {
  --rail-bg: #e7e4d8;
  --rail-fg: #252720;
  flex: 0 0 clamp(280px, 62%, 760px);
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(0, 40%) minmax(0, 60%);
  min-height: 440px;
  background: var(--rail-bg);
  color: var(--rail-fg);
  overflow: hidden;
  will-change: transform;
}
/* 末张和前面一样宽，靠右对齐。铺满会把版式拉变形；右侧再垫空档又像多了一页空白。 */
.rail-card:last-child { scroll-snap-align: end; }

.rail-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--rail-bg);
  color: var(--rail-fg);
}
.rail-visual::after {
  content: "";
  position: absolute;
  inset: -50%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 44%, rgba(255, 255, 255, .16) 50%, transparent 56%);
  transform: translateX(-75%);
}
.rail-card.is-active .rail-visual::after { animation: rail-sweep 950ms ease-out both; }

.rail-visual-index, .rail-visual-name { position: absolute; z-index: 1; left: 26px; }
.rail-visual-index {
  top: 24px;
  font-size: 11px;
  letter-spacing: .13em;
  font-variant-numeric: tabular-nums;
}
.rail-visual-name {
  bottom: 22px;
  max-width: calc(100% - 52px);
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 600;
  letter-spacing: -.06em;
  line-height: 1;
  overflow-wrap: anywhere;
}
.rail-art { width: min(70%, 300px); height: auto; color: inherit; opacity: .9; }
.rail-card.is-active .rail-art { animation: rail-art-in 680ms cubic-bezier(.2,.75,.25,1) both; }

.theme-aleo { --rail-bg: #26271f; --rail-fg: #e9d67b; }
.theme-block { --rail-bg: #e9dfc0; --rail-fg: #332f24; }
.theme-creator { --rail-bg: var(--accent); --rail-fg: #27251e; }
.theme-dao { --rail-bg: #e3e7dc; --rail-fg: #354035; }
.theme-finance { --rail-bg: #252923; --rail-fg: #e6deb0; }
.theme-hedge { --rail-bg: #e9e1d6; --rail-fg: #534b3d; }

.rail-copy {
  min-width: 0;
  padding: 40px clamp(24px, 3.4vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rail-card.is-active .rail-copy { animation: rail-copy-in 450ms ease-out both; }

.rail-role { color: var(--ink-3); font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.rail-role span { color: var(--accent-deep); padding-inline: 5px; }

.rail-copy h3 {
  margin-top: 15px;
  max-width: 18em;
  font-size: clamp(23px, 2.2vw, 33px);
  font-weight: 500;
  letter-spacing: var(--track-h2);
  line-height: 1.25;
  text-wrap: balance;
}
.rail-description {
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.8;
}
.theme-aleo .rail-description, .theme-finance .rail-description { color: inherit; opacity: .84; }

.rail-facts { margin-top: 24px; border-top: 1px solid currentColor; }
.rail-facts li {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 14px;
  align-items: baseline;
  padding-block: 10px;
  border-bottom: 1px solid currentColor;
  font-size: 12.5px;
  line-height: 1.55;
}
.rail-facts li { border-color: color-mix(in srgb, currentColor 26%, transparent); }
.rail-facts span { opacity: .68; }
.rail-facts strong { font-weight: 600; overflow-wrap: anywhere; }

@keyframes rail-copy-in { from { transform: translateY(14px); } to { transform: none; } }
@keyframes rail-art-in { from { opacity: .55; transform: scale(.88) rotate(-5deg); } to { opacity: .9; transform: none; } }
@keyframes rail-sweep { from { transform: translateX(-75%); } to { transform: translateX(75%); } }

@media (max-width: 1000px) {
  .rail-card { min-height: 470px; grid-template-columns: minmax(0, 38%) minmax(0, 62%); }
  .rail-copy { padding: 32px; }
}

/* ── 中文文章区空态（2026-10-12）─────────────────────────────
   只留标题与极简线框，等 Julie 提供文章后再填入条目。 */
.write-blank {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
}
.write-blank span {
  height: 62px;
  border-top: 1px solid var(--line);
}
.write-blank span:last-child { border-bottom: 1px solid var(--line); }
.write-blank span::after {
  content: "";
  display: block;
  width: 34%;
  height: 9px;
  margin-top: 26px;
  border-radius: 2px;
  background: var(--line);
  opacity: .62;
}
.write-blank span:nth-child(2)::after { width: 46%; }
.write-blank span:nth-child(3)::after { width: 27%; }

/* 文章 / 资源库用很淡的奶白做节奏，不要大面积饱和黄。 */
html:not([lang^="en"]) .section-resources { background: var(--bg-2); }
html:not([lang^="en"]) #writing { background: var(--bg-2); }

/* ── 滚动进场（2026-10-12）──────────────────────────────────
   参考站靠 CSS keyframes；这里用 IntersectionObserver 加类。
   渐进增强：默认全部可见，只有 JS 接管时（html.has-reveal）
   才压到透明再淡入，JS 失败时页面照样完整可读。 */
html.has-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
}
html.has-reveal .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .72s cubic-bezier(.22,.78,.26,1),
              transform .72s cubic-bezier(.22,.78,.26,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: auto;
}

/* 中文首屏（2026-10-12 更新）：内容仍只保留标题、介绍和两个按钮，
   但右栏不再是空的——放 Julie 的 IP 形象。眉标与角色行继续隐藏。 */
html:not([lang^="en"]) .hero-copy { max-width: 640px; }
html:not([lang^="en"]) .hero-eyebrow,
html:not([lang^="en"]) .hero-role { display: none; }
html:not([lang^="en"]) .hero h1 { margin-top: 0; }
html:not([lang^="en"]) .hero-lead {
  max-width: 45em;
  margin-top: 26px;
  font-size: 16.5px;
}
html:not([lang^="en"]) .hero-inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }

@media (max-width: 760px) {
  html:not([lang^="en"]) .hero-inner { grid-template-columns: 1fr; padding-block: 66px 56px; }
  html:not([lang^="en"]) .hero-copy { max-width: none; }
  html:not([lang^="en"]) .hero-lead { font-size: 14px; margin-top: 22px; }
}

/* ── 手机布局（2026-10-12）────────────────────────────────────
   顺序必须在所有宽屏规则之后，否则会被覆盖。 */
@media (max-width: 760px) {
  :root { --wrap: calc(100% - 40px); }
  html { scroll-padding-top: 82px; }

  .header-inner { min-height: 60px; gap: 16px; }
  .brand { font-size: 16px; }

  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line-on-dark);
    padding: 6px 20px 14px;
    font-size: 15px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid rgba(244, 241, 234, .12); }
  .header-cta { display: none; }
  .menu { display: block; padding: 6px 0; }

  /* 首屏：文案在上，IP 形象在下 */
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-block: 64px 56px;
    min-height: 0;
  }
  .hero-visual { min-height: 0; justify-content: flex-start; }
  .hero-visual-img { width: min(70%, 292px); max-height: none; }
  .hero-visual-halo { width: min(86%, 330px); bottom: 20%; }
  .hero-visual-card { margin-top: 14px; }
  .hero h1 { font-size: clamp(27px, 7.6vw, 34px); }
  .hero-role { font-size: 13px; margin-top: 22px; }
  .hero-role span::before { margin-right: 10px; }
  .hero-lead { font-size: 14px; }
  .hero-actions { margin-top: 28px; }
  .btn { padding: 11px 15px; gap: 16px; font-size: 13px; }

  .proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 0;
    padding-block: 26px;
  }
  .proof-item { padding-inline: 20px; }
  .proof-item:nth-child(odd) { padding-left: 0; }
  .proof-item:nth-child(2n) { border-right: 0; }
  .proof-item strong { font-size: 25px; letter-spacing: -1px; }
  .proof-item > span { font-size: 11.5px; }

  .section { padding-block: 56px; }
  .section-head { gap: 14px; }
  .section-head h2 { font-size: 21px; }
  .section-head + .section-lead { margin-left: 0; }

  /* 核心能力：纵向手风琴，不做放大 */
  .cap-grid {
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
  }
  .cap-card.is-open { flex-grow: 0; }
  .cap-toggle {
    min-height: 0;
    padding: 17px 17px 18px;
    flex-direction: row;
    align-items: center;
    gap: 13px;
  }
  .cap-art { width: auto; flex: none; }
  .cap-art svg { width: 32px; height: 32px; }
  .cap-ord { margin: 0; padding-top: 0; order: -1; }
  .cap-title { margin-top: 0; margin-left: auto; font-size: 15px; text-align: right; }
  .cap-panel { padding: 0 17px 19px; }
  .cap-panel p { font-size: 13.5px; }
  .cap-card.is-open .cap-toggle { min-height: 0; padding-bottom: 13px; }
  .cap-card.is-open .cap-title { font-size: 15px; letter-spacing: var(--track-h3); }
  .cap-card.is-open .cap-ord { padding-top: 0; }

  /* 履历画廊：单列卡片 */
  .project-rail { margin-top: 30px; }
  .rail-bar { grid-template-columns: 1fr; gap: 10px; padding-block: 12px; }
  .rail-nav { justify-content: flex-end; }
  .rail-card {
    flex-basis: min(85%, 400px);
    grid-template-columns: 1fr;
    grid-template-rows: 200px 1fr;
    min-height: 0;
  }
  .rail-visual { min-height: 200px; }
  .rail-art { width: 158px; }
  .rail-visual-name { font-size: 25px; }
  .rail-copy { padding: 22px 0 26px; justify-content: flex-start; }
  .rail-copy h3 { font-size: 23px; }
  .rail-description { font-size: 13.5px; }
  .rail-facts { margin-top: 18px; }
  .rail-facts li { gap: 9px; font-size: 12px; }
  .rail-track { gap: 14px; }

  /* 文章：旧英文列表收窄；中文空态线框变矮 */
  .write-list { margin-top: 28px; }
  .write-list a {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    padding-block: 17px;
  }
  .write-tag { grid-column: 1 / -1; }
  .write-list h3 { font-size: 15px; }
  .write-blank { margin-top: 30px; }
  .write-blank span { height: 52px; }
  .write-blank span::after { margin-top: 22px; }

  /* 资源卡片单列 */
  .res-grid { grid-template-columns: 1fr; gap: 30px; margin-top: 30px; }

  .contact { padding-bottom: 64px; }
  .contact-list { gap: 4px 20px; margin-top: 28px; }

  .footer-inner { flex-wrap: wrap; }
  .footer-inner > span:nth-child(2) { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  html.has-reveal .reveal { opacity: 1; transform: none; transition: none; }
  .rail-card.is-active .rail-visual::after,
  .rail-card.is-active .rail-art,
  .rail-card.is-active .rail-copy { animation: none; }
  .res-cards a:hover { transform: none; }
}
