:root {
  color-scheme: light;
  --bg: #f7f2e8;
  --paper: #fffdf7;
  --paper-soft: #fff6e6;
  --ink: #18212b;
  --muted: #66707a;
  --line: #1f2b35;
  --line-soft: rgba(31, 43, 53, 0.16);
  --coral: #ff6b5f;
  --mint: #12b886;
  --sky: #2f8bff;
  --lemon: #f5c84c;
  --plum: #7b61ff;
  --shadow: 8px 8px 0 rgba(31, 43, 53, 0.13);
  --button-shadow: 5px 5px 0 rgba(31, 43, 53, 0.14);
  --screen-dim: rgba(0, 0, 0, 0.04);
  --grid-line: rgba(31, 43, 53, 0.08);
  --soft-panel: rgba(255, 253, 247, 0.74);
}

html[data-theme="night"],
body[data-theme="night"] {
  color-scheme: dark;
  --bg: #0f141b;
  --paper: #171e27;
  --paper-soft: #111820;
  --ink: #e8edf2;
  --muted: #8e9aa8;
  --line: #334252;
  --line-soft: rgba(129, 149, 170, 0.16);
  --coral: #c86f69;
  --mint: #42b487;
  --sky: #5d8fcb;
  --lemon: #b99a47;
  --plum: #8d7bd8;
  --shadow: 8px 8px 0 rgba(0, 0, 0, 0.32);
  --button-shadow: 5px 5px 0 rgba(0, 0, 0, 0.28);
  --screen-dim: transparent;
  --grid-line: rgba(136, 154, 174, 0.08);
  --soft-panel: rgba(255, 255, 255, 0.04);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(255, 107, 95, 0.16), transparent 28%),
    linear-gradient(245deg, rgba(18, 184, 134, 0.15), transparent 34%),
    linear-gradient(0deg, transparent 0 96%, rgba(31, 43, 53, 0.08) 96% 100%),
    linear-gradient(90deg, transparent 0 96%, rgba(31, 43, 53, 0.08) 96% 100%),
    var(--bg);
  background-size: auto, auto, 36px 36px, 36px 36px, auto;
  color: var(--ink);
  font-family:
    "Inter", "Microsoft YaHei", "PingFang SC", "Noto Sans SC",
    ui-sans-serif, system-ui, sans-serif;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 16%, rgba(255, 253, 247, 0.76) 16% 17.4%, transparent 17.4% 100%),
    linear-gradient(112deg, transparent 0 72%, rgba(255, 253, 247, 0.72) 72% 73.6%, transparent 73.6% 100%);
  opacity: 0.78;
}

html[data-theme="night"] body::before,
body[data-theme="night"]::before {
  opacity: 1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: var(--screen-dim);
}

html[data-theme="night"] body::after,
body[data-theme="night"]::after {
  display: none;
}

.theme-toggle {
  position: fixed;
  z-index: 20;
  top: 18px;
  right: 18px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0 12px 0 9px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--button-shadow);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow);
}

.theme-toggle-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--lemon);
}

.theme-toggle-icon::after {
  content: "";
  position: absolute;
  inset: -2px -7px -2px auto;
  width: 18px;
  border-radius: 50%;
  background: var(--paper);
  opacity: 0;
  transform: translateX(5px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

html[data-theme="night"] .theme-toggle-icon,
body[data-theme="night"] .theme-toggle-icon {
  background: var(--sky);
}

html[data-theme="night"] .theme-toggle-icon::after,
body[data-theme="night"] .theme-toggle-icon::after {
  opacity: 1;
  transform: translateX(0);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 4px;
}

p,
h1,
h2,
h3 {
  margin: 0;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1240px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 28px;
  display: grid;
  grid-template-columns: minmax(270px, 350px) minmax(0, 1fr);
  gap: 24px;
}

.hero,
.projects-section {
  animation: riseIn 520ms ease both;
}

.hero {
  position: sticky;
  top: 34px;
  min-height: calc(100vh - 68px);
  padding: 26px;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(255, 246, 230, 0.94)),
    var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(31, 43, 53, 0.2);
  border-radius: 5px;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: 80px;
  width: 190px;
  height: 110px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(31, 43, 53, 0.12) 0 2px, transparent 2px 20px),
    linear-gradient(135deg, rgba(245, 200, 76, 0.4), rgba(255, 107, 95, 0.18));
  transform: rotate(-12deg);
  opacity: 0.72;
}

