@font-face {
  font-family: "WenKai";
  src: url("/assets/fonts/wenkai.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* 配色都取自夕堇的立绘：天空、发、瞳、玫瑰、衬衫 */
:root {
  --sky: #c8e6fd;
  --hair: #6e6f95;
  --iris: #9b9cd9;
  --rose: #6f76b5;
  --frill: #d1d4ef;
  --blush: #f0ccce;
  --gold: #c9a774;
  --ink: #2c2e55;
  --ink-soft: #55587f;
  --paper: #fbfaff;
  --night: #1d1e38;

  --zh: "WenKai", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --latin: "Fraunces", "Iowan Old Style", Georgia, serif;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--zh);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.glyph { width: 1em; height: 1em; flex: none; }

/* ---------- 顶栏 ---------- */
.nav {
  position: fixed; z-index: 20;
  top: 14px; left: 50%; transform: translateX(-50%);
  width: min(720px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px;
  background: rgba(251, 250, 255, .62);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 6px 24px -12px rgba(44, 46, 85, .35);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.nav-brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink);
  font-family: var(--latin); font-size: 19px; font-weight: 500;
  font-variation-settings: "SOFT" 100, "opsz" 24;
}
.nav-brand .glyph { color: var(--rose); font-size: 20px; }
.nav-brand i { font-style: normal; color: var(--iris); margin: 0 1px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  text-decoration: none; font-size: 15px; color: var(--ink-soft);
  padding: 6px 14px; border-radius: 999px;
  transition: background .25s, color .25s;
}
.nav-links a:hover, .nav-links a[aria-current="true"] { background: rgba(155, 156, 217, .22); color: var(--ink); }

/* ---------- 通用 ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--ink-soft); letter-spacing: .08em;
}
.eyebrow .num {
  font-family: var(--latin); font-style: normal; font-size: 15px;
  font-variation-settings: "SOFT" 100, "opsz" 14;
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid currentColor; opacity: .85;
}
.pill {
  display: inline-block;
  font-family: var(--latin); font-size: 15px; letter-spacing: .02em;
  font-variation-settings: "SOFT" 100, "opsz" 14;
  padding: 4px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .9);
  color: var(--ink-soft);
}

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 白天 · hero ---------- */
.hero {
  background: linear-gradient(180deg, #e4f3fe 0%, #d3ebfd 60%, var(--sky) 100%);
  padding: clamp(120px, 16vh, 168px) 0 clamp(48px, 7vh, 88px);
  min-height: min(100svh, 920px);
  display: flex; align-items: center;
}
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(32px, 6vw, 88px); }
.wordmark {
  font-family: var(--latin); font-weight: 340;
  font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 144;
  font-size: clamp(76px, 11.5vw, 156px); line-height: .86; letter-spacing: -.035em;
  margin: 22px 0 28px;
}
.wordmark span { display: block; }
.wm-sumi { padding-left: .5em; color: var(--hair); }
.wm-sumi em { font-style: normal; font-weight: 250; color: var(--iris); }
.hero-hello { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.5; color: var(--ink); }
.hero-lede { margin-top: 14px; max-width: 30em; color: var(--ink-soft); }
.hero-hint {
  margin-top: 30px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; color: var(--rose);
}
.hero-hint .glyph { animation: sway 3.6s ease-in-out infinite; transform-origin: 50% 90%; }

.arch { position: relative; justify-self: center; width: min(100%, 440px); }
.arch-frame {
  aspect-ratio: 5 / 6;
  overflow: hidden;
  background: var(--sky);
  border-radius: 50% 50% 30px 30px / 38% 38% 30px 30px;
  box-shadow:
    0 0 0 1px rgba(201, 167, 116, .9),
    0 0 0 9px rgba(255, 255, 255, .45),
    0 0 0 10px rgba(201, 167, 116, .7),
    0 40px 70px -30px rgba(44, 46, 85, .45);
  animation: float 7s ease-in-out infinite;
}
.arch-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.tag {
  position: absolute; left: 22px; bottom: -22px;
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 18px 9px; border-radius: 14px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 10px 24px -12px rgba(44, 46, 85, .5);
  transform: rotate(-5deg);
  font-size: 20px;
}
.tag i { font-family: var(--latin); font-size: 17px; color: var(--rose); font-variation-settings: "SOFT" 100, "opsz" 18; }
.tag::before {
  content: ""; position: absolute; top: -9px; left: 22px; width: 10px; height: 18px;
  border-radius: 6px; background: var(--rose); opacity: .85;
}

/* ---------- 午后 · coni ---------- */
.about {
  background: linear-gradient(180deg, var(--sky) 0%, #d9e4fb 55%, #dedcf6 100%);
  padding: clamp(64px, 9vh, 112px) 0 clamp(80px, 12vh, 140px);
}
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.big-latin {
  font-family: var(--latin); font-weight: 300;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-size: clamp(72px, 10vw, 132px); line-height: .9; letter-spacing: -.035em;
  margin: 18px 0 22px; color: var(--ink);
}
.about-lede { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.7; }
.text-link {
  display: inline-flex; gap: 6px; margin-top: 26px;
  font-family: var(--latin); font-size: 16px; text-decoration: none; color: var(--rose);
  font-variation-settings: "SOFT" 100, "opsz" 14;
  border-bottom: 1px solid rgba(111, 118, 181, .4); padding-bottom: 2px;
  transition: border-color .25s;
}
.text-link:hover { border-color: var(--rose); }
.now { border-top: 1px solid rgba(44, 46, 85, .16); }
.now li {
  display: grid; grid-template-columns: 4.5em 1fr; gap: 12px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid rgba(44, 46, 85, .16);
}
.now-k { color: var(--rose); font-size: 15px; letter-spacing: .1em; }
.now-v { font-size: 18px; }

/* ---------- 傍晚 · 作品 ---------- */
.works {
  background: linear-gradient(180deg, #dedcf6 0%, #ecd8ea 48%, #e2c9df 64%, #a9a6dc 100%);
  padding: clamp(80px, 12vh, 140px) 0 clamp(96px, 14vh, 160px);
}
.section-head { margin-bottom: 40px; }
.section-title { font-size: clamp(32px, 4vw, 48px); line-height: 1.25; font-weight: 500; margin-top: 14px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column;
  background: rgba(251, 250, 255, .66);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 28px; padding: 10px;
  box-shadow: 0 24px 48px -32px rgba(44, 46, 85, .5);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .9s var(--ease) var(--d, 0s);
}
.card.in:hover { transform: translateY(-4px); box-shadow: 0 32px 56px -30px rgba(44, 46, 85, .55); }
.card-visual {
  height: 176px; border-radius: 20px; overflow: hidden; position: relative;
  background: linear-gradient(160deg, #eef3ff, #e3e3f7);
}
.card-body { padding: 20px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h3 { font-size: 24px; font-weight: 500; line-height: 1.3; }
.card h3 { font-family: var(--latin), var(--zh); font-variation-settings: "SOFT" 100, "opsz" 36; }
.chip {
  font-family: var(--ui); font-size: 12px; letter-spacing: .04em; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(111, 118, 181, .45); color: var(--rose);
}
.card p { margin-top: 10px; font-size: 16px; color: var(--ink-soft); line-height: 1.75; }
.card-link {
  margin-top: auto; padding-top: 18px; align-self: flex-start;
  font-family: var(--latin); font-size: 15px; text-decoration: none; color: var(--rose);
  font-variation-settings: "SOFT" 100, "opsz" 14;
}
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* FreeGrid：格子一点点亮起来 */
.grid-visual { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; padding: 22px; align-content: center; }
.grid-visual span { aspect-ratio: 1; border-radius: 4px; border: 1px solid rgba(111, 118, 181, .35); transition: background .6s, border-color .6s; }
.grid-visual span.on { background: var(--rose); border-color: var(--rose); }
.grid-visual span.on.soft { background: var(--iris); border-color: var(--iris); }

/* 语间：选中一个词 */
.read-visual { padding: 26px 22px; }
.read-line { font-family: var(--latin); font-size: 19px; line-height: 1.6; color: var(--ink); font-variation-settings: "SOFT" 100, "opsz" 18; }
.read-line mark { background: rgba(155, 156, 217, .38); color: inherit; border-radius: 4px; padding: 0 2px; }
.read-pop {
  position: absolute; right: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; border-radius: 14px; background: var(--paper);
  box-shadow: 0 12px 24px -14px rgba(44, 46, 85, .55);
  font-size: 13px; color: var(--ink-soft);
  animation: pop 5s var(--ease) infinite;
}
.read-pop b { font-family: var(--latin); font-weight: 500; color: var(--ink); font-size: 15px; }

/* conilab：中英对照的两栏 */
.lab-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 24px 26px; }
.lab-col { display: flex; flex-direction: column; gap: 10px; }
.lab-col b { font-family: var(--latin), var(--zh); font-weight: 500; font-size: 18px; color: var(--rose); margin-bottom: 4px; }
.lab-col i { display: block; height: 7px; border-radius: 4px; background: rgba(111, 118, 181, .28); }
.lab-col i.s { width: 64%; }

/* ---------- 黄昏 · 夕堇 ---------- */
.sumi {
  background: linear-gradient(180deg, #a9a6dc 0%, var(--hair) 14%, #4f5185 62%, #45477a 100%);
  color: var(--paper);
  padding: clamp(96px, 14vh, 160px) 0;
}
.sumi .eyebrow { color: rgba(251, 250, 255, .78); }
.sumi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.sumi-name {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .1em .3em;
  font-size: clamp(72px, 9vw, 116px); line-height: 1.05; font-weight: 500;
  margin: 18px 0 26px;
}
.sumi-name em {
  font-family: var(--latin); font-style: normal; font-weight: 300; font-size: .52em;
  font-variation-settings: "SOFT" 100, "opsz" 72; color: var(--frill);
}
.etym { display: grid; gap: 12px; }
.etym div { display: flex; align-items: baseline; gap: 16px; }
.etym dt {
  font-size: 30px; line-height: 1; width: 52px; height: 52px; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(209, 212, 239, .55);
}
.etym dd { color: rgba(251, 250, 255, .85); }
.sumi-lede { margin-top: 26px; max-width: 28em; color: rgba(251, 250, 255, .9); }
.palette { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.palette button {
  display: flex; align-items: center; gap: 8px;
  font: inherit; font-size: 14px; color: var(--paper); cursor: pointer;
  padding: 5px 14px 5px 6px; border-radius: 999px;
  background: rgba(251, 250, 255, .08); border: 1px solid rgba(251, 250, 255, .25);
  transition: background .25s;
}
.palette button::before { content: ""; width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.palette button:hover { background: rgba(251, 250, 255, .18); }

.details { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 3vw, 32px); }
.details li { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.details li:nth-child(2n) { transform: translateY(36px); }
.js .details li.reveal:nth-child(2n) { transform: translateY(54px); }
.js .details li.reveal.in:nth-child(2n) { transform: translateY(36px); }
.details img {
  width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(201, 167, 116, .8), 0 0 0 7px rgba(251, 250, 255, .12), 0 24px 40px -24px rgba(10, 10, 30, .6);
  transition: transform .6s var(--ease);
}
.details li:hover img { transform: scale(1.04) rotate(-2deg); }
.details span { font-size: 16px; color: rgba(251, 250, 255, .88); }

/* ---------- 夜 · 晚安 ---------- */
.night {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #45477a 0%, #2c2d52 45%, var(--night) 100%);
  color: var(--paper);
  padding: clamp(120px, 18vh, 200px) 0 48px;
  text-align: center;
}
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars i {
  position: absolute; width: var(--s); height: var(--s); border-radius: 50%;
  background: #fff8e4; opacity: .2;
  animation: twinkle var(--t) ease-in-out var(--delay) infinite;
}
.night-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.avatar {
  width: 112px; height: 112px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(201, 167, 116, .9), 0 0 0 7px rgba(251, 250, 255, .1), 0 0 60px rgba(155, 156, 217, .45);
}
.goodnight { font-size: clamp(48px, 7vw, 80px); line-height: 1.2; margin-top: 26px; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 34px; }
.links a {
  display: inline-block; text-decoration: none; font-size: 15px;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid rgba(251, 250, 255, .28); color: var(--paper);
  transition: background .25s, border-color .25s;
}
.links a:hover { background: rgba(251, 250, 255, .1); border-color: rgba(251, 250, 255, .6); }
.fine { margin-top: 80px; font-family: var(--ui); font-size: 12px; letter-spacing: .06em; color: rgba(251, 250, 255, .45); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 30;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 8px 16px; border-radius: 999px; font-size: 14px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 12px 30px -14px rgba(10, 10, 30, .6);
  transition: opacity .3s, transform .3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes sway { 50% { transform: rotate(10deg); } }
@keyframes twinkle { 50% { opacity: .95; } }
@keyframes pop {
  0%, 12% { opacity: 0; transform: translateY(8px) scale(.96); }
  22%, 82% { opacity: 1; transform: none; }
  92%, 100% { opacity: 0; transform: translateY(4px); }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .hero { min-height: 0; padding-bottom: 32px; }
  .about { padding-top: 48px; }
  .arch { margin-bottom: 18px; }
  .hero-grid { grid-template-columns: 1fr; }
  .arch { order: -1; width: min(78vw, 360px); }
  .hero-copy { text-align: left; }
  .about-grid, .sumi-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; max-width: 520px; }
  .details { max-width: 440px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav { padding-left: 12px; }
  .nav-brand span { display: none; }
  .nav-links a { padding: 6px 11px; }
  .wordmark { margin-top: 18px; }
  .tag { left: 14px; font-size: 18px; }
  .now li { grid-template-columns: 3.6em 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .read-pop { opacity: 1; }
}
