@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: #F5EFE6;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, .055) 1px, transparent 1px);
  background-size: 34px 34px;
  color: #0F172A;
  font-family: 'Noto Sans TC', -apple-system, 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

:focus-visible {
  outline: 3px solid #E8543F;
  outline-offset: 2px;
}

/* ---------- 顶部细条 ---------- */
.topline {
  background: #0F172A;
  color: #F5EFE6;
  text-align: center;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: .26em;
  padding: 7px 16px;
  border-bottom: 2px solid #E8543F;
}

/* ---------- 导航 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 239, 230, .95);
  border-bottom: 1px solid rgba(15, 23, 42, .18);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04);
}

.nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}

.nav-l, .nav-r { display: flex; flex-wrap: wrap; gap: 2px; min-width: 0; }
.nav-r { justify-content: flex-end; }

.nl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 9px;
  min-height: 44px;
  font-size: 16px;
  letter-spacing: .03em;
  color: #0F172A;
  text-decoration: none;
  position: relative;
  transition: color .2s ease;
}

.nl .ni { color: #E8543F; transition: transform .35s ease; flex: none; }
.nl::after {
  content: '';
  position: absolute;
  left: 9px; right: 9px; bottom: 8px;
  height: 2px;
  background: #E8543F;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s ease;
}
.nl:hover { color: #E8543F; }
.nl:hover .ni { transform: rotate(45deg); }
.nl:hover::after { transform: scaleX(1); }

.nav-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  font-family: 'Noto Serif TC', Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .14em;
  color: #0F172A;
  text-decoration: none;
  border-left: 1px solid rgba(15, 23, 42, .2);
  border-right: 1px solid rgba(15, 23, 42, .2);
  white-space: nowrap;
}
.nav-brand:hover { color: #E8543F; }

/* ---------- 主体骨架 ---------- */
.main {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  column-gap: 48px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px 96px;
  align-items: start;
}

/* ---------- 首屏 ---------- */
.hero {
  grid-column: 1 / -1;
  position: relative;
  margin: 0 -28px;
  padding: 24px 28px 84px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 26%, rgba(232, 84, 63, .16), transparent 58%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: 44px;
  align-items: center;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: .3em;
  color: #E8543F;
}
.kicker-line { display: block; width: 44px; height: 2px; background: currentColor; }

.hero-h1 {
  font-family: 'Noto Serif TC', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.7rem, 7.4vw, 5.6rem);
  line-height: 1.08;
  letter-spacing: .01em;
  margin: .18em 0 .3em;
  background: linear-gradient(100deg, #0F172A 0%, #0F172A 36%, #E8543F 50%, #0F172A 64%, #0F172A 100%);
  background-size: 230% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rise .95s cubic-bezier(.2, .75, .2, 1) both, sweep 9s linear 1s infinite;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}
@keyframes sweep {
  from { background-position: 130% 0; }
  to   { background-position: -130% 0; }
}

.hero-lede {
  max-width: 32em;
  margin: 0 0 28px;
  color: rgba(15, 23, 42, .78);
}