.hero-copy,
.profile-signal {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 24px;
  height: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--coral);
  box-shadow: 4px 4px 0 rgba(31, 43, 53, 0.12);
}

h1 {
  max-width: 100%;
  padding-bottom: 0.08em;
  color: var(--ink);
  font-family:
    "Trebuchet MS", "Arial Rounded MT Bold", "Avenir Next", "Segoe UI Black",
    "Microsoft YaHei UI", sans-serif;
  font-size: clamp(2.25rem, 3.8vw, 3.35rem);
  font-weight: 950;
  line-height: 1.14;
  letter-spacing: 0;
  text-shadow:
    2px 2px 0 var(--paper),
    5px 5px 0 rgba(18, 184, 134, 0.24);
  overflow-wrap: anywhere;
}

.hero-note {
  max-width: 292px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.72;
}

.daily-poem {
  position: relative;
  width: min(100%, 318px);
  min-height: 126px;
  margin-top: 16px;
  display: grid;
  gap: 9px;
  align-content: start;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px 15px;
  background:
    linear-gradient(90deg, rgba(31, 43, 53, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 246, 230, 0.86));
  box-shadow: 6px 6px 0 rgba(31, 43, 53, 0.12);
  color: var(--ink);
  overflow: hidden;
  animation: poemSettle 520ms ease both;
}

.daily-poem::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 107, 95, 0.72);
  border-radius: 50%;
  background: rgba(255, 107, 95, 0.1);
  opacity: 0.78;
}

.daily-poem::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 76px;
  height: 76px;
  border: 2px solid rgba(18, 184, 134, 0.36);
  border-radius: 50%;
  background: rgba(18, 184, 134, 0.08);
}

.poem-label {
  position: relative;
  z-index: 1;
  width: fit-content;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--lemon);
  color: var(--ink);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", "Microsoft YaHei UI", sans-serif;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.poem-text {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-family: "STKaiti", "KaiTi", "Kaiti SC", "Songti SC", "Noto Serif SC", serif;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  font-weight: 700;
  line-height: 1.78;
  text-wrap: balance;
}

.poem-source {
  position: relative;
  z-index: 1;
  justify-self: end;
  max-width: 100%;
  border-top: 2px solid rgba(31, 43, 53, 0.18);
  padding-top: 5px;
  color: var(--coral);
  font-family: "Trebuchet MS", "Microsoft YaHei UI", sans-serif;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1.4;
  text-align: right;
  word-break: break-word;
}

.daily-poem.is-loading .poem-text {
  opacity: 0.62;
}

.profile-mark {
  position: relative;
  width: 90px;
  aspect-ratio: 1;
  margin: 8px 0 24px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--lemon) 0 47%, var(--mint) 47% 100%);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 2.8rem;
  font-weight: 950;
  line-height: 1;
  transform: rotate(-3deg);
}

.profile-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid rgba(255, 253, 247, 0.78);
  border-radius: 5px;
  pointer-events: none;
}

