/* ==========================================================================
   ashiyachion.me — 樣式表
   - 顏色都在最上面的變數：:root 是淺色（拂曉），[data-theme="dark"] 是深色（深夜）
   - 不載入任何外部字型，全部用系統字型，在哪裡打開都很快
   ========================================================================== */

/* ---------- 主題變數 ---------- */
:root {
  color-scheme: light;

  --bg: #f6f3ec;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-hover: rgba(255, 255, 255, 0.92);
  --chip: rgba(28, 30, 43, 0.055);
  --border: rgba(28, 30, 43, 0.1);
  --border-strong: rgba(28, 30, 43, 0.2);

  --text: #1c1e2b;
  --text-muted: #4f5468;
  --text-faint: #62677b;

  --accent: #a04c0d;          /* 琥珀：編號、強調字 */
  --accent-2: #4a51bd;        /* 靛藍：連結、展開按鈕 */
  --btn: #1c1e2b;
  --btn-text: #fbf8f1;

  --orb: #ffb06e;                         /* 淺色時是太陽 */
  --orb-glow: rgba(255, 150, 80, 0.45);
  --glow-a: rgba(255, 170, 105, 0.3);
  --glow-b: rgba(140, 150, 255, 0.16);

  --st-active: #176f47;       /* 進行中 */
  --st-exp: #a04c0d;          /* 實驗中 */
  --st-done: #4a51bd;         /* 已完成 */
  --st-live: #1a669f;         /* 上線中 */

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC",
    "Microsoft JhengHei", "Noto Sans CJK TC", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --container: 1080px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;
  --radius-lg: 20px;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0a0d1a;
  --surface: rgba(22, 27, 52, 0.55);
  --surface-hover: rgba(30, 36, 68, 0.8);
  --chip: rgba(200, 210, 255, 0.07);
  --border: rgba(200, 210, 255, 0.1);
  --border-strong: rgba(200, 210, 255, 0.2);

  --text: #ebe9f4;
  --text-muted: #a9aec6;
  --text-faint: #8b91ac;

  --accent: #ffc978;
  --accent-2: #aab4ff;
  --btn: #ffc978;
  --btn-text: #1b1406;

  --orb: #ffe6b2;                          /* 深色時是月亮 */
  --orb-glow: rgba(255, 214, 150, 0.35);
  --glow-a: rgba(255, 201, 120, 0.07);
  --glow-b: rgba(100, 112, 255, 0.13);

  --st-active: #6fe0a8;
  --st-exp: #ffc978;
  --st-done: #aab4ff;
  --st-live: #7cc7ff;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* 背景柔光：淺色像日出，深色像月光 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(70vmax 55vmax at 88% -12%, var(--glow-a), transparent 62%),
    radial-gradient(55vmax 50vmax at -12% 38%, var(--glow-b), transparent 62%);
}

.sky {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

:root[data-theme="dark"] .sky {
  opacity: 1;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 32%, transparent);
}

