:root {
  color-scheme: dark;
  --background: #0b0d12;
  --panel: #10131b;
  --ink: #f4f5ee;
  --muted: #a5a8b4;
  --line: #292d3b;
  --accent: #d8fa73;
  --blue: #a49bff;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
  --wrap: min(1200px, calc(100% - 112px));
  --header: 67px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 24px);
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 75% 19%, #1c1d3a 0%, transparent 38%),
    radial-gradient(ellipse at 7% 63%, #131923 0%, transparent 42%),
    var(--background);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-user-select: none;
  user-select: none;
  caret-color: transparent;
}
h1, h2, p, dl, dd { margin: 0; }
button, textarea { font: inherit; }
textarea {
  -webkit-user-select: text;
  user-select: text;
  caret-color: auto;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
::selection { color: var(--background); background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.wrap { width: var(--wrap); margin-inline: auto; }
.accent { color: var(--accent); }

.skip-link {
  position: fixed;
  z-index: 9;
  top: 8px;
  left: 12px;
  padding: 6px 12px;
  background: var(--accent);
  color: var(--background);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

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

@media (hover: hover) and (pointer: fine) {
  .has-pointer-effects { cursor: url("assets/cursor.png") 12 12, auto; }
  .has-pointer-effects :is(a, button) { cursor: url("assets/cursor.png") 12 12, pointer; }
}

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  border-bottom: 1px solid #2a2e3bad;
  background: #0b0d12d9;
  backdrop-filter: blur(18px);
}
.scroll-progress {
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.header-inner {
  min-height: var(--header);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.wordmark { display: inline-flex; justify-self: start; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; line-height: 1; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #d8fa7369;
  background: #d8fa7317;
  color: var(--accent);
  font: 700 16px var(--mono);
}
nav, .header-actions { display: flex; align-items: center; }
nav { gap: clamp(17px, 3.1vw, 43px); }
nav a, .header-contact { font-size: 13px; font-weight: 700; white-space: nowrap; }
nav a { color: var(--muted); }
nav a:hover, nav a[aria-current="location"] { color: var(--accent); }
.header-actions { justify-self: end; gap: 10px; }
.header-contact, .fx-toggle { border: 1px solid var(--line); background: #141720; height: 36px; }
.header-contact { display: inline-flex; align-items: center; gap: 9px; padding-inline: 11px; }
.fx-toggle {
  width: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--muted);
  font-size: 17px;
}
.fx-toggle[aria-pressed="true"] { color: var(--accent); }
.header-contact:hover, .fx-toggle:hover { border-color: var(--accent); color: var(--accent); }

.hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
  align-items: center;
  gap: clamp(24px, 4.3vw, 64px);
  padding: 49px 0 54px;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .15em;
}
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 8px 1px 1px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 13px #d8fa73b5;
}
.quiet { color: #777c90; margin-inline: 2px; }
.greeting { margin-top: 24px; font-size: clamp(19px, 2.1vw, 28px); font-weight: 700; }
.hero h1 {
  margin: -5px 0 11px -6px;
  color: var(--ink);
  font-size: clamp(91px, 11vw, 155px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.105em;
  white-space: nowrap;
  -webkit-text-stroke: 1.4px currentColor;
}
.hero h1 span {
  display: inline-block;
  margin-left: .095em;
  color: var(--accent);
  font: 900 .91em/.85 "Arial Black", Arial, sans-serif;
  transform: rotate(10deg);
  text-shadow: 0 0 46px #d8fa7350;
}
.hero-intro { font-size: clamp(19px, 2.04vw, 29px); font-weight: 700; letter-spacing: -.04em; }
.hero-intro span { color: var(--accent); }
.hero-line { margin-top: 6px; color: var(--muted); font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 23px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.button:hover { transform: translateY(-2px); }
.button span, .arrow, .text-link span { font: 700 17px/1 var(--mono); }
.button-primary { border-color: var(--accent); background: var(--accent); color: #171d0b; }
.button-primary:hover { border-color: #efffc8; background: #efffc8; }
.button-outline { background: #171b25; color: var(--ink); }
.button-outline:hover { border-color: var(--accent); color: var(--accent); }

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(315px, 34vw, 445px);
  border: 1px solid #34384e;
  border-radius: 6px;
  background: #0c101a;
  overflow: hidden;
  isolation: isolate;
}
.visual-grid, .visual-glow, #orbit { position: absolute; inset: 0; width: 100%; height: 100%; }
.visual-grid {
  background-image: linear-gradient(#686d9330 1px, transparent 1px), linear-gradient(90deg, #686d9330 1px, transparent 1px);
  background-size: 30px 30px;
  background-position: center;
  mask-image: radial-gradient(ellipse at center, #000 14%, #0008 59%, transparent 95%);
}
.visual-glow {
  inset: -10%;
  width: auto;
  height: auto;
  background:
    radial-gradient(ellipse at 49% 51%, #7960ff3d 0%, transparent 48%),
    radial-gradient(ellipse at 62% 48%, #303d7e62 0%, transparent 58%);
  transform: translate(var(--glow-x, 0px), var(--glow-y, 0px));
  transition: transform .3s ease-out;
}
.corner { position: absolute; width: 13px; height: 13px; border: 0 solid #a49bff99; pointer-events: none; }
.corner-tl { left: 12px; top: 12px; border-width: 1px 0 0 1px; }
.corner-tr { right: 12px; top: 12px; border-width: 1px 1px 0 0; }
.corner-bl { left: 12px; bottom: 12px; border-width: 0 0 1px 1px; }
.corner-br { right: 12px; bottom: 12px; border-width: 0 1px 1px 0; }
.visual-caption, .visual-time {
  position: absolute;
  bottom: 21px;
  color: #bdc0d3;
  text-shadow: 0 1px 8px #090b15;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
}
.visual-caption { left: 24px; }
.visual-caption i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--accent); }
.visual-time { right: 23px; color: var(--accent); font: 700 13px var(--mono); }

[data-reveal] {
  transition: opacity .44s ease, translate .6s cubic-bezier(.18,.75,.22,1), clip-path .64s cubic-bezier(.18,.75,.22,1);
}
.is-awaiting-reveal {
  opacity: 0;
  translate: 0 24px;
  clip-path: inset(0 0 12% 0 round 4px);
}
.is-awaiting-reveal.from-top {
  translate: 0 -20px;
  clip-path: inset(12% 0 0 0 round 4px);
}
.is-awaiting-reveal:focus-within {
  opacity: 1;
  translate: none;
  clip-path: none;
}
.content-grid, .profile-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.27fr) minmax(0, .73fr);
  align-items: start;
  gap: clamp(25px, 5vw, 70px);
}
.content-grid { padding-top: 34px; border-top: 1px solid var(--line); }

.section-heading {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px 16px;
}
.section-heading > span { color: var(--muted); font: 700 11px var(--mono); letter-spacing: .14em; }
h2 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 900; line-height: 1.17; letter-spacing: -.065em; }
h2 .accent { margin-left: .065em; }
.note-list { margin-top: 17px; border-top: 1px solid var(--line); }
.note-link {
  display: grid;
  grid-template-columns: 47px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 51px;
  padding: 9px 6px 9px 1px;
  border-bottom: 1px solid var(--line);
  transition: padding .18s, background .18s, color .18s;
}
.note-link:hover { padding-left: 8px; background: #d8fa730b; color: var(--accent); }
.note-tag { color: var(--blue); font-size: 12px; font-weight: 700; }
.note-title { font-size: clamp(13px, 1.4vw, 17px); font-weight: 700; }
.note-link .arrow { color: var(--accent); }

.heat {
  padding: 17px 20px 16px;
  border: 1px solid #383c54;
  border-radius: 6px;
  background: linear-gradient(135deg, #1a1d2d, #10131d 71%);
}
.heat-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.heat h2 { font-size: 19px; letter-spacing: -.02em; }
.heat-heading h2 span { margin-right: 4px; color: var(--accent); }
.heat-indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px #d8fa737c; }
.heat p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.heat-gauge { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 13px 0 12px; }
#heat-time { color: var(--accent); font: 700 clamp(34px, 4vw, 52px)/1 var(--mono); letter-spacing: -.08em; font-variant-numeric: tabular-nums; }
.battery {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  width: clamp(63px, 8vw, 112px);
  height: 19px;
  margin-right: 5px;
  padding: 3px;
  border: 1px solid #a1b45e;
}
.battery::after { content: ""; position: absolute; top: 4px; bottom: 4px; left: 100%; width: 4px; background: #a1b45e; }
.battery span { background: var(--accent); transition: background .2s; }
.battery span.is-empty { background: #282b36; }
.heat-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 35px;
  padding: 5px 9px;
  border: 1px solid #d8fa7364;
  border-radius: 4px;
  background: #d8fa7312;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.heat-button:hover { border-color: var(--accent); background: #d8fa732b; }
.heat-status:empty { display: none; }

.commission {
  display: grid;
  grid-template-columns: minmax(0, 1.27fr) minmax(0, .73fr);
  align-items: center;
  gap: 25px;
  margin-top: 43px;
  padding: clamp(22px, 3.5vw, 45px);
  border: 1px solid #423d64;
  border-radius: 6px;
  background: radial-gradient(ellipse at 10% 110%, #373154, transparent 75%), #151726;
}
.commission .eyebrow { color: var(--blue); }
.commission h2 { margin-top: 9px; }
.commission h2 + p, .commission div > p:not(.eyebrow) { color: var(--muted); }
.commission .button { margin-top: 15px; }
.profile-contact { padding: 46px 0 39px; }
.profile-line, .contact p { margin-top: 11px; color: var(--muted); }
.profile dl { display: grid; gap: 8px; margin-top: 15px; }
.profile dl div { display: grid; grid-template-columns: max-content 1fr; gap: 13px; padding-top: 7px; border-top: 1px solid var(--line); }
.profile dt { color: var(--accent); font-size: 13px; font-weight: 700; }
.profile dd { font-size: 14px; }
.email-link { display: block; width: fit-content; max-width: 100%; margin-top: 12px; color: var(--accent); font: 700 clamp(16px, 2.5vw, 25px) var(--mono); overflow-wrap: anywhere; }
.email-address {
  -webkit-user-select: all;
  user-select: all;
  cursor: text;
}
.text-link { display: inline-flex; gap: 6px; align-items: center; margin-top: 14px; padding-bottom: 2px; border-bottom: 1px solid #3a4037; font-size: 13px; }
.email-link:hover, .text-link:hover, .footer-inner > a:last-child:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-block: 17px; color: var(--muted); }
.footer-inner .wordmark { font-size: 15px; }
.footer-inner .brand-icon { width: 27px; height: 27px; font-size: 13px; }
.footer-inner > a:last-child { font-size: 12px; }

.reading-material > .reading-content { display: none; }
.reading-material > .reading-content:target { display: block; padding-block: 24px; }
dialog {
  position: fixed;
  inset: 0;
  width: min(575px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 27px;
  border: 1px solid #575379;
  border-radius: 6px;
  background: #141722;
  color: var(--ink);
  box-shadow: 0 20px 75px #000a;
  overflow: auto;
}
dialog::backdrop { background: #08090ecc; backdrop-filter: blur(8px); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-close {
  position: absolute;
  top: 11px;
  right: 11px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: var(--accent);
  font: 700 22px/1 var(--mono);
}
.dialog-close:hover { border-color: var(--accent); }
.reading-content .eyebrow { padding-right: 30px; color: var(--blue); }
.reading-content h2 { margin: 9px 0 17px; font-size: clamp(25px, 4.8vw, 36px); }
.reading-content p + p { margin-top: 12px; }
.reading-content label { display: block; margin-bottom: 8px; color: var(--muted); }
.reading-content textarea { display: block; width: 100%; padding: 10px; border: 1px solid var(--line); background: var(--background); color: var(--ink); resize: vertical; }
.template-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 13px; }
.copy-status { color: var(--accent); font-size: 13px; }

@media (max-width: 1060px) {
  :root { --wrap: calc(100% - 68px); }
  .hero { min-height: 500px; }
}

@media (max-width: 780px) {
  :root { --wrap: calc(100% - 40px); --header: 58px; }
  .hero { min-height: auto; grid-template-columns: minmax(0, 1fr); gap: 27px; padding: 36px 0 29px; }
  .hero h1 { font-size: clamp(93px, 19vw, 136px); }
  .greeting { margin-top: 17px; }
  .hero-visual { height: clamp(246px, 54vw, 395px); }
  .content-grid, .profile-contact { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .content-grid { padding-top: 26px; }
  .commission { margin-top: 31px; }
  .profile-contact { padding: 30px 0; }
}

@media (max-width: 470px) {
  :root { --wrap: calc(100% - 32px); }
  .header-inner { gap: 8px; }
  .wordmark { gap: 5px; font-size: 15px; }
  .brand-icon { width: 24px; height: 24px; font-size: 13px; }
  nav { gap: 9px; }
  nav a, .header-contact { font-size: 11px; }
  .header-actions { gap: 5px; }
  .header-contact, .fx-toggle { height: 29px; }
  .header-contact { gap: 3px; padding-inline: 5px; }
  .fx-toggle { width: 27px; font-size: 13px; }
  .hero-actions { margin-top: 18px; }
  .note-link { grid-template-columns: 33px 1fr auto; gap: 8px; }
  .commission { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .profile dl div { gap: 9px; }
  dialog { padding: 20px 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .is-awaiting-reveal, .is-awaiting-reveal.from-top { opacity: 1; translate: none; clip-path: none; }
}