.profile-link {
  position: relative;
  min-height: 50px;
  width: min(100%, 318px);
  max-width: 100%;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0 14px 0 44px;
  background:
    linear-gradient(90deg, var(--mint) 0 14px, transparent 14px),
    linear-gradient(135deg, rgba(47, 139, 255, 0.14), rgba(255, 253, 247, 0.94) 52%, rgba(245, 200, 76, 0.22));
  color: var(--ink);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", "Microsoft YaHei UI", sans-serif;
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  box-shadow: 6px 6px 0 rgba(31, 43, 53, 0.12);
  overflow: hidden;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.profile-link::before {
  content: "WEB";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  color: var(--paper);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.profile-link::after {
  content: "OPEN";
  flex: 0 0 auto;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--lemon);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.profile-link:hover,
.profile-link:focus-visible {
  transform: translate(-2px, -2px);
  background:
    linear-gradient(90deg, var(--coral) 0 14px, transparent 14px),
    linear-gradient(135deg, rgba(245, 200, 76, 0.3), rgba(255, 253, 247, 0.96) 48%, rgba(18, 184, 134, 0.18));
  box-shadow: 9px 9px 0 rgba(31, 43, 53, 0.14);
}

.visit-counter {
  position: relative;
  width: min(100%, 318px);
  min-height: 50px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background:
    linear-gradient(90deg, var(--sky) 0 14px, transparent 14px),
    linear-gradient(90deg, rgba(31, 43, 53, 0.08) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(135deg, rgba(18, 184, 134, 0.2), transparent 44%),
    linear-gradient(315deg, rgba(47, 139, 255, 0.15), transparent 54%),
    var(--paper);
  box-shadow: 6px 6px 0 rgba(31, 43, 53, 0.12);
  overflow: hidden;
}

.visit-counter::after {
  content: "PV";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  color: var(--paper);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.visit-counter>span {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: fit-content;
  padding-left: 30px;
  color: var(--ink);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", "Microsoft YaHei UI", sans-serif;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.visit-counter strong {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  color: var(--sky);
  font-family: "Trebuchet MS", "Arial Black", Arial, sans-serif;
  font-size: clamp(1.35rem, 2.6vw, 1.72rem);
  font-weight: 950;
  line-height: 1;
  text-shadow:
    2px 2px 0 var(--paper),
    3px 3px 0 rgba(245, 200, 76, 0.42);
  white-space: nowrap;
}

.visit-counter em {
  color: var(--coral);
  font-family: inherit;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 950;
}

.profile-signal {
  width: min(100%, 240px);
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 7px;
}

.profile-signal span {
  min-width: 0;
  height: 34px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--mint);
  transform-origin: bottom;
  animation: signalLift 4.8s ease-in-out infinite;
}

.profile-signal span:nth-child(2) {
  height: 56px;
  background: var(--sky);
  animation-delay: 160ms;
}

.profile-signal span:nth-child(3) {
  height: 42px;
  background: var(--lemon);
  animation-delay: 320ms;
}

.profile-signal span:nth-child(4) {
  height: 70px;
  background: var(--coral);
  animation-delay: 480ms;
}

.profile-signal span:nth-child(5) {
  height: 48px;
  background: var(--plum);
  animation-delay: 640ms;
}

.projects-section {
  min-width: 0;
  padding: 8px 0 10px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  animation-delay: 80ms;
}

.section-heading {
  position: relative;
  min-height: 62px;
  padding: 4px 2px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 2px solid rgba(31, 43, 53, 0.22);
}

.section-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: min(160px, 42%);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--lemon), var(--mint));
}

.section-heading>* {
  position: relative;
  z-index: 1;
}

.section-heading .eyebrow {
  margin-bottom: 7px;
}

h2 {
  color: var(--ink);
  font-family:
    "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Trebuchet MS",
    sans-serif;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.08;
}

.section-count {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(31, 43, 53, 0.16);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(18, 184, 134, 0.12);
  color: var(--ink);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", "Microsoft YaHei UI", sans-serif;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.project-grid {
  display: grid;
  gap: 16px;
  align-content: start;
}

.project-card {
  position: relative;
  overflow: hidden;
  min-height: 188px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(176px, 230px) minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  isolation: isolate;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.project-card:hover,
.project-card:focus-within {
  transform: translate(-3px, -3px);
  background: #fff8dc;
  box-shadow: 12px 12px 0 rgba(31, 43, 53, 0.14);
}

.project-card:hover .project-visual,
.project-card:focus-within .project-visual {
  transform: translateY(-2px);
}

.project-card.featured::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, var(--coral), var(--lemon), var(--mint), var(--sky));
}

.project-visual {
  min-height: 162px;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(31, 43, 53, 0.1) 0 2px, transparent 2px 28px),
    var(--paper-soft);
  transition: transform 160ms ease;
}

.project-visual::after {
  content: "";
  position: absolute;
  inset: auto 12px 12px;
  height: 2px;
  background: rgba(31, 43, 53, 0.18);
}

.project-content {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 4px 2px 2px 0;
}

.project-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.project-footer {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.snake-segment {
  position: absolute;
  width: 30px;
  height: 22px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 4px 4px 0 rgba(31, 43, 53, 0.13);
}

.snake-segment.head {
  top: 46px;
  left: 116px;
}

.snake-segment.head::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}