h1,
h2,
h3 {
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:lang(ja) {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--btn);
  color: var(--btn-text);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.mini-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

/* ---------- 頁首 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-style: italic;
  letter-spacing: 0;
}

.brand-mark {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2.4vw, 2rem);
  margin-left: auto;
}

.nav a {
  position: relative;
  padding-block: 0.3rem;
  color: var(--text-muted);
  font-size: 0.94rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}

.nav a.is-active::after {
  transform: scaleX(1);
}

.theme-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.3s ease;
}

.theme-toggle:hover {
  background: var(--surface-hover);
  transform: rotate(-15deg);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* 沒有 JavaScript 時按鈕沒有作用，就不顯示 */
html:not(.js) .theme-toggle {
  display: none;
}

/* ---------- 開場 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + 40px) 64px;
}

/* 月亮／太陽：同一個圓，切換主題時會從滿月般的太陽縮成月牙 */
.orb {
  --size: clamp(64px, 10vw, 128px);
  position: absolute;
  top: calc(var(--header-h) + clamp(12px, 6vh, 80px));
  right: max(var(--gutter), calc((100% - var(--container)) / 2));
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: inset 0 0 0 calc(var(--size) / 2) var(--orb);
  filter: drop-shadow(0 0 calc(var(--size) * 0.3) var(--orb-glow));
  transition: box-shadow 1s ease, filter 1s ease;
  animation: float 10s ease-in-out infinite;
}

:root[data-theme="dark"] .orb {
  box-shadow: inset calc(var(--size) * -0.26) calc(var(--size) * 0.12) 0 0 var(--orb);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
  margin: 0 0 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.meta-item + .meta-item {
  padding-left: 0.9rem;
  border-left: 1px solid var(--border-strong);
}

.meta-item .icon {
  width: 14px;
  height: 14px;
}

.clock {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.5rem, 1.5rem + 4.8vw, 5.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.hero-title .name {
  padding-inline: 0.04em 0.08em;
  color: var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 33em;
  margin: 1.5rem 0 0;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  line-height: 1.85;
}

.now-playing {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 100%;
  margin-top: 2rem;
  padding: 0.6rem 1.15rem 0.6rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.now-playing:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.now-text {
  display: grid;
  min-width: 0;
  line-height: 1.45;
}

.now-label {
  color: var(--text-faint);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.now-song {
  overflow: hidden;
  font-size: 0.95rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.now-sep {
  color: var(--text-faint);
}

/* 跳動的音量條 */
.eq {
  display: inline-flex;
  flex: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq i {
  display: block;
  width: 3px;
  height: 100%;
  border-radius: 1px;
  background: var(--accent);
  transform-origin: 50% 100%;
  animation: eq 1.1s ease-in-out infinite;
}

.eq i:nth-child(2) {
  animation-duration: 0.85s;
  animation-delay: -0.4s;
}

.eq i:nth-child(3) {
  animation-duration: 1.25s;
  animation-delay: -0.7s;
}

.eq i:nth-child(4) {
  animation-duration: 0.95s;
  animation-delay: -0.2s;
}

/* ---------- 按鈕 ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.65rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: translate 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn svg {
  flex: none;
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: var(--btn);
  color: var(--btn-text);
}

.btn-ghost {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.btn:hover {
  translate: 0 -1px;
}

.btn-primary:hover {
  box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--btn) 70%, transparent);
}

.btn-ghost:hover {
  background: var(--surface-hover);
}

/* ---------- 區塊共用 ---------- */
.section {
  padding-block: clamp(72px, 9vw, 120px);
}

.section-head {
  margin-bottom: clamp(28px, 4.5vw, 52px);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-label span {
  color: var(--accent);
}

.section-label::after {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--border-strong);
}

.section-head h2 {
  margin: 0.7rem 0 0;
  font-size: clamp(1.9rem, 1.45rem + 1.9vw, 2.7rem);
}

.section-intro {
  max-width: 36em;
  margin: 0.8rem 0 0;
  color: var(--text-muted);
}

.card {
  position: relative;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.25s ease, background-color 0.25s ease, translate 0.25s ease;
}

.chips,
.tags {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips {
  gap: 0.45rem;
}

.chips li {
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: var(--chip);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
}

/* ---------- 01 關於 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 64px);
}

.prose p {
  max-width: 34em;
  margin: 0 0 1.15em;
  color: var(--text-muted);
}

.prose p:first-child {
  color: var(--text);
  font-size: 1.12em;
}

.likes {
  margin-top: 1.9rem;
}

.likes .mini-label {
  margin-bottom: 0.75rem;
}

.tags {
  gap: 0.5rem;
}

.tags li {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.now-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.now-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.now-list {
  display: grid;
  gap: 0.8rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.now-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-muted);
}

.now-list li::before {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 0.15rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* ---------- 02 作品 ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 24px);
}

.project {
  display: flex;
  flex-direction: column;
}

@media (hover: hover) {
  .project:hover {
    border-color: var(--border-strong);
    background: var(--surface-hover);
    translate: 0 -3px;
  }
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.project-kind {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.status {
  --c: var(--st-done);
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.4rem;
  padding: 0.16rem 0.62rem;
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 11%, transparent);
  color: var(--c);
  font-size: 0.76rem;
  font-weight: 600;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status--active { --c: var(--st-active); }
.status--exp { --c: var(--st-exp); }
.status--done { --c: var(--st-done); }
.status--live { --c: var(--st-live); }

.status--active::before {
  animation: pulse 2.2s ease-out infinite;
}

.project-title {
  margin: 0.9rem 0 0.5rem;
  font-size: 1.3rem;
}

.project-summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* 小流程圖：一格一個步驟，用箭頭串起來 */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0;
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  line-height: 1.45;
}

.flow > li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.35rem 0.6rem;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: var(--chip);
  color: var(--text-muted);
}

.flow > li + li {
  margin-left: 1.7rem;
}

/* 箭頭用 SVG 遮罩畫，各平台看起來都一樣 */
.flow > li + li::before {
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 6h14M11.5 2l4 4-4 4'/%3E%3C/svg%3E");
  content: "";
  position: absolute;
  top: 50%;
  left: -1.42rem;
  width: 1.15rem;
  height: 0.75rem;
  background-color: var(--text-faint);
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
  transform: translateY(-50%);
}

/* 雙向箭頭 */
.flow > li.flow-both::before {
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6h13M12 2.5 15.5 6 12 9.5M6 2.5 2.5 6 6 9.5'/%3E%3C/svg%3E");
}

.flow-split > span + span {
  padding-top: 0.3rem;
  border-top: 1px dashed var(--border-strong);
}

.project-more {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.project-more summary {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.project-more summary::-webkit-details-marker {
  display: none;
}

.project-more summary::before {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.project-more[open] summary::before {
  transform: rotate(45deg);
}

.project-more ul {
  display: grid;
  gap: 0.45rem;
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.project-more li::marker {
  color: var(--accent);
}

.project-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-top: auto;
  padding-top: 1.3rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.project-link .icon {
  width: 15px;
  height: 15px;
}

/* ---------- 03 單曲循環 ---------- */
.tracklist {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.track {
  position: relative;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr) minmax(0, 1.5fr) auto;
  grid-template-areas: "no main note mood";
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding: 1.15rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

@media (hover: hover) {
  .track:hover {
    background: var(--surface);
  }
}

.track-no {
  grid-area: no;
  display: flex;
  align-items: center;
  height: 1.6rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.track-no .eq {
  display: none;
}

.track-main {
  grid-area: main;
  min-width: 0;
}

.track-title {
  display: block;
  font-size: 1.08rem;
  font-weight: 700;
  transition: color 0.3s ease;
}

.track-artist {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.track-note {
  grid-area: note;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.track-mood {
  grid-area: mood;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-faint);
  font-size: 0.78rem;
  white-space: nowrap;
}

.track.is-playing .num {
  display: none;
}

.track.is-playing .eq {
  display: inline-flex;
}

.track.is-playing .track-title {
  color: var(--accent);
}

.track.is-playing::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- 04 工具箱 ---------- */
.toolbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 24px);
}

.tool-group h3 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.tool-group h3::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--tone);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, transparent);
}

.tool-group--a { --tone: var(--accent); }
.tool-group--b { --tone: var(--accent-2); }
.tool-group--c { --tone: var(--st-active); }

/* ---------- 05 聯絡 ---------- */
.contact-card {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(90% 120% at 0% 100%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 60%),
    var(--surface);
}

.contact-card h2 {
  margin: 0.9rem 0 0;
  font-size: clamp(1.9rem, 1.3rem + 2.5vw, 3rem);
  line-height: 1.25;
}

.contact-text {
  max-width: 32em;
  margin: 1rem 0 0;
  color: var(--text-muted);
}

/* ---------- 頁尾 ---------- */
.site-footer {
  padding-block: 28px 36px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.site-footer a:hover {
  color: var(--text);
}

/* ---------- 捲動淡入（由 main.js 啟用，沒有 JavaScript 時內容照常顯示） ---------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.reveal-ready .about-grid > [data-reveal]:nth-child(2),
.reveal-ready .project-grid > [data-reveal]:nth-child(2),
.reveal-ready .toolbox-grid > [data-reveal]:nth-child(2) {
  transition-delay: 0.06s;
}

.reveal-ready .project-grid > [data-reveal]:nth-child(3),
.reveal-ready .toolbox-grid > [data-reveal]:nth-child(3) {
  transition-delay: 0.12s;
}

.reveal-ready .project-grid > [data-reveal]:nth-child(4) {
  transition-delay: 0.18s;
}

/* ---------- 動畫 ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes eq {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
  100% { box-shadow: 0 0 0 7px transparent; }
}

/* ---------- 響應式 ---------- */
@media (max-width: 900px) {
  .toolbox-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .track {
    grid-template-columns: 2rem minmax(0, 1fr);
    grid-template-areas:
      "no main"
      ". note"
      ". mood";
    gap: 0.35rem 0.9rem;
    padding: 1.1rem 0.5rem 1.1rem 0.75rem;
  }

  .track-no {
    align-self: start;
  }

  .track-mood {
    justify-self: start;
  }
}

@media (max-width: 420px) {
  .nav {
    gap: 0.8rem;
  }

  .nav a {
    font-size: 0.9rem;
  }
}

@media (max-width: 359px) {
  .brand span {
    display: none;
  }
}

/* 系統設定「減少動態效果」時，關掉所有動畫 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .eq i { transform: scaleY(0.55); }
  .eq i:nth-child(2) { transform: scaleY(1); }
  .eq i:nth-child(3) { transform: scaleY(0.75); }
}

@media print {
  .site-header,
  .sky,
  .orb,
  .now-playing,
  .skip-link {
    display: none !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