.hero-acts { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 17px;
  letter-spacing: .06em;
  text-decoration: none;
  transition: transform .22s ease, background-color .22s ease, color .22s ease;
}
.btn-p { background: #0F172A; color: #F5EFE6; border-bottom: 3px solid #E8543F; }
.btn-p:hover { transform: translateY(-3px); background: #E8543F; color: #F5EFE6; }
.btn-g { color: #0F172A; border: 1px solid rgba(15, 23, 42, .38); border-bottom: 3px solid rgba(15, 23, 42, .38); }
.btn-g:hover { transform: translateY(-3px); background: rgba(232, 84, 63, .12); border-color: #E8543F; }

.hero-fig {
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  border-bottom: 6px solid #E8543F;
  box-shadow: 14px 16px 0 rgba(15, 23, 42, .1);
  transform: rotate(-1.2deg);
}
.hero-fig img, .hero-media { display: block; width: 100%; height: auto; }

.hero-type {
  display: grid;
  gap: 4px;
  font-family: 'Noto Serif TC', Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: .04em;
  color: rgba(15, 23, 42, .82);
  border-left: 3px solid #E8543F;
  padding-left: 16px;
}
.hero-type span { animation: slidein .9s ease both; }
.hero-type span:nth-child(2) { animation-delay: .16s; color: #E8543F; }
.hero-type span:nth-child(3) { animation-delay: .32s; opacity: .6; }
@keyframes slidein {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: none; }
}

.hero-strip {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  overflow: hidden;
  border-top: 1px solid rgba(15, 23, 42, .16);
  border-bottom: 1px solid rgba(15, 23, 42, .16);
  background: rgba(15, 23, 42, .04);
}
.strip-track {
  display: inline-flex;
  white-space: nowrap;
  font-family: 'Noto Serif TC', Georgia, serif;
  font-size: 16px;
  letter-spacing: .34em;
  padding: 9px 0;
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- 左侧栏 ---------- */
.rail {
  position: sticky;
  top: 92px;
  margin-top: 8px;
  padding: 18px 16px 20px;
  border: 1px solid rgba(15, 23, 42, .18);
  border-bottom: 3px solid #E8543F;
  border-radius: 4px;
  background: rgba(245, 239, 230, .9);
  backdrop-filter: blur(4px);
}

.rail-h {
  font-family: 'Noto Serif TC', Georgia, serif;
  font-size: 18px;
  letter-spacing: .18em;
  margin: 0 0 6px;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rl;
}
.rail-list li { counter-increment: rl; }
.rail-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 0;
  font-size: 16px;
  color: #0F172A;
  text-decoration: none;
  border-bottom: 1px dotted rgba(15, 23, 42, .22);
  transition: color .2s ease, padding-left .2s ease;
}
.rail-list a::before {
  content: counter(rl, decimal-leading-zero);
  font-family: 'Noto Serif TC', Georgia, serif;
  font-size: 16px;
  color: #E8543F;
  letter-spacing: .04em;
}
.rail-list a:hover { color: #E8543F; padding-left: 4px; }

/* ---------- 正文 ---------- */
.post { padding-top: 8px; }

.post-h {
  font-family: 'Noto Serif TC', Georgia, serif;
  font-size: clamp(1.4rem, 2.6vw, 1.7rem);
  letter-spacing: .2em;
  margin: 0 0 8px;
}

h2 {
  font-family: 'Noto Serif TC', Georgia, serif;
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  line-height: 1.35;
  letter-spacing: .02em;
  margin: 0 0 8px;
}

h2 + hr {
  width: 72px;
  height: 4px;
  border: 0;
  background: #E8543F;
  margin: 0 0 22px;
}

h3 {
  font-family: 'Noto Serif TC', Georgia, serif;
  font-size: 1.22rem;
  line-height: 1.45;
  margin: 1.5em 0 .55em;
}

hr {
  border: 0;
  height: 1px;
  background: rgba(15, 23, 42, .16);
  margin: 26px 0;
}

.post > section {
  padding: 36px 0 14px;
  border-bottom: 1px solid rgba(15, 23, 42, .14);
  scroll-margin-top: 96px;
}
.post > section:last-child { border-bottom: 3px solid #E8543F; }

.post p { margin: 0 0 1.05em; }
.post a { color: #0F172A; text-decoration: none; border-bottom: 1px solid rgba(232, 84, 63, .55); }
.post a:hover { color: #E8543F; border-bottom-color: #E8543F; }
.post ul, .post ol { padding-left: 1.35em; margin: 0 0 1.1em; }
.post li { margin: 0 0 .45em; }
.post img { max-width: 100%; height: auto; border-radius: 4px; border-bottom: 4px solid #E8543F; }
.post blockquote {
  margin: 1.2em 0;
  padding: .2em 0 .2em 1.1em;
  border-left: 4px solid #E8543F;
  color: rgba(15, 23, 42, .82);
}
.post table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; }
.post th, .post td { border-bottom: 1px solid rgba(15, 23, 42, .18); padding: 10px 8px; text-align: left; }

/* ---------- 滚动显现 ---------- */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }

[data-split] .ch {
  display: inline-block;
  opacity: 0;
  animation: chomp .55s cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes chomp {
  from { opacity: 0; transform: translateY(.4em) rotate(7deg); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 页脚 ---------- */
.foot {
  background: #0F172A;
  color: #F5EFE6;
  padding: 64px 28px 26px;
  border-top: 5px solid #E8543F;
}
.foot-inner { max-width: 1240px; margin: 0 auto; }

.foot-brand {
  font-family: 'Noto Serif TC', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 5.6rem);
  line-height: 1.05;
  letter-spacing: .03em;
  margin: 0 0 34px;
  color: #F5EFE6;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(245, 239, 230, .22);
}
.foot-nav { display: contents; }

.foot dl { margin: 0; }
.foot dt {
  font-size: 16px;
  letter-spacing: .22em;
  color: #E8543F;
  margin: 0 0 8px;
}
.foot dd { margin: 0 0 4px; }
.foot dd a {
  display: inline-block;
  min-height: 42px;
  padding: 8px 0;
  color: #F5EFE6;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, color .2s ease;
}
.foot dd a:hover { color: #E8543F; border-bottom-color: #E8543F; }

.foot-legal {
  margin: 34px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(245, 239, 230, .22);
  font-size: 16px;
  color: rgba(245, 239, 230, .68);
}

/* ---------- 断点 ---------- */
@media (max-width: 980px) {
  .main { grid-template-columns: 180px minmax(0, 1fr); column-gap: 32px; }
  .nav { padding: 0 18px; }
  .nl { padding: 12px 6px; font-size: 16px; }
}

@media (max-width: 860px) {
  .main { grid-template-columns: minmax(0, 1fr); padding: 0 18px 72px; }
  .hero { margin: 0 -18px; padding: 18px 18px 76px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .hero-visual { order: 2; }
  .rail { position: static; margin: 4px 0 26px; }
  .nav {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    padding: 8px 18px 10px;
    min-height: 0;
    gap: 2px;
  }
  .nav-brand { order: 0; border: 0; padding: 6px 0; font-size: 19px; }
  .nav-l, .nav-r { order: 1; width: 100%; justify-content: center; gap: 0 4px; }
  .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .foot { padding: 48px 18px 22px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero-h1 { font-size: clamp(2.2rem, 11vw, 3rem); }
  .hero-lede { font-size: 16px; }
  .btn { padding: 12px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-h1 { animation: none; background: none; color: #0F172A; }
  .hero-type span, .strip-track { animation: none; }
  .rv { opacity: 1; transform: none; }
  [data-split] .ch { opacity: 1; animation: none; }
  .btn, .nl::after, .nl .ni { transition: none; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