.body-1 {
  top: 46px;
  left: 88px;
}

.body-2 {
  top: 46px;
  left: 60px;
}

.body-3 {
  top: 46px;
  left: 32px;
}

.food-dot {
  position: absolute;
  top: 52px;
  right: 28px;
  width: 13px;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--coral);
  animation: foodPulse 2.6s ease-in-out infinite;
}

.network-line,
.network-node,
.loss-curve,
.maze-wall,
.agent-dot,
.reward-dot,
.policy-arrow {
  position: absolute;
}

.rpg-visual {
  background:
    repeating-linear-gradient(0deg, rgba(31, 43, 53, 0.1) 0 2px, transparent 2px 20px),
    repeating-linear-gradient(90deg, rgba(31, 43, 53, 0.1) 0 2px, transparent 2px 20px),
    var(--paper-soft);
}

.rpg-map-tile,
.rpg-castle,
.rpg-hero,
.rpg-enemy,
.rpg-banner {
  position: absolute;
}

.rpg-map-tile {
  width: 52px;
  height: 30px;
  border: 2px solid var(--line);
  opacity: 0.94;
}

.rpg-map-tile.tile-a {
  left: 14px;
  bottom: 18px;
  background: #bdeccf;
}

.rpg-map-tile.tile-b {
  right: 14px;
  top: 16px;
  background: #bfe0ff;
}

.rpg-map-tile.tile-c {
  right: 74px;
  bottom: 22px;
  background: #ffe4a3;
}

.rpg-castle {
  left: 50%;
  top: 28px;
  width: 46px;
  height: 38px;
  border: 2px solid var(--line);
  transform: translateX(-50%);
  background: var(--lemon);
  box-shadow:
    -13px -8px 0 -4px var(--coral),
    13px -8px 0 -4px var(--mint),
    5px 5px 0 rgba(31, 43, 53, 0.14);
}

.rpg-castle::before,
.rpg-castle::after {
  content: "";
  position: absolute;
  background: var(--line);
}

.rpg-castle::before {
  left: 9px;
  top: 10px;
  width: 8px;
  height: 10px;
  box-shadow: 20px 0 0 var(--line);
}

.rpg-castle::after {
  left: 18px;
  bottom: 0;
  width: 10px;
  height: 15px;
}

.rpg-hero,
.rpg-enemy {
  bottom: 26px;
  width: 14px;
  height: 23px;
  border: 2px solid var(--line);
}

.rpg-hero {
  left: 58px;
  background: var(--sky);
  box-shadow:
    0 -7px 0 -3px var(--paper),
    15px 1px 0 -4px var(--sky);
}

.rpg-enemy {
  right: 52px;
  background: var(--coral);
  box-shadow:
    0 -7px 0 -3px var(--paper),
    -15px 1px 0 -4px var(--coral);
}

.rpg-banner {
  left: 47%;
  bottom: 23px;
  width: 5px;
  height: 38px;
  background: var(--line);
  box-shadow: 9px 1px 0 0 var(--plum);
  animation: bannerWave 2.8s ease-in-out infinite;
}

.network-line {
  height: 2px;
  background: var(--mint);
  transform-origin: left center;
}

.line-a {
  left: 42px;
  top: 48px;
  width: 106px;
  transform: rotate(11deg);
}

.line-b {
  left: 52px;
  top: 70px;
  width: 118px;
  transform: rotate(-18deg);
}

.line-c {
  left: 102px;
  top: 40px;
  width: 80px;
  transform: rotate(31deg);
}

.network-node {
  width: 16px;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 4px 4px 0 rgba(31, 43, 53, 0.12);
}

.node-a {
  left: 28px;
  top: 40px;
}

.node-b {
  left: 84px;
  top: 64px;
}

.node-c {
  right: 70px;
  top: 32px;
  background: var(--sky);
}

.node-d {
  right: 24px;
  bottom: 30px;
  background: var(--lemon);
}

