/* ==========================================================================
   iMikufans — Resend-style edition
   Black, editorial, developer-tool aesthetic.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root,
[data-theme="dark"] {
  --bg: #000000;
  --bg-soft: #050506;
  --panel: #09090b;
  --panel-2: #0d0d10;
  --panel-3: #121216;
  --line: #1b1b20;
  --line-strong: #2a2a31;
  --ink: #f2f2f3;
  --ink-soft: #c7c7cd;
  --muted: #8a8a93;
  --muted-2: #5c5c66;
  --accent: #a78bfa;
  --accent-2: #60a5fa;
  --accent-3: #34d399;
  --sakura: #f2a2b8;
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
  --font-sans: "Inter", "Noto Sans SC", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", "Noto Serif SC", "Songti SC", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-soft: #f4f4f5;
  --panel: #ffffff;
  --panel-2: #f7f7f8;
  --panel-3: #f0f0f2;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --ink: #09090b;
  --ink-soft: #3f3f46;
  --muted: #71717a;
  --muted-2: #a1a1aa;
  --accent: #7c3aed;
  --accent-2: #2563eb;
  --accent-3: #059669;
  --sakura: #be185d;
  --shadow: 0 30px 80px -50px rgba(0, 0, 0, 0.2);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 74% -12%, rgba(124, 58, 237, 0.20), transparent 62%),
    radial-gradient(760px 520px at 8% 2%, rgba(37, 99, 235, 0.11), transparent 60%),
    radial-gradient(700px 520px at 50% 112%, rgba(167, 139, 250, 0.08), transparent 62%);
}
[data-theme="light"] body::before {
  background:
    radial-gradient(900px 620px at 74% -12%, rgba(124, 58, 237, 0.09), transparent 62%),
    radial-gradient(760px 520px at 8% 2%, rgba(37, 99, 235, 0.06), transparent 60%),
    radial-gradient(700px 520px at 50% 112%, rgba(167, 139, 250, 0.05), transparent 62%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.16;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 68%);
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }

::selection { background: rgba(167, 139, 250, 0.35); color: var(--ink); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #2a2a31; border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  border-bottom-color: var(--line);
}
[data-theme="light"] .site-header.is-scrolled { background: rgba(250, 250, 250, 0.78); }

.header-inner {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding: 0 var(--gutter);
  height: 64px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-seal {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  box-shadow: inset 0 0 18px rgba(167, 139, 250, 0.12);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.brand:hover .brand-seal {
  border-color: var(--accent);
  box-shadow: inset 0 0 18px rgba(167, 139, 250, 0.25), 0 0 24px -8px rgba(167, 139, 250, 0.5);
}
.brand-words { display: flex; flex-direction: column; line-height: 1.05; }
.brand-words b {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-words small {
  font-family: var(--font-mono);
  font-size: 0.46rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
}
.desktop-nav a {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.desktop-nav a > span { margin-right: 5px; font-family: var(--font-mono); font-size: 0.44rem; letter-spacing: 0.04em; color: var(--muted-2); }
.desktop-nav a .nav-label { font-style: normal; }
.desktop-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.045); }
.desktop-nav a.is-active { color: var(--ink); }
[data-theme="light"] .desktop-nav a:hover { background: rgba(0, 0, 0, 0.045); }

.header-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  min-width: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.tool-btn svg { width: 15px; height: 15px; }
.tool-btn:hover { color: var(--ink); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }
[data-theme="light"] .tool-btn:hover { background: rgba(0, 0, 0, 0.04); }
.tool-kbd { display: none; font-family: var(--font-mono); font-size: 0.54rem; letter-spacing: 0.04em; color: var(--muted-2); }
@media (min-width: 1180px) { .tool-kbd { display: inline; } }

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 34px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-switch svg { width: 14px; height: 14px; flex-shrink: 0; }
.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  outline: none;
  padding: 0 1px;
}
.lang-switch::after { content: "▾"; font-size: 0.42rem; color: var(--muted-2); }
.lang-switch:hover { border-color: var(--line-strong); color: var(--ink); }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--ink);
  border-radius: 7px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.header-cta:hover { background: #ffffff; color: #000000; border-color: #ffffff; }
[data-theme="light"] .header-cta { background: #111111; color: #ffffff; border-color: #111111; }
[data-theme="light"] .header-cta:hover { background: #000000; border-color: #000000; }

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.menu-btn span {
  display: block;
  height: 1.5px;
  background: var(--ink-soft);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), width 0.3s var(--ease);
}
.menu-btn span:last-child { width: 70%; margin-left: auto; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(2.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { width: 100%; transform: translateY(-2.75px) rotate(-45deg); }

.header-progress { height: 1px; width: 100%; }
.header-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.1s linear; }

.site-header.on-dark.is-scrolled { background: rgba(0, 0, 0, 0.78); border-bottom-color: rgba(255, 255, 255, 0.1); }
.site-header.on-dark .brand-words b { color: #f2f2f3; }
.site-header.on-dark .brand-words small { color: #8a8a93; }
.site-header.on-dark .desktop-nav a { color: #8a8a93; }
.site-header.on-dark .desktop-nav a:hover,
.site-header.on-dark .desktop-nav a.is-active { color: #f2f2f3; }
.site-header.on-dark .tool-btn,
.site-header.on-dark .lang-switch { color: #c7c7cd; border-color: rgba(255, 255, 255, 0.14); }
.site-header.on-dark .brand-seal { background: #0a0a0a; color: #f2f2f3; }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 90px var(--gutter) 32px;
  background: #000000;
  overflow-y: auto;
}
[data-theme="light"] .mobile-menu { background: var(--bg); }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 400;
  color: var(--ink);
  transition: color 0.2s var(--ease), padding-left 0.25s var(--ease);
}
.mobile-menu nav a span { font-family: var(--font-mono); font-size: 0.55rem; color: var(--muted-2); letter-spacing: 0.1em; }
.mobile-menu nav a .mm-label { font-style: normal; }
.mobile-menu nav a em { margin-left: auto; font-family: var(--font-serif); font-style: italic; font-size: 0.9rem; color: var(--muted); }
.mobile-menu nav a:hover { color: var(--accent); padding-left: 6px; }
.mobile-menu-foot { display: flex; gap: 18px; flex-wrap: wrap; }
.mobile-menu-foot a { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.1em; color: var(--muted); }
.mobile-menu-foot a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 104px;
  padding-bottom: 0;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 12%;
  right: -12%;
  width: 820px;
  height: 820px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.22), rgba(37, 99, 235, 0.10) 38%, transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}
[data-theme="light"] .hero::before { background: radial-gradient(circle, rgba(124, 58, 237, 0.12), rgba(37, 99, 235, 0.06) 38%, transparent 68%); }
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.hero-copy { max-width: 720px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(90deg, var(--line-strong), var(--accent), var(--line-strong)) border-box;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.hero-badge:hover { color: var(--ink); box-shadow: 0 0 32px -12px rgba(167, 139, 250, 0.5); }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 10px rgba(52, 211, 153, 0.8); }
.badge-arrow { color: var(--muted); }

.hero-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: clamp(14px, 2.4vw, 34px);
  margin: 20px 0 6px;
  line-height: 1.02;
  font-size: 0;
  letter-spacing: 0;
  color: var(--ink);
}
.hero-cn {
  font-family: "Shippori Mincho", "Noto Serif SC", serif;
  font-size: clamp(4.6rem, 9.5vw, 8rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.045em;
  color: var(--ink);
}
.hero-en {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.4vw, 4rem);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--accent);
  padding-bottom: 0.16em;
}
.hero-sub { max-width: 540px; font-size: 0.95rem; line-height: 1.8; color: var(--muted); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 26px;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.hero-status { display: inline-flex; align-items: center; gap: 7px; }
.hero-status-text { color: var(--ink-soft); }
.hero-meta time { padding-left: 16px; border-left: 1px solid var(--line); color: var(--ink); font-variant-numeric: tabular-nums; }

.hero-visual { position: relative; display: flex; justify-content: flex-end; }
.hero-reveal { animation: hero-in 0.9s 0.1s var(--ease) both; }
@keyframes hero-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }


/* Main-site hero layout, Resend-styled */
.hero-handle {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-handle span { color: var(--accent); margin: 0 5px; }
.hero-quote {
  margin: 24px 0 0;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
}
.hero-quote p {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink);
}
.hero-quote cite {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.hero-intro {
  max-width: 560px;
  margin-top: 20px;
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--ink-soft);
}
.hero-actions { margin-top: 26px; }
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 24px;
}
.hero-tags li {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
[data-theme="light"] .hero-tags li { background: var(--panel); }
.hero-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.hero-side .portrait { width: min(100%, 380px); }
.status-card {
  display: flex;
  align-items: center;
  gap: 11px;
  width: min(100%, 380px);
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.status-text { display: flex; flex-direction: column; line-height: 1.3; }
.status-text b { font-size: 0.68rem; font-weight: 600; color: var(--ink); }
.status-text small { font-size: 0.62rem; color: var(--muted); }
.status-card time { margin-left: auto; font-family: var(--font-mono); font-size: 0.64rem; color: var(--accent); letter-spacing: 0.04em; }
.hero-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 2;
  margin-top: clamp(28px, 5vh, 56px);
  padding-bottom: 26px;
}
.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.scroll-line {
  position: relative;
  display: block;
  width: 46px;
  height: 1px;
  background: var(--line-strong);
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: scroll-line 2.6s var(--ease) infinite;
}
@keyframes scroll-line {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}
.hero-coords { color: var(--muted-2); font-size: 0.52rem; }
.hero-marquee {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.008);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.marquee-track i { color: var(--accent); font-style: normal; font-size: 0.55rem; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.slash { color: var(--accent); }
.hero-copy .hero-reveal:nth-child(1) { animation-delay: 0.05s; }
.hero-copy .hero-reveal:nth-child(2) { animation-delay: 0.12s; }
.hero-copy .hero-reveal:nth-child(3) { animation-delay: 0.19s; }
.hero-copy .hero-reveal:nth-child(4) { animation-delay: 0.26s; }
.hero-copy .hero-reveal:nth-child(5) { animation-delay: 0.33s; }
.hero-copy .hero-reveal:nth-child(6) { animation-delay: 0.4s; }
.hero-copy .hero-reveal:nth-child(7) { animation-delay: 0.47s; }
.hero-side.hero-reveal { animation-delay: 0.3s; }

@media (max-width: 1100px) {
  .hero-side { flex-direction: row; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
  .hero-side .portrait { width: min(56vw, 320px); }
  .status-card { width: auto; flex: 1; min-width: 240px; }
}
@media (max-width: 900px) {
  .hero-coords { display: none; }
}
@media (max-width: 720px) {
  .hero-title { font-size: 0; gap: 10px; }
  .hero-cn { font-size: 4.2rem; }
  .hero-en { font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .hero-intro { font-size: 0.86rem; }
  .hero-side { flex-direction: column; align-items: stretch; }
  .hero-side .portrait { width: min(74vw, 320px); align-self: center; }
  .status-card { width: 100%; min-width: 0; }
}

/* Terminal */
.terminal {
  position: relative;
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #070708;
  box-shadow: 0 40px 120px -50px rgba(124, 58, 237, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  overflow: hidden;
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
  transition: transform 0.6s var(--ease), border-color 0.4s var(--ease);
}
.terminal:hover { transform: perspective(1200px) rotateY(0deg) rotateX(0deg); border-color: #35353d; }
.terminal-glow {
  position: absolute;
  inset: -70px;
  z-index: -1;
  background: radial-gradient(circle at 62% 40%, rgba(124, 58, 237, 0.30), rgba(37, 99, 235, 0.12) 42%, transparent 70%);
  filter: blur(36px);
  pointer-events: none;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}
.terminal-dots { display: flex; gap: 5px; }
.terminal-dots i { width: 6px; height: 6px; border-radius: 50%; background: #35353d; }
.terminal-title { margin-left: 4px; font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.04em; color: var(--muted); }
.terminal-avatar {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.08);
}
.terminal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.terminal-tabs {
  display: flex;
  gap: 2px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  color: var(--muted-2);
}
.terminal-tabs span { padding: 9px 8px 8px; border-bottom: 1px solid transparent; }
.terminal-tabs .is-active { color: var(--ink); border-bottom-color: var(--accent); }
.terminal-code {
  margin: 0;
  padding: 16px 0;
  counter-reset: line;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.95;
  color: #c9c9cf;
  overflow-x: auto;
}
.terminal-code li { display: flex; padding: 0 16px; white-space: pre; }
.terminal-code li::before {
  counter-increment: line;
  content: counter(line);
  flex: 0 0 24px;
  width: 24px;
  margin-right: 14px;
  text-align: right;
  color: #3a3a42;
  user-select: none;
}
.terminal-code code { font: inherit; color: inherit; }
.tok-key { color: #c4b5fd; }
.tok-var { color: #f0abfc; }
.tok-prop { color: #93c5fd; }
.tok-str { color: #86efac; }
.tok-num { color: #fbbf24; }
.tok-punc { color: #71717a; }
.tok-com { color: #52525b; font-style: italic; }
.terminal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.terminal-foot .mono { margin-left: auto; color: var(--muted-2); }

.hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(36px, 6vh, 64px);
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
}
.hero-bottom .mono { font-size: 0.52rem; }

/* ---------- Site strip ---------- */
.site-strip {
  position: relative;
  z-index: 1;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.008);
}
.strip-label { margin-bottom: 17px; font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.strip-logos { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 38px; }
.strip-logos a { font-family: var(--font-sans); font-size: 0.84rem; font-weight: 600; letter-spacing: 0.08em; color: #8a8a93; transition: color 0.2s var(--ease); }
.strip-logos a:hover { color: var(--ink); }
[data-theme="light"] .strip-logos a { color: #71717a; }
[data-theme="light"] .strip-logos a:hover { color: var(--ink); }

/* ---------- Stats ---------- */
.stats-band { border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 20px 30px 26px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; }
.stat:first-child { border-left: none; padding-left: 0; }
.stat b { font-family: var(--font-sans); font-size: clamp(2rem, 3.4vw, 2.6rem); font-weight: 500; line-height: 1; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ---------- Sections ---------- */
.section { position: relative; z-index: 1; padding: clamp(72px, 10vh, 108px) 0; border-top: 1px solid var(--line); background: transparent; }
.section-alt { background: rgba(255, 255, 255, 0.008); }
.section-dark { background: #000000; }
.section-dark::before {
  content: "";
  position: absolute;
  top: -120px;
  right: 8%;
  width: 620px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.16), transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}

.section-head {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(32px, 5vw, 46px);
}
.section-meta { display: flex; align-items: baseline; gap: 10px; }
.section-num {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
}
.section-kicker { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.section-heading h2 { font-family: var(--font-serif); font-size: clamp(2.4rem, 4.4vw, 3.8rem); font-weight: 400; line-height: 1.02; letter-spacing: -0.02em; color: var(--ink); }
.section-heading h2 em { font-style: italic; color: var(--muted); }
.section-heading p { max-width: 520px; margin-top: 9px; font-size: 0.82rem; line-height: 1.7; color: var(--muted); }
.section-more { display: flex; justify-content: flex-end; margin-top: 32px; }
.more-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.more-link span { color: var(--accent); }
.more-link:hover { color: var(--ink); border-color: var(--ink); }
.more-link-light { color: #8a8a93; border-color: rgba(255, 255, 255, 0.15); }
.more-link-light:hover { color: #ffffff; border-color: #ffffff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--bg); box-shadow: 0 10px 30px -16px rgba(255, 255, 255, 0.35); }
.btn-primary:hover { background: #ffffff; border-color: #ffffff; color: #000000; }
[data-theme="light"] .btn-primary { background: #111111; border-color: #111111; color: #ffffff; }
[data-theme="light"] .btn-primary:hover { background: #000000; border-color: #000000; }
.btn-ghost { background: rgba(255, 255, 255, 0.02); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: #3a3a44; }
[data-theme="light"] .btn-ghost { background: #ffffff; border-color: var(--line-strong); }
[data-theme="light"] .btn-ghost:hover { background: var(--panel-2); border-color: var(--ink); }
.btn-light { background: #f2f2f3; border-color: #f2f2f3; color: #09090b; }
.btn-light:hover { background: #ffffff; border-color: #ffffff; color: #000000; }
.btn-text { height: auto; padding: 0; color: var(--muted); border-radius: 0; }
.btn-text:hover { color: var(--ink); transform: none; }
.btn-arrow { font-size: 0.9em; transition: transform 0.25s var(--ease); }
.btn:hover .btn-arrow { transform: translate(2px, -2px); }

/* Blog CTA */
.btn.btn-blog {
  height: 60px;
  padding: 0 18px;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #ececee);
  color: #09090b;
  box-shadow: 0 24px 70px -34px rgba(167, 139, 250, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.btn.btn-blog:hover { background: #ffffff; color: #000000; border-color: rgba(167, 139, 250, 0.45); box-shadow: 0 28px 90px -30px rgba(167, 139, 250, 0.7), 0 0 0 1px rgba(167, 139, 250, 0.22); transform: translateY(-2px); }
[data-theme="light"] .btn.btn-blog { background: #111111; color: #ffffff; box-shadow: 0 24px 70px -36px rgba(124, 58, 237, 0.35); }
[data-theme="light"] .btn.btn-blog:hover { background: #000000; color: #ffffff; }
.blog-label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.12; text-align: left; }
.blog-label b { font-size: 0.88rem; font-weight: 600; letter-spacing: 0.01em; color: inherit; }
.blog-label small { margin-top: 3px; font-family: var(--font-mono); font-size: 0.5rem; font-weight: 400; letter-spacing: 0.04em; color: #52525b; text-transform: lowercase; }
[data-theme="light"] .blog-label small { color: #a1a1aa; }
.btn.btn-blog .btn-arrow { color: inherit; font-size: 1rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.about-main p { max-width: 700px; font-size: 0.9rem; line-height: 1.9; color: var(--ink-soft); }
.about-main p + p { margin-top: 16px; }
.about-lead { font-family: var(--font-serif) !important; font-size: clamp(1.55rem, 2.4vw, 2.1rem) !important; line-height: 1.48 !important; letter-spacing: -0.01em; color: var(--ink) !important; font-weight: 400 !important; }
.about-lead mark { color: inherit; background: linear-gradient(180deg, transparent 62%, rgba(167, 139, 250, 0.28) 62%); padding: 0 2px; white-space: nowrap; }
.creed { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--font-serif); font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.35; color: var(--ink); }
.creed span:last-child { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.15em; color: var(--muted); }
.about-facts { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 30px 80px -50px rgba(0, 0, 0, 0.8); }
.about-facts dl { margin-top: 16px; }
.about-facts dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 0.72rem; }
.about-facts dl > div:last-child { border-bottom: none; }
.about-facts dt { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.about-facts dd { text-align: right; color: var(--ink-soft); }
.about-facts dd .status-dot { width: 5px; height: 5px; margin-right: 5px; vertical-align: 1px; }

/* Portrait */
.about-portrait { width: 100%; max-width: 280px; margin: 0 auto; }
.portrait { position: relative; width: 100%; }
.portrait-stage { position: relative; perspective: 900px; transform-style: preserve-3d; }
.portrait-frame {
  position: relative;
  aspect-ratio: 1;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 20px 50px -32px rgba(0, 0, 0, 0.9), 0 0 42px -20px rgba(167, 139, 250, 0.22);
  transform-style: preserve-3d;
  transform: rotateX(0deg) rotateY(0deg);
  transition: border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
  will-change: transform;
}
.portrait-frame.is-active { border-color: rgba(167, 139, 250, 0.55); box-shadow: 0 26px 70px -34px rgba(0, 0, 0, 0.9), 0 0 52px -18px rgba(167, 139, 250, 0.4); }
.portrait-photo { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 5px; background: var(--panel-2); transform-style: preserve-3d; }
.portrait-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 5px; filter: saturate(0.95) contrast(1.02); transform: translate3d(0, 0, 10px) scale(1.05); will-change: transform; }
.portrait-shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 5px;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 40%), rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.05) 42%, transparent 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.portrait-frame.is-active .portrait-shine { opacity: 1; }
.portrait-shadow { position: absolute; left: 12%; right: 12%; bottom: -22px; height: 26px; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.18) 48%, transparent 72%); filter: blur(12px); transform: translate3d(0, 0, -30px); will-change: transform; }
.portrait-seal { position: absolute; right: -9px; bottom: 24px; z-index: 5; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--sakura); color: #ffffff; font-family: var(--font-serif); font-size: 17px; font-weight: 700; box-shadow: 0 10px 24px -12px rgba(242, 162, 184, 0.7); transform: translate3d(0, 0, 46px) rotate(6deg); will-change: transform; }
.portrait-vertical { position: absolute; top: 14px; right: -20px; z-index: 4; writing-mode: vertical-rl; font-family: var(--font-serif); font-size: 0.62rem; letter-spacing: 0.3em; color: var(--muted); transform: translate3d(0, 0, 26px); will-change: transform; }
.portrait figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-inline: 6px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.trait-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: clamp(36px, 5vw, 52px); border: 1px solid var(--line); border-radius: 14px; background: var(--line); overflow: hidden; }
.trait { padding: 20px; background: var(--panel); transition: background 0.3s var(--ease); }
.trait:hover { background: var(--panel-2); }
.trait-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.trait-head b { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.trait-head span { font-family: var(--font-mono); font-size: 0.44rem; letter-spacing: 0.12em; color: var(--muted-2); }
.trait ul { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.trait li { padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 0.58rem; color: var(--muted); background: rgba(255, 255, 255, 0.02); }
[data-theme="light"] .trait li { background: var(--panel-2); }

/* ---------- Now ---------- */
.now-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); gap: clamp(28px, 4vw, 48px); align-items: start; }
.now-list { border-top: 1px solid var(--line); }
.now-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); transition: padding-left 0.3s var(--ease), background 0.3s var(--ease); }
.now-item:hover { padding-left: 8px; }
.now-item .n { font-family: var(--font-mono); font-size: 0.56rem; color: var(--accent); padding-top: 3px; }
.now-item .body b { display: block; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.now-item .body small { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 0.48rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.now-item .body p { margin-top: 6px; font-size: 0.76rem; line-height: 1.7; color: var(--muted); }
.now-item .state { align-self: start; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; font-family: var(--font-mono); font-size: 0.42rem; letter-spacing: 0.08em; color: var(--muted-2); white-space: nowrap; }
.now-aside { display: flex; flex-direction: column; gap: 10px; }
.weather-card, .goal-card, .clock-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: border-color 0.25s var(--ease); }
.weather-card:hover, .goal-card:hover, .clock-card:hover { border-color: var(--line-strong); }
.weather-head, .goal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.1em; color: var(--muted); }
.weather-icon { font-size: 0.95rem; color: var(--accent); }
.weather-cities { display: flex; gap: 5px; margin-top: 9px; }
.weather-city { padding: 3px 8px; border: 1px solid var(--line); border-radius: 5px; font-family: var(--font-mono); font-size: 0.48rem; color: var(--muted); transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease); }
.weather-city:hover { color: var(--ink); border-color: var(--line-strong); }
.weather-city.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
[data-theme="light"] .weather-city.is-active { background: #111111; border-color: #111111; color: #ffffff; }
.weather-temp { display: flex; align-items: flex-start; gap: 2px; margin-top: 10px; line-height: 1; }
.weather-temp b { font-size: 2.7rem; font-weight: 500; letter-spacing: -0.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.weather-temp sup { margin-top: 5px; font-size: 0.7rem; color: var(--muted); }
.weather-desc { margin-top: 2px; font-size: 0.7rem; color: var(--ink-soft); }
.weather-meta { display: flex; gap: 16px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-family: var(--font-mono); font-size: 0.48rem; color: var(--muted); }
.weather-meta b { color: var(--ink-soft); font-weight: 500; }
.weather-source { margin-top: 10px; font-size: 0.42rem; color: var(--muted-2); }

.goal-head b { color: var(--accent); font-weight: 500; }
.goal-num { display: flex; align-items: baseline; gap: 5px; margin-top: 9px; line-height: 1; }
.goal-num span { font-size: 1.9rem; font-weight: 500; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.goal-num small { font-family: var(--font-mono); font-size: 0.5rem; color: var(--muted); }
.goal-bar { height: 4px; margin-top: 12px; border-radius: 99px; background: #1a1a1f; overflow: hidden; }
[data-theme="light"] .goal-bar { background: #e4e4e7; }
.goal-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1.1s var(--ease); }
.goal-card p { margin-top: 8px; font-size: 0.62rem; color: var(--muted); }
.goal-card p b { color: var(--accent); font-weight: 600; }

.clock-card > span { font-size: 0.44rem; color: var(--muted); }
.clock-card > b { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 1.6rem; font-weight: 400; letter-spacing: 0.01em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.clock-card > p { margin-top: 6px; font-size: 0.62rem; color: var(--muted); }
.day-progress { height: 2px; margin-top: 14px; background: #1a1a1f; overflow: hidden; }
[data-theme="light"] .day-progress { background: #e4e4e7; }
.day-progress i { display: block; width: 0; height: 100%; background: var(--accent); transition: width 1s linear; }
.clock-card > small { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 0.44rem; color: var(--muted-2); }

/* ---------- Featured ---------- */
.featured-grid { display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.78fr); grid-template-rows: repeat(2, minmax(220px, 1fr)); gap: 12px; }
.featured-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  background: var(--panel);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.featured-card:first-child { grid-row: span 2; min-height: 100%; padding: clamp(24px, 3.5vw, 36px); }
.featured-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 30px 80px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(167, 139, 250, 0.1); }
.tone-art { position: absolute; inset: 0; z-index: -1; overflow: hidden; transition: transform 0.8s var(--ease); }
.featured-card:hover .tone-art { transform: scale(1.02); }
.tone-art::before, .tone-art::after { content: ""; position: absolute; border-radius: 50%; }
.tone-noir { background: radial-gradient(110% 110% at 82% 0%, rgba(124, 58, 237, 0.30), transparent 58%), #08080a; }
.tone-noir .tone-art::before { width: 50%; aspect-ratio: 1; right: -10%; top: -22%; background: radial-gradient(circle, rgba(96, 165, 250, 0.22), transparent 68%); }
.tone-noir .tone-art::after { width: 78%; height: 1px; left: 10%; bottom: 26%; border-radius: 0; background: rgba(255, 255, 255, 0.1); box-shadow: 0 18px 0 rgba(255, 255, 255, 0.05), 0 -18px 0 rgba(255, 255, 255, 0.05); }
.tone-paper { background: linear-gradient(145deg, #0d0d10, #08080a); }
.tone-paper .tone-art::before { inset: 0; width: auto; height: auto; border-radius: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 80%, transparent); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 80%, transparent); }
.tone-paper .tone-art::after { width: 180px; height: 180px; right: 8%; top: 10%; background: rgba(167, 139, 250, 0.14); filter: blur(30px); }
.tone-ivory { background: linear-gradient(160deg, #101014, #08080a); }
.tone-ivory .tone-art::before { width: 220px; height: 220px; right: -30px; bottom: -50px; background: rgba(96, 165, 250, 0.12); filter: blur(28px); }
.tone-ivory .tone-art::after { width: 1px; height: 62%; right: 16%; top: 12%; border-radius: 0; background: rgba(255, 255, 255, 0.1); }
.tone-glyph { position: absolute; right: 2%; bottom: -10%; z-index: -1; font-family: var(--font-serif); font-size: clamp(4rem, 9vw, 8rem); font-weight: 400; line-height: 1; letter-spacing: -0.04em; color: rgba(255, 255, 255, 0.045); pointer-events: none; user-select: none; }
.featured-card .tone-glyph { font-size: clamp(4.4rem, 10vw, 9rem); }
.featured-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: auto; }
.featured-cat { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 0.48rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.featured-cat::before { content: ""; width: 16px; height: 1px; background: currentColor; }
.featured-date { font-family: var(--font-mono); font-size: 0.46rem; letter-spacing: 0.08em; color: var(--muted-2); }
.featured-card h3 { margin-top: 18px; font-family: var(--font-serif); font-size: clamp(1.35rem, 2.2vw, 1.9rem); font-weight: 400; line-height: 1.18; color: #f2f2f3; }
.featured-card:first-child h3 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.featured-card p { max-width: 600px; margin-top: 9px; font-size: 0.74rem; line-height: 1.7; color: #8a8a93; }
.featured-meta { display: flex; align-items: center; gap: 14px; margin-top: 15px; padding-top: 11px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-family: var(--font-mono); font-size: 0.46rem; letter-spacing: 0.06em; color: #5c5c66; }
.featured-meta .arrow { margin-left: auto; font-size: 0.9rem; color: #f2f2f3; transition: transform 0.25s var(--ease); }
.featured-card:hover .arrow { transform: translate(2px, -2px); }

/* ---------- Journal ---------- */
.journal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.journal-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.filter-btn { padding: 5px 10px; border: 1px solid var(--line); border-radius: 5px; font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.06em; color: var(--muted); transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease); }
.filter-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.filter-btn.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
[data-theme="light"] .filter-btn.is-active { background: #111111; border-color: #111111; color: #ffffff; }
.journal-search { display: flex; align-items: center; gap: 7px; min-width: 210px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--muted); }
.journal-search svg { width: 14px; height: 14px; flex-shrink: 0; }
.journal-search input { width: 100%; border: none; outline: none; background: none; font-size: 0.68rem; color: var(--ink); }
.journal-search input::placeholder { color: var(--muted-2); }
.journal-search:focus-within { border-color: var(--accent); }
.journal-list { border-top: 1px solid var(--line); }
.journal-row { display: grid; grid-template-columns: 32px 78px 68px minmax(0, 1fr) 108px 18px; gap: 14px; align-items: center; padding: 16px 8px; border-bottom: 1px solid var(--line); transition: background 0.2s var(--ease), padding-left 0.2s var(--ease); }
.journal-row:hover { background: rgba(255, 255, 255, 0.025); padding-left: 14px; }
[data-theme="light"] .journal-row:hover { background: var(--panel-2); }
.journal-row .idx { font-family: var(--font-mono); font-size: 0.52rem; color: var(--muted-2); }
.journal-row .date { font-family: var(--font-mono); font-size: 0.48rem; letter-spacing: 0.04em; color: var(--muted); }
.journal-row .cat { justify-self: start; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; font-family: var(--font-mono); font-size: 0.42rem; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
.journal-row .title-wrap { min-width: 0; }
.journal-row h3 { font-family: var(--font-serif); font-size: 1.22rem; font-weight: 400; line-height: 1.3; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.2s var(--ease); }
.journal-row:hover h3 { color: #ffffff; }
[data-theme="light"] .journal-row:hover h3 { color: #000000; }
.journal-row .summary { display: block; margin-top: 2px; font-size: 0.66rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journal-row .metrics { display: flex; gap: 10px; justify-content: flex-end; font-family: var(--font-mono); font-size: 0.44rem; color: var(--muted-2); }
.journal-row .arrow { color: var(--muted-2); transition: color 0.2s var(--ease), transform 0.2s var(--ease); }
.journal-row:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }
.journal-empty { padding: 40px 0; text-align: center; font-size: 0.8rem; color: var(--muted); }

/* ---------- Gallery ---------- */
.gallery-grid { columns: 3; column-gap: 10px; }
.gallery-item { position: relative; display: block; width: 100%; margin-bottom: 10px; break-inside: avoid; border: 0; border-radius: 6px; overflow: hidden; background: transparent; text-align: left; }
.gallery-item img { width: 100%; height: auto; filter: none; transition: transform 0.7s var(--ease), filter 0.4s var(--ease); }
.gallery-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 46%); opacity: 0; transition: opacity 0.3s var(--ease); }
.gallery-item:hover img { transform: scale(1.035); filter: none; }
.gallery-item:hover::after { opacity: 1; }
.gallery-cap { position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; color: #fff; opacity: 0; transform: translateY(5px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.gallery-item:hover .gallery-cap { opacity: 1; transform: none; }
.gallery-cap b { font-family: var(--font-serif); font-size: 0.82rem; font-weight: 400; }
.gallery-cap small { font-family: var(--font-mono); font-size: 0.42rem; opacity: 0.7; }

/* ---------- Projects ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.project-card { position: relative; display: flex; flex-direction: column; min-height: 250px; padding: 20px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; background: #0a0a0b; color: #f2f2f3; overflow: hidden; isolation: isolate; transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.project-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.18); box-shadow: 0 30px 80px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(167, 139, 250, 0.1); }
.project-card.is-featured { grid-column: span 2; grid-row: span 2; min-height: 100%; padding: 28px; }
.project-art { position: absolute; inset: 0; z-index: -1; opacity: 1; transition: transform 0.6s var(--ease); }
.project-card:hover .project-art { transform: scale(1.02); }
.project-art .glyph { position: absolute; right: -2%; bottom: -10%; font-family: var(--font-serif); font-size: clamp(4rem, 8vw, 7rem); font-weight: 400; line-height: 1; opacity: 0.06; color: #ffffff; letter-spacing: -0.05em; white-space: nowrap; }
.paper-art { background: radial-gradient(120% 120% at 80% 0%, rgba(167, 139, 250, 0.14), transparent 58%), #0a0a0c; }
.pine-art { background: radial-gradient(120% 120% at 80% 0%, rgba(52, 211, 153, 0.11), transparent 58%), #080a09; }
.coffee-art { background: radial-gradient(120% 120% at 80% 0%, rgba(251, 191, 36, 0.10), transparent 58%), #0b0a08; }
.ivory-art { background: linear-gradient(150deg, #0d0d10, #08080a); }
.sakura-art { background: radial-gradient(120% 120% at 80% 0%, rgba(242, 162, 184, 0.12), transparent 58%), #0b090a; }
.sky-art { background: radial-gradient(120% 120% at 80% 0%, rgba(96, 165, 250, 0.12), transparent 58%), #080a0c; }
.noir-art { background: radial-gradient(120% 120% at 80% 0%, rgba(255, 255, 255, 0.05), transparent 58%), #050506; }
.signal-art { background: radial-gradient(120% 120% at 80% 0%, rgba(251, 146, 60, 0.11), transparent 58%), #0b0907; }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border: 1px solid rgba(167, 139, 250, 0.28); border-radius: 4px; font-family: var(--font-mono); font-size: 0.42rem; letter-spacing: 0.06em; color: var(--accent); }
.project-status::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.project-year { font-family: var(--font-mono); font-size: 0.44rem; color: #5c5c66; }
.project-en { margin-top: auto; font-family: var(--font-serif); font-style: italic; font-size: 0.82rem; color: #8a8a93; }
.project-card h3 { margin-top: 2px; font-family: var(--font-serif); font-size: 1.3rem; font-weight: 400; line-height: 1.2; color: #f2f2f3; }
.project-card.is-featured h3 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin-top: 6px; }
.project-card p { max-width: 540px; margin-top: 7px; font-size: 0.7rem; line-height: 1.7; color: #8a8a93; }
.project-card.is-featured p { font-size: 0.8rem; line-height: 1.75; margin-top: 10px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 13px; }
.project-tags li { padding: 2px 6px; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 4px; font-family: var(--font-mono); font-size: 0.46rem; color: #a1a1aa; }
.project-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 15px; font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.05em; color: #c4b5fd; }
.project-go span { transition: transform 0.25s var(--ease); }
.project-card:hover .project-go span { transform: translate(2px, -2px); }

.project-visual { position: absolute; top: 14%; right: 5%; width: min(44%, 320px); transform: rotate(-2deg); filter: drop-shadow(0 26px 40px rgba(0, 0, 0, 0.55)); pointer-events: none; transition: transform 0.6s var(--ease); }
.project-card:hover .project-visual { transform: rotate(-1deg) translateY(-3px); }
.pv-window { display: block; aspect-ratio: 4 / 3.1; padding: 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: #0b0b0e; overflow: hidden; }
.pv-head { display: flex; align-items: center; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pv-head i { width: 5px; height: 5px; border-radius: 50%; background: #35353d; }
.pv-head i:nth-child(1) { background: #52525b; }
.pv-head b { margin-left: auto; font-family: var(--font-mono); font-size: 0.38rem; letter-spacing: 0.06em; color: #71717a; font-weight: 500; }
.pv-body { display: flex; gap: 9px; height: calc(100% - 22px); padding-top: 9px; }
.pv-side { display: flex; flex-direction: column; gap: 5px; width: 21%; padding-right: 8px; border-right: 1px solid var(--line); }
.pv-side i { display: block; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); }
.pv-side i:first-child { width: 80%; background: rgba(167, 139, 250, 0.4); }
.pv-side i:nth-child(3) { width: 70%; }
.pv-side i:nth-child(4) { width: 55%; }
.pv-page { position: relative; flex: 1; display: flex; flex-direction: column; gap: 7px; padding-top: 3px; }
.pv-line { display: block; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); }
.pv-w1 { width: 72%; height: 6px; background: rgba(255, 255, 255, 0.18); }
.pv-w2 { width: 94%; }
.pv-w3 { width: 86%; }
.pv-w4 { width: 64%; }
.pv-ai { align-self: flex-start; margin-top: auto; padding: 2px 6px; border: 1px solid rgba(167, 139, 250, 0.28); border-radius: 4px; background: rgba(167, 139, 250, 0.08); color: #c4b5fd; font-family: var(--font-mono); font-size: 0.36rem; letter-spacing: 0.04em; }

/* ---------- Works ---------- */
.works-banner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(20px, 3vw, 28px); margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(120deg, rgba(124, 58, 237, 0.13), rgba(255, 255, 255, 0.015) 46%, transparent); }
.works-banner .mono { color: #8a8a93; font-size: 0.48rem; }
.works-banner h3 { margin-top: 5px; font-family: var(--font-serif); font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 400; color: #f2f2f3; }
.works-stats { display: flex; gap: clamp(18px, 3vw, 32px); }
.works-stats div { display: flex; flex-direction: column; gap: 1px; }
.works-stats b { font-size: 1.35rem; font-weight: 500; line-height: 1; color: #f2f2f3; }
.works-stats span { font-family: var(--font-mono); font-size: 0.42rem; letter-spacing: 0.08em; color: #8a8a93; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.video-card { display: flex; flex-direction: column; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; background: #0a0a0b; overflow: hidden; color: #f2f2f3; transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.video-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.18); box-shadow: 0 30px 70px -50px rgba(0, 0, 0, 0.9); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #111114; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.2) brightness(0.88) contrast(1.02); transition: transform 0.6s var(--ease), filter 0.35s var(--ease); }
.video-card:hover .video-thumb img { transform: scale(1.03); filter: none; }
.video-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 52%); }
.play-btn { position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #ffffff; color: #000000; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); opacity: 0; transform: scale(0.9); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.play-btn svg { width: 16px; height: 16px; margin-left: 2px; }
.video-card:hover .play-btn { opacity: 1; transform: scale(1); }
.video-popular { position: absolute; top: 8px; left: 8px; z-index: 2; padding: 2px 6px; border-radius: 4px; background: rgba(167, 139, 250, 0.92); color: #09090b; font-family: var(--font-mono); font-size: 0.4rem; letter-spacing: 0.06em; }
.video-body { padding: 12px 13px 14px; }
.video-body h3 { font-family: var(--font-sans); font-size: 0.78rem; font-weight: 500; line-height: 1.45; color: #f2f2f3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-body p { margin-top: 3px; font-size: 0.62rem; line-height: 1.55; color: #8a8a93; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-family: var(--font-mono); font-size: 0.42rem; color: #5c5c66; }
.video-meta .views { color: #c4b5fd; }

/* ---------- Vocaloid ---------- */
.vocaloid-layout { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(28px, 4vw, 52px); align-items: start; }
.vocaloid-big { font-family: var(--font-serif); font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 400; line-height: 1.14; color: var(--ink); }
.vocaloid-lead > p:not(.vocaloid-big) { max-width: 460px; margin-top: 16px; font-size: 0.8rem; line-height: 1.8; color: var(--muted); }
.vocaloid-lead .more-link { margin-top: 22px; }
.creator-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.creator-card { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: transform 0.25s var(--ease), border-color 0.25s var(--ease); }
.creator-card:hover { transform: translateY(-2px); border-color: rgba(167, 139, 250, 0.45); }
.creator-kana { font-family: var(--font-mono); font-size: 0.44rem; letter-spacing: 0.12em; color: var(--accent); }
.creator-card h3 { margin-top: 3px; font-family: var(--font-serif); font-size: 1.8rem; font-style: italic; font-weight: 400; line-height: 1.05; color: var(--ink); }
.creator-card .line { margin-top: 3px; font-size: 0.62rem; color: var(--muted); }
.creator-card .quote { margin-top: 11px; padding-top: 9px; border-top: 1px dashed var(--line); font-family: var(--font-serif); font-size: 0.82rem; line-height: 1.65; color: var(--ink-soft); }
.creator-card .go { display: inline-flex; margin-top: 10px; font-family: var(--font-mono); font-size: 0.44rem; letter-spacing: 0.06em; color: var(--accent); }
.playlist-strip { display: flex; align-items: center; gap: 16px; margin-top: clamp(28px, 4vw, 40px); padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.playlist-disc { position: relative; flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; background: conic-gradient(from 20deg, #111114, #26262e, #111114, #26262e, #111114); animation: spin 14s linear infinite; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.playlist-disc::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--accent); }
.playlist-disc i { position: absolute; inset: 19px; border-radius: 50%; background: var(--panel); }
.playlist-text { display: flex; flex-direction: column; min-width: 0; }
.playlist-text .mono { font-size: 0.42rem; color: var(--muted-2); }
.playlist-text b { margin-top: 1px; font-family: var(--font-serif); font-size: 0.92rem; font-weight: 400; color: var(--ink); }
.playlist-text small { margin-top: 1px; font-size: 0.62rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playlist-link { margin-left: auto; flex-shrink: 0; font-family: var(--font-mono); font-size: 0.48rem; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(to bottom, transparent, var(--line-strong) 8%, var(--line-strong) 92%, transparent); }
.timeline-item { position: relative; display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: clamp(16px, 3vw, 36px); padding: 17px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: none; }
.timeline-item::before { content: ""; position: absolute; left: calc(-1 * 22px); top: 27px; width: 6px; height: 6px; margin-left: -2.5px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.timeline-item:hover::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.12); }
.timeline-date { padding-top: 3px; font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.08em; color: var(--muted); }
.timeline-body h3 { font-family: var(--font-serif); font-size: 1.12rem; font-weight: 400; line-height: 1.35; color: var(--ink); }
.timeline-body p { max-width: 620px; margin-top: 3px; font-size: 0.72rem; line-height: 1.75; color: var(--muted); }

/* ---------- Links ---------- */
.links-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.link-card { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease); }
.link-card:hover { transform: translateY(-1px); border-color: rgba(167, 139, 250, 0.45); background: var(--panel-2); }
.link-tag { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 7px; background: rgba(167, 139, 250, 0.05); color: var(--accent); font-family: var(--font-mono); font-size: 0.4rem; letter-spacing: 0.04em; text-align: center; line-height: 1.2; padding: 3px; }
.link-main { min-width: 0; display: flex; flex-direction: column; }
.link-main b { font-size: 0.8rem; font-weight: 600; line-height: 1.4; color: var(--ink); }
.link-main small { font-family: var(--font-mono); font-size: 0.42rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.link-main p { margin-top: 2px; font-size: 0.64rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-arrow { margin-left: auto; flex-shrink: 0; color: var(--muted-2); transition: color 0.2s var(--ease), transform 0.2s var(--ease); }
.link-card:hover .link-arrow { color: var(--accent); transform: translate(2px, -2px); }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; padding: clamp(80px, 12vh, 120px) 0; border-top: 1px solid var(--line); background: radial-gradient(70% 100% at 50% 0%, rgba(124, 58, 237, 0.16), transparent 62%), var(--bg); }
.contact-inner { position: relative; z-index: 1; }
.contact-kicker { margin-bottom: 22px; }
.contact-title { max-width: 900px; font-family: var(--font-serif); font-size: clamp(2.7rem, 6.4vw, 5.4rem); font-weight: 400; line-height: 1.04; letter-spacing: -0.03em; color: var(--ink); }
.contact-title em { font-style: italic; background: linear-gradient(100deg, #ffffff 0%, #c4b5fd 48%, #60a5fa 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .contact-title em { background: linear-gradient(100deg, #09090b, #6d28d9 52%, #2563eb); -webkit-background-clip: text; background-clip: text; }
.contact-desc { max-width: 520px; margin-top: 20px; font-size: 0.86rem; line-height: 1.8; color: var(--muted); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.contact-email { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 14px; width: fit-content; max-width: 100%; margin-top: 18px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.contact-email .mono { font-size: 0.44rem; color: var(--muted-2); }
.contact-email a { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.01em; color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.contact-email a:hover { color: var(--accent); border-color: var(--accent); }
.contact-email .email-copy { margin-left: auto; padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; font-family: var(--font-mono); font-size: 0.44rem; letter-spacing: 0.05em; color: var(--muted); transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.contact-email .email-copy:hover { color: var(--accent); border-color: var(--accent); }
.contact-note { max-width: 520px; margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 0.48rem; line-height: 1.8; letter-spacing: 0.03em; color: var(--muted); }
.contact-sign { margin-top: 16px; font-size: 0.46rem; letter-spacing: 0.12em; color: var(--accent); }
.contact-watermark { position: absolute; right: -2%; bottom: -12%; z-index: 0; font-family: var(--font-serif); font-size: clamp(8rem, 24vw, 22rem); font-weight: 400; line-height: 1; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.05); white-space: nowrap; pointer-events: none; user-select: none; }
[data-theme="light"] .contact-watermark { -webkit-text-stroke-color: rgba(0, 0, 0, 0.05); }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 1; padding: 44px 0 24px; border-top: 1px solid var(--line); background: #000000; color: #f2f2f3; overflow: hidden; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; padding-bottom: 30px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.footer-brand .footer-cn { font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 400; letter-spacing: -0.02em; color: #f2f2f3; }
.footer-brand p { margin-top: 3px; font-family: var(--font-mono); font-size: 0.46rem; letter-spacing: 0.12em; color: #5c5c66; }
.footer-cols { display: flex; gap: clamp(28px, 5vw, 64px); }
.footer-cols > div { display: flex; flex-direction: column; gap: 6px; }
.footer-cols b { margin-bottom: 2px; font-family: var(--font-mono); font-size: 0.44rem; letter-spacing: 0.13em; text-transform: uppercase; color: #5c5c66; font-weight: 500; }
.footer-cols a { font-size: 0.7rem; color: #a1a1aa; transition: color 0.2s var(--ease); }
.footer-cols a:hover { color: #ffffff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding-top: 20px; font-family: var(--font-mono); font-size: 0.44rem; letter-spacing: 0.06em; color: #5c5c66; }
.footer-watermark { margin-top: 22px; font-family: var(--font-serif); font-size: clamp(4rem, 15vw, 12rem); line-height: 0.8; letter-spacing: 0.03em; text-align: center; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.06); pointer-events: none; user-select: none; }

/* ---------- Back top ---------- */
.back-top { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--panel); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--ink-soft); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s; }
.back-top svg { width: 15px; height: 15px; }
.back-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { color: var(--ink); border-color: var(--accent); }

/* ---------- Palette ---------- */
.palette { position: fixed; inset: 0; z-index: 140; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 20px 20px; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.palette-panel { position: relative; z-index: 1; width: min(680px, 94vw); border: 1px solid var(--line-strong); border-radius: 12px; background: #09090b; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.85); overflow: hidden; animation: modal-in 0.25s var(--ease); }
[data-theme="light"] .palette-panel { background: #ffffff; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }
.palette-search { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.palette-search svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.palette-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-size: 0.84rem; color: var(--ink); }
.palette-search input::placeholder { color: var(--muted-2); }
kbd { display: inline-block; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel-2); font-family: var(--font-mono); font-size: 0.46rem; line-height: 1.5; color: var(--muted); }
.palette-results { max-height: min(52vh, 420px); overflow-y: auto; padding: 6px; }
.palette-group { padding: 8px 9px 4px; font-family: var(--font-mono); font-size: 0.44rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted-2); }
.palette-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 9px; border-radius: 6px; text-align: left; transition: background 0.15s var(--ease); }
.palette-item:hover, .palette-item.is-active { background: rgba(255, 255, 255, 0.05); }
[data-theme="light"] .palette-item:hover, [data-theme="light"] .palette-item.is-active { background: var(--panel-2); }
.palette-item.is-active { box-shadow: inset 2px 0 0 var(--accent); }
.pi-icon { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 5px; background: rgba(167, 139, 250, 0.06); color: var(--accent); font-family: var(--font-mono); font-size: 0.46rem; flex-shrink: 0; }
.pi-main { display: flex; flex-direction: column; min-width: 0; }
.pi-main b { font-size: 0.72rem; font-weight: 500; color: var(--ink); }
.pi-main small { font-size: 0.56rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-key { margin-left: auto; font-family: var(--font-mono); font-size: 0.42rem; color: var(--muted-2); }
.palette-empty { padding: 28px 10px; text-align: center; font-size: 0.72rem; color: var(--muted); }
.palette-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 0.5rem; color: var(--muted); }
.palette-foot span { display: inline-flex; align-items: center; gap: 4px; }
.palette-foot i { font-style: normal; }

/* ---------- Modal / Lightbox / Toast ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; }
.modal-backdrop, .lb-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal-dialog { position: relative; z-index: 1; width: min(960px, 94vw); border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); box-shadow: 0 40px 120px rgba(0, 0, 0, 0.85); overflow: hidden; animation: modal-in 0.25s var(--ease); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; border-bottom: 1px solid var(--line); font-size: 0.7rem; color: var(--ink); }
.modal-close { width: 26px; height: 26px; border-radius: 5px; font-size: 1rem; color: var(--muted); }
.modal-close:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.modal-body { aspect-ratio: 16 / 9; background: #000; }
.modal-body iframe { width: 100%; height: 100%; border: 0; }
.modal-foot { padding: 8px 13px; border-top: 1px solid var(--line); text-align: right; font-family: var(--font-mono); font-size: 0.46rem; color: var(--muted); }
.modal-foot a { color: var(--accent); }
.lightbox { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; padding: 4vh 5vw; }
.lb-figure { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: min(1100px, 90vw); }
.lb-figure img { max-width: 100%; max-height: 78vh; border: 0; border-radius: 6px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8); animation: modal-in 0.25s var(--ease); }
.lb-figure figcaption { display: flex; align-items: baseline; gap: 12px; color: #d4d4d8; font-size: 0.72rem; }
.lb-figure figcaption small { font-family: var(--font-mono); font-size: 0.5rem; color: #71717a; }
.lb-btn, .lb-close { position: absolute; z-index: 2; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #ffffff; transition: background 0.2s var(--ease), border-color 0.2s var(--ease); }
.lb-btn:hover, .lb-close:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.35); }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 14px; top: 14px; font-size: 1.1rem; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 200; padding: 8px 14px; border-radius: 7px; background: var(--ink); color: var(--bg); font-size: 0.7rem; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); opacity: 0; visibility: hidden; transform: translate(-50%, 10px); transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s; pointer-events: none; }
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.noscript { position: fixed; left: 0; right: 0; bottom: 0; z-index: 210; padding: 10px 16px; background: #111111; color: #f2f2f3; font-size: 0.7rem; text-align: center; }
.noscript a { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .desktop-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .header-inner { gap: 14px; }
  .header-tools { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .hero-copy { max-width: none; }
  .hero-visual { justify-content: flex-start; }
  .terminal { max-width: 640px; }
  .trait-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card.is-featured { grid-column: span 2; grid-row: auto; min-height: 320px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { grid-template-columns: 1fr; gap: 12px; }
  .about-layout { grid-template-columns: 1fr; }
  .about-facts { max-width: 440px; }
  .now-layout { grid-template-columns: 1fr; }
  .now-aside { display: grid; grid-template-columns: repeat(3, 1fr); }
  .featured-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .featured-card:first-child { grid-row: auto; min-height: 380px; }
  .vocaloid-layout { grid-template-columns: 1fr; }
  .links-grid { grid-template-columns: 1fr; }
  .works-banner { grid-template-columns: 1fr auto; }
  .works-banner .btn { grid-column: span 2; justify-self: start; }
  .footer-top { flex-direction: column; }
  .gallery-grid { columns: 2; }
}

@media (max-width: 820px) {
  .header-cta { display: none; }
  .hero { padding-top: 104px; min-height: auto; }
  .hero-title { font-size: clamp(2.2rem, 7.2vw, 3rem); }
  html[lang="en"] .hero-title { font-size: clamp(2.7rem, 8vw, 3.8rem); }
  html[lang="ja"] .hero-title { font-size: clamp(1.9rem, 5.6vw, 2.6rem); }
  html[lang="zh-Hant"] .hero-title { font-size: clamp(2.1rem, 6.8vw, 2.9rem); }
  .hero-sub { font-size: 0.88rem; }
  .section { padding: 68px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 22px 16px; border-top: 1px solid var(--line); }
  .stat:nth-child(odd) { border-left: none; padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: none; }
  .now-aside { grid-template-columns: 1fr; }
  .now-item { grid-template-columns: 28px minmax(0, 1fr); }
  .now-item .state { display: none; }
  .journal-toolbar { flex-direction: column; align-items: stretch; }
  .journal-search { min-width: 0; }
  .journal-row { grid-template-columns: 26px 66px 58px minmax(0, 1fr) 16px; gap: 8px; padding: 14px 4px; }
  .journal-row .metrics { display: none; }
  .journal-row .summary { display: none; }
  .journal-row h3 { font-size: 1.02rem; }
  .project-visual { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.is-featured { grid-column: auto; min-height: 280px; }
  .video-grid { grid-template-columns: 1fr; }
  .works-banner { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
  .works-stats { width: 100%; justify-content: space-between; }
  .works-banner .btn { width: 100%; }
  .vocaloid-layout { grid-template-columns: 1fr; }
  .creator-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 14px; }
  .timeline-item { grid-template-columns: 1fr; gap: 3px; padding: 15px 0; }
  .timeline-item::before { left: -14px; top: 23px; }
  .timeline-date { padding-top: 0; }
  .gallery-grid { columns: 2; column-gap: 8px; }
  .gallery-item { margin-bottom: 8px; }
  .footer-cols { gap: 26px; flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .back-top { right: 14px; bottom: 14px; }
  .contact-title { font-size: clamp(2.4rem, 12vw, 4rem); }
  .contact-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 520px) {
  .brand-words small { display: none; }
  .tool-kbd { display: none; }
  .hero-title { font-size: 2.15rem; }
  html[lang="en"] .hero-title { font-size: 2.7rem; }
  html[lang="ja"] .hero-title { font-size: 1.8rem; }
  html[lang="zh-Hant"] .hero-title { font-size: 2.05rem; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { height: 40px; padding: 0 13px; font-size: 0.74rem; }
  .hero-actions .btn.btn-blog { flex: 1 1 100%; height: 56px; }
  .blog-label b { font-size: 0.82rem; }
  .blog-label small { font-size: 0.46rem; }
  .terminal-code { font-size: 0.62rem; }
  .terminal-code li { padding: 0 12px; }
  .terminal-code li::before { flex-basis: 20px; width: 20px; margin-right: 10px; }
  .strip-logos { gap: 12px 22px; }
  .strip-logos a { font-size: 0.72rem; }
  .stat b { font-size: 1.8rem; }
  .trait-grid { grid-template-columns: 1fr; }
  .gallery-grid { columns: 1; }
  .about-facts { padding: 14px; }
  .portrait-seal { width: 32px; height: 32px; font-size: 14px; }
  .portrait-vertical { display: none; }
  .contact-email { width: 100%; }
  .contact-email .email-copy { margin-left: 0; }
  .footer-watermark { font-size: 4rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .mobile-menu, .back-top, .palette, .modal, .lightbox, .toast, body::before, body::after { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 20px 0; }
}

/* 404 page helpers */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pulse { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.4); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.4); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Dark-section text stays readable in both themes */
.section-dark .section-head { border-bottom-color: rgba(255, 255, 255, 0.1); }
.section-dark .section-num { color: #a1a1aa; border-color: rgba(255, 255, 255, 0.15); }
.section-dark .section-kicker { color: #8a8a93; }
.section-dark .section-heading h2 { color: #f2f2f3; }
.section-dark .section-heading h2 em { color: #8a8a93; }
.section-dark .section-heading p { color: #8a8a93; }

/* The avatar card should feel like paper in light mode, not a black frame */
[data-theme="light"] .portrait-frame {
  border-color: var(--line);
  box-shadow: 0 18px 40px -24px rgba(20, 18, 24, 0.18);
}
[data-theme="light"] .portrait-shadow {
  background: radial-gradient(ellipse at center, rgba(20, 18, 24, 0.16), rgba(20, 18, 24, 0.05) 48%, transparent 72%);
}
