:root {
  --sans: "PingFang TC", "PingFang SC", "Hiragino Sans GB", "Noto Sans TC", "Noto Serif TC", system-ui, sans-serif;
  --serif: "Songti TC", "Songti SC", "Noto Serif TC", "PMingLiU", serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", monospace;
  --dim: rgba(255, 255, 255, 0.38);
  --mid: rgba(255, 255, 255, 0.66);
  --edge: 7vw;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { background: #000; }
body {
  margin: 0;
  color: #fff;
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: #fff; color: #000; }
:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.75); outline-offset: 4px; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.top {
  position: fixed;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px var(--edge) 0;
  pointer-events: none;
}
.top a { pointer-events: auto; text-decoration: none; }

.brand { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.brand strong {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.26em;
}
.brand em {
  font-style: normal;
  font-size: 12px;
  color: var(--dim);
}

.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; }
.nav a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
  transition: color 0.3s ease;
}
.nav a:hover,
.nav a.is-on { color: #fff; }

main { position: relative; z-index: 1; }

#works {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 22vh var(--edge) 48px;
  scroll-margin-top: 12px;
}
.rows { display: flex; flex-direction: column; }
.row {
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) minmax(0, 34rem);
  gap: 6vw;
  align-items: baseline;
  padding: 8px 0;
  color: #fff;
  text-decoration: none;
  transition: color 0.35s ease;
}
.rows:hover .row { color: rgba(255, 255, 255, 0.28); }
.rows:hover .row:hover { color: #fff; }
.name {
  font-size: 22px;
  line-height: 1.35;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.row:hover .name,
.row.is-on .name { transform: translateX(8px); }
.no {
  display: inline-block;
  width: 2.2em;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  font-style: normal;
}
.meta {
  opacity: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: opacity 0.35s ease;
}
.row.is-on .meta { opacity: 1; }
.rows:hover .meta { opacity: 0; }
.rows:hover .row:hover .meta { opacity: 1; }
.line { font-size: 14px; line-height: 1.55; color: var(--mid); }
.host {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.4);
}

.foot {
  margin-top: auto;
  padding-top: 56px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}
.tiny,
.mail {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--dim);
  text-decoration: none;
}
.mail:hover { color: #fff; }

.chapter {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18vh var(--edge);
}
.chapter .mail { margin-top: 28px; }

.chapter--name h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(72px, 10vw, 132px);
  line-height: 1;
}

@media (max-width: 760px) {
  :root { --edge: 22px; }
  .top { padding-top: 22px; }
  .nav { gap: 8px 14px; }
  .nav a { font-size: 13px; }
  #works { padding-top: 28vh; }
  .row { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
  .meta, .rows:hover .meta { opacity: 1; }
  .rows:hover .row { color: #fff; }
  .name { font-size: 20px; }
  .chapter--name h2 { font-size: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .name, .meta, .row, .nav a { transition: none; }
}