.loss-curve {
  right: 18px;
  bottom: 22px;
  width: 74px;
  height: 32px;
  border-left: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.loss-curve::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 54px;
  height: 18px;
  border-bottom: 3px solid var(--coral);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.maze-wall {
  border: 2px solid var(--line);
  border-radius: 3px;
  background: rgba(47, 139, 255, 0.2);
}

.wall-a {
  left: 24px;
  top: 32px;
  width: 96px;
  height: 10px;
}

.wall-b {
  left: 84px;
  top: 32px;
  width: 10px;
  height: 48px;
}

.wall-c {
  right: 28px;
  bottom: 28px;
  width: 104px;
  height: 10px;
}

.agent-dot,
.reward-dot {
  width: 14px;
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.agent-dot {
  left: 34px;
  bottom: 29px;
  background: var(--mint);
}

.reward-dot {
  right: 40px;
  top: 36px;
  background: var(--lemon);
}

.policy-arrow {
  width: 34px;
  height: 3px;
  background: var(--mint);
  transform-origin: right center;
}

.policy-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 9px;
  height: 9px;
  border-right: 3px solid var(--mint);
  border-top: 3px solid var(--mint);
  transform: rotate(45deg);
}

.arrow-a {
  left: 56px;
  bottom: 37px;
  transform: rotate(-31deg);
}

.arrow-b {
  right: 68px;
  top: 48px;
  transform: rotate(-6deg);
}

h3 {
  color: var(--ink);
  font-size: clamp(1.32rem, 2.2vw, 1.58rem);
  font-weight: 950;
  line-height: 1.12;
}

.project-card p {
  max-width: 48ch;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-list span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--ink);
  background: var(--paper-soft);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.15;
  transition:
    background 150ms ease,
    transform 150ms ease;
}

.project-card:hover .tag-list span,
.project-card:focus-within .tag-list span {
  background: #fff8dc;
  transform: translateY(-1px);
}

.card-action {
  min-width: 116px;
  min-height: 42px;
  margin: 0;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--coral);
  color: var(--ink);
  box-shadow: 5px 5px 0 rgba(31, 43, 53, 0.14);
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.card-action:not(.disabled):hover,
.card-action:not(.disabled):focus-visible {
  transform: translate(-2px, -2px);
  background: var(--lemon);
  box-shadow: 8px 8px 0 rgba(31, 43, 53, 0.16);
}

.card-action:not(.disabled):active {
  transform: translate(1px, 1px);
  box-shadow: 3px 3px 0 rgba(31, 43, 53, 0.14);
}

.card-action.disabled {
  background:
    repeating-linear-gradient(135deg, rgba(31, 43, 53, 0.06) 0 6px, transparent 6px 12px),
    var(--paper-soft);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}

html[data-theme="night"] .hero,
html[data-theme="night"] .project-card,
body[data-theme="night"] .hero,
body[data-theme="night"] .project-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 46%),
    var(--paper);
}

html[data-theme="night"] .daily-poem,
html[data-theme="night"] .profile-link,
html[data-theme="night"] .visit-counter,
html[data-theme="night"] .project-visual,
html[data-theme="night"] .tag-list span,
body[data-theme="night"] .daily-poem,
body[data-theme="night"] .profile-link,
body[data-theme="night"] .visit-counter,
body[data-theme="night"] .project-visual,
body[data-theme="night"] .tag-list span {
  background-color: var(--paper-soft);
}

html[data-theme="night"] .daily-poem,
body[data-theme="night"] .daily-poem {
  background:
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(180deg, #1b2430, #141b24);
}

html[data-theme="night"] .profile-link,
body[data-theme="night"] .profile-link {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--mint) 72%, #111820) 0 14px, transparent 14px),
    linear-gradient(135deg, rgba(93, 143, 203, 0.12), #17202b 52%, rgba(185, 154, 71, 0.08));
}

html[data-theme="night"] .profile-link:hover,
html[data-theme="night"] .profile-link:focus-visible,
body[data-theme="night"] .profile-link:hover,
body[data-theme="night"] .profile-link:focus-visible {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--coral) 70%, #111820) 0 14px, transparent 14px),
    linear-gradient(135deg, rgba(185, 154, 71, 0.12), #1b2531 48%, rgba(66, 180, 135, 0.1));
}

html[data-theme="night"] .visit-counter,
body[data-theme="night"] .visit-counter {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--sky) 70%, #111820) 0 14px, transparent 14px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(135deg, rgba(66, 180, 135, 0.12), transparent 44%),
    #151d27;
}

html[data-theme="night"] .project-visual,
html[data-theme="night"] .rpg-visual,
body[data-theme="night"] .project-visual,
body[data-theme="night"] .rpg-visual {
  background:
    repeating-linear-gradient(90deg, var(--grid-line) 0 2px, transparent 2px 28px),
    #111820;
}

html[data-theme="night"] .rpg-visual,
body[data-theme="night"] .rpg-visual {
  background:
    repeating-linear-gradient(0deg, var(--grid-line) 0 2px, transparent 2px 20px),
    repeating-linear-gradient(90deg, var(--grid-line) 0 2px, transparent 2px 20px),
    #111820;
}

html[data-theme="night"] .project-card:hover,
html[data-theme="night"] .project-card:focus-within,
body[data-theme="night"] .project-card:hover,
body[data-theme="night"] .project-card:focus-within {
  background: #1b2430;
}

html[data-theme="night"] .profile-mark,
body[data-theme="night"] .profile-mark {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--lemon) 68%, #121820) 0 47%, color-mix(in srgb, var(--mint) 64%, #121820) 47% 100%);
}

html[data-theme="night"] .profile-mark::after,
body[data-theme="night"] .profile-mark::after {
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="night"] .profile-signal span,
html[data-theme="night"] .snake-segment,
html[data-theme="night"] .rpg-castle,
html[data-theme="night"] .rpg-hero,
html[data-theme="night"] .rpg-enemy,
html[data-theme="night"] .food-dot,
html[data-theme="night"] .reward-dot,
html[data-theme="night"] .agent-dot,
html[data-theme="night"] .network-node,
body[data-theme="night"] .profile-signal span,
body[data-theme="night"] .snake-segment,
body[data-theme="night"] .rpg-castle,
body[data-theme="night"] .rpg-hero,
body[data-theme="night"] .rpg-enemy,
body[data-theme="night"] .food-dot,
body[data-theme="night"] .reward-dot,
body[data-theme="night"] .agent-dot,
body[data-theme="night"] .network-node {
  filter: saturate(0.78) brightness(0.9);
}

html[data-theme="night"] .card-action,
body[data-theme="night"] .card-action {
  color: #121820;
  background: color-mix(in srgb, var(--coral) 76%, var(--paper));
}

html[data-theme="night"] .card-action:not(.disabled):hover,
html[data-theme="night"] .card-action:not(.disabled):focus-visible,
body[data-theme="night"] .card-action:not(.disabled):hover,
body[data-theme="night"] .card-action:not(.disabled):focus-visible {
  background: color-mix(in srgb, var(--lemon) 72%, var(--paper));
}

html[data-theme="night"] .card-action.disabled,
body[data-theme="night"] .card-action.disabled {
  color: var(--muted);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0 6px, transparent 6px 12px),
    #121820;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes poemSettle {
  from {
    opacity: 0;
    transform: translateY(8px) rotate(-0.8deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@keyframes signalLift {

  0%,
  100% {
    transform: scaleY(0.74);
    opacity: 0.72;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes foodPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
  }
}

@keyframes bannerWave {

  0%,
  100% {
    transform: skewY(0deg);
  }

  50% {
    transform: skewY(-7deg);
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 980px) {
  .site-shell {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 26px;
  }

  .hero {
    position: relative;
    top: auto;
    min-height: 0;
  }

  .hero-note {
    max-width: 560px;
  }

  .profile-signal {
    max-width: 320px;
  }

  .project-card {
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .theme-toggle {
    top: 12px;
    right: 12px;
    min-height: 36px;
    padding-right: 10px;
    font-size: 0.72rem;
  }

  .site-shell {
    padding: 18px 14px 28px;
    gap: 18px;
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 3.2rem);
  }

  .hero {
    padding: 22px;
  }

  .section-heading {
    min-height: 0;
    align-items: center;
    padding: 2px 0 10px;
  }

  .section-count {
    min-height: 28px;
  }

  .profile-signal {
    margin-top: 24px;
  }

  .project-card {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-visual {
    min-height: 128px;
  }

  .project-content {
    gap: 14px;
    padding: 0;
  }

  .project-footer {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .card-action {
    width: 100%;
  }
}