/* ==========================================================================
   trinhngocdieu.com — "Observer, Tokyo"
   Hand-written CSS. No framework, no build step.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg: #edf1f5;          /* chart fog */
  --bg-2: #ffffff;        /* card surface */
  --bg-3: #e2e8ef;
  --ink: #0e1b2e;         /* navy ink */
  --ink-2: #33415a;
  --mute: #66768c;
  --line: rgba(14, 27, 46, .14);
  --line-2: rgba(14, 27, 46, .07);
  --accent: #e4551b;      /* Chūō-line orange */
  --accent-ink: #ffffff;
  --trail: 14, 27, 46;    /* wind trail rgb */
  --trail-accent: 228, 85, 27;
  --trail-alpha: .5;
  --shadow: 0 1px 2px rgba(14, 27, 46, .06), 0 18px 40px -18px rgba(14, 27, 46, .32);
  --nav-bg: rgba(237, 241, 245, .72);

  --font-display: "Bricolage Grotesque", "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --font-body: "Bricolage Grotesque", "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-jp: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;

  --gutter: clamp(20px, 5vw, 64px);
  --ruler: 0px;
  --nav-h: 64px;
  --max: 1280px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0a1424;          /* blue hour */
  --bg-2: #111d33;
  --bg-3: #172642;
  --ink: #e6edf5;
  --ink-2: #b9c6d8;
  --mute: #8194ad;
  --line: rgba(230, 237, 245, .16);
  --line-2: rgba(230, 237, 245, .07);
  --accent: #ff7a33;
  --accent-ink: #0a1424;
  --trail: 214, 228, 245;
  --trail-accent: 255, 122, 51;
  --trail-alpha: .46;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 20px 48px -18px rgba(0, 0, 0, .7);
  --nav-bg: rgba(10, 20, 36, .72);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--accent-ink); }

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

a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--accent); }

img { max-width: 100%; height: auto; }

button { font: inherit; color: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; top: 8px; left: 8px; z-index: 50;
  padding: 10px 14px; background: var(--ink); color: var(--bg);
  border-radius: 8px; font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- wind canvas ---------- */
#wind {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: var(--wind-opacity, 1);
  transition: opacity .8s var(--ease);
}
/* the Tokyo sky: a soft glow that follows the sun's position and colour through the day */
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: var(--sun-a, 0); transition: opacity 2s;
  background: radial-gradient(75vmax 60vmax at var(--sun-x, 80%) var(--sun-y, 20%), var(--sun-color, rgb(255, 214, 150)) 0%, transparent 62%);
}
html[data-field="off"] #wind { opacity: 0; }

/* ---------- graticule (rulers) ---------- */
.ruler { display: none; }

@media (min-width: 960px) and (hover: hover) and (pointer: fine) {
  :root { --ruler: 24px; }

  .ruler {
    display: block; position: fixed; z-index: 6; pointer-events: none;
    color: var(--mute); font: 500 10px/1 var(--font-mono); letter-spacing: .02em;
    background-color: var(--bg);
  }
  .ruler-x {
    top: 0; left: var(--ruler); right: 0; height: var(--ruler);
    border-bottom: 1px solid var(--line);
    background-image:
      linear-gradient(to right, var(--line) 0 1px, transparent 1px),
      linear-gradient(to right, var(--line) 0 1px, transparent 1px),
      linear-gradient(to right, var(--line) 0 1px, transparent 1px);
    background-size: 100px 14px, 50px 9px, 10px 5px;
    background-position: 0 100%, 0 100%, 0 100%;
    background-repeat: repeat-x;
  }
  .ruler-y {
    top: var(--ruler); left: 0; bottom: 0; width: var(--ruler);
    border-right: 1px solid var(--line);
    background-image:
      linear-gradient(to bottom, var(--line) 0 1px, transparent 1px),
      linear-gradient(to bottom, var(--line) 0 1px, transparent 1px),
      linear-gradient(to bottom, var(--line) 0 1px, transparent 1px);
    background-size: 14px 100px, 9px 50px, 5px 10px;
    background-position: 100% 0, 100% 0, 100% 0;
    background-repeat: repeat-y;
  }
  .ruler-corner {
    top: 0; left: 0; width: var(--ruler); height: var(--ruler);
    border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
    display: grid; place-items: center;
  }
  .ruler-corner::before { content: "+"; color: var(--accent); font-size: 12px; }

  .ruler span { position: absolute; }
  .ruler-x span { top: 4px; transform: translateX(3px); }
  .ruler-y span { left: 4px; transform: rotate(-90deg) translateX(-100%) translateY(-1px); transform-origin: 0 0; }

  .ruler .marker { position: absolute; background: var(--accent); }
  .ruler-x .marker { top: 0; bottom: 0; width: 1px; left: 0; transform: translateX(var(--mx, -40px)); }
  .ruler-y .marker { left: 0; right: 0; height: 1px; top: 0; transform: translateY(var(--my, -40px)); }

  .cursor-readout {
    position: fixed; right: 14px; bottom: 12px; z-index: 6; pointer-events: none;
    font: 500 11px/1 var(--font-mono); letter-spacing: .04em; color: var(--mute);
    padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px;
    background: var(--nav-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    opacity: 0; transition: opacity .4s;
  }
  .cursor-readout.on { opacity: 1; }
}
@media not ((min-width: 960px) and (hover: hover) and (pointer: fine)) {
  .cursor-readout { display: none; }
}

/* ---------- layout ---------- */
.site {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  min-height: 100svh;
  padding-top: var(--ruler); padding-left: var(--ruler);
}
main { flex: 1; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: var(--ruler); z-index: 5;
  background: var(--nav-bg);
  backdrop-filter: blur(10px) saturate(1.2); -webkit-backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--line-2);
}
.nav-in {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--nav-h);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  view-transition-name: brand;
}
.brand:hover .seal { transform: rotate(0deg) scale(1.06); }

.nav-links { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative; display: inline-block; padding: 6px 0;
  font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color .25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links kbd { display: none; }

.nav-tools { display: flex; align-items: center; gap: 10px; }

/* ---------- language chooser ---------- */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 13px 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
  font: 500 12px/1 var(--font-mono); letter-spacing: .06em;
  transition: border-color .25s, background .25s, transform .25s var(--ease);
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--mute); background: var(--bg-2); transform: translateY(-1px); }
.lang-btn svg { width: 16px; height: 16px; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30;
  width: min(264px, calc(100vw - 32px)); padding: 8px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); box-shadow: var(--shadow);
  transform-origin: top right; opacity: 0; transform: translateY(-6px) scale(.96);
  transition: opacity .22s var(--ease), transform .28s var(--ease-out);
}
.lang-menu.open { opacity: 1; transform: none; }
.lang-menu[hidden] { display: none; }
.lang-menu-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0; padding: 10px 12px 12px; border-bottom: 1px dashed var(--line); }
.lang-greet { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; color: var(--ink); }
.lang-menu-label { font: 500 10px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.lang-item {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px;
  padding: 8px 10px; margin-top: 4px; border-radius: 10px; text-decoration: none; color: var(--ink);
  transition: background .2s;
}
.lang-item:first-of-type { margin-top: 8px; }
.lang-item:hover, .lang-item:focus-visible { background: var(--bg-3); }
.lang-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line);
  font: 600 11px/1 var(--font-mono); letter-spacing: .04em; color: var(--ink-2); transform: rotate(-3deg);
  transition: transform .3s var(--ease), background .2s, color .2s, border-color .2s;
}
.lang-item:hover .lang-mark { transform: rotate(0deg) scale(1.06); }
.lang-item[aria-checked="true"] .lang-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: inset 0 0 0 2px var(--bg-2), inset 0 0 0 3px rgba(255, 255, 255, .45); }
.lang-name { font-weight: 500; font-size: 14.5px; }
.lang-sub { font: 400 11px/1 var(--font-mono); color: var(--mute); letter-spacing: .02em; }
.lang-menu.open .lang-item { animation: rise-in .4s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* CJK typography */
html[lang="ja"] body, html[lang="ko"] body, html[lang="zh-Hant"] body, html[lang="zh-Hans"] body { line-height: 1.75; }
html[lang="ja"] .section-head h2, html[lang="ko"] .section-head h2, html[lang="zh-Hant"] .section-head h2, html[lang="zh-Hans"] .section-head h2,
html[lang="ja"] .page-title, html[lang="ko"] .page-title, html[lang="zh-Hant"] .page-title, html[lang="zh-Hans"] .page-title,
html[lang="ja"] .note h3, html[lang="ko"] .note h3, html[lang="zh-Hant"] .note h3, html[lang="zh-Hans"] .note h3 { letter-spacing: 0; }
html[lang="ko"] { word-break: keep-all; }
html[lang="ja"] .lede, html[lang="zh-Hant"] .lede, html[lang="zh-Hans"] .lede, html[lang="ko"] .lede { line-height: 1.7; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: background .25s, transform .25s var(--ease), border-color .25s;
}
.icon-btn:hover { background: var(--bg-2); border-color: var(--mute); transform: translateY(-1px); }
.icon-btn svg { width: 16px; height: 16px; }
.theme-btn .moon, html[data-theme="dark"] .theme-btn .sun { display: none; }
html[data-theme="dark"] .theme-btn .moon { display: block; }

@media (max-width: 760px) {
  .lang-btn { height: 34px; }
  .nav { position: relative; top: auto; }
  .nav-in { flex-wrap: wrap; padding-block: 12px; gap: 10px 16px; }
  .brand { order: 1; }
  .nav-tools { order: 2; margin-left: auto; }
  .nav-in > nav { order: 3; width: 100%; }
  .nav-links { width: 100%; overflow-x: auto; scrollbar-width: none; gap: 18px; padding-bottom: 2px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; font-size: 13px; }
}

/* ---------- seal (hanko) ---------- */
.seal {
  --s: 28px;
  position: relative; display: inline-block;
  width: var(--s); height: var(--s); flex: 0 0 auto;
  transform: rotate(-4deg);
  transition: transform .4s var(--ease);
}
.seal-face {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  width: 100%; height: 100%;
  background: var(--accent); color: var(--accent-ink);
  border-radius: calc(var(--s) * .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), inset 0 0 0 calc(var(--s) * .07) var(--accent), inset 0 0 0 calc(var(--s) * .07 + 1px) rgba(255, 255, 255, .45);
  font-family: var(--font-jp); font-weight: 700; font-size: calc(var(--s) * .40); line-height: 1;
  filter: url(#ink);
}
.seal-face span { display: grid; place-items: center; }
.seal-face span:nth-child(1) { grid-area: 1 / 2; }  /* 鄭 top-right */
.seal-face span:nth-child(2) { grid-area: 2 / 2; }  /* 玉 bottom-right */
.seal-face span:nth-child(3) { grid-area: 1 / 1; }  /* 妙 top-left */
.seal-face span:nth-child(4) { grid-area: 2 / 1; }  /* 印 bottom-left */

.seal.stamp { opacity: 0; animation: stamp .55s var(--ease-out) forwards; animation-delay: var(--delay, 1s); }
@keyframes stamp {
  0%   { opacity: 0; transform: scale(1.6) rotate(-14deg); filter: blur(2px); }
  55%  { opacity: 1; transform: scale(.94) rotate(-3deg); filter: blur(0); }
  100% { opacity: 1; transform: scale(1) rotate(-4deg); }
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  grid-template-areas: "readout readout" "text rose" "beaufort beaufort";
  align-items: center; column-gap: clamp(24px, 5vw, 80px); row-gap: 32px;
  min-height: calc(100svh - var(--nav-h) - var(--ruler));
  padding-block: clamp(32px, 5vh, 56px) clamp(32px, 5vh, 48px);
}
.hero-readout { grid-area: readout; align-self: start; }
.hero-text { grid-area: text; position: relative; }
.hero-text::before {
  content: ""; position: absolute; inset: -10% -14%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 40% 50%, color-mix(in srgb, var(--bg) 78%, transparent) 30%, transparent 72%);
}
.hero-rose { grid-area: rose; justify-self: center; }
.hero-beaufort { grid-area: beaufort; align-self: end; }

.readout {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font: 500 12px/1.5 var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--mute);
}
.readout b { font-weight: 500; color: var(--ink); }
.readout .live { display: inline-flex; align-items: center; gap: 8px; }
.readout .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(228, 85, 27, .5); animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(228, 85, 27, .55); } 100% { box-shadow: 0 0 0 10px rgba(228, 85, 27, 0); } }

.eyebrow {
  margin: 0 0 18px;
  font: 500 13px/1.4 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute);
}
.eyebrow .greet { display: inline-block; min-width: 9ch; color: var(--ink); transition: opacity .4s, transform .4s var(--ease); }
.eyebrow .greet.out { opacity: 0; transform: translateY(-4px); }

.name {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.4rem, 10.5vw, 9.4rem);
  line-height: .92;
  letter-spacing: -.035em;
  font-variation-settings: "opsz" 96, "wdth" 100;
  text-wrap: balance;
}
.name .w { display: inline-block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; vertical-align: top; }
.name .wi { display: inline-block; }
.name .l {
  display: inline-block;
  font-variation-settings: "opsz" 96, "wdth" var(--wd, 100);
  transform: translateY(var(--ty, 0px));
}
.js .name .wi { transform: translateY(105%); animation: rise 1s var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * .09s + .15s); }
@keyframes rise { to { transform: translateY(0); } }

.lede {
  margin: 0 0 32px; max-width: 32em;
  font-size: clamp(1.08rem, 1.5vw, 1.28rem); line-height: 1.5; color: var(--ink-2);
  text-wrap: pretty;
}
.lede strong { color: var(--ink); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 20px; border-radius: 999px;
  font-weight: 500; font-size: 15px; text-decoration: none; line-height: 1;
  border: 1px solid var(--line); color: var(--ink); background: transparent;
  transition: transform .3s var(--ease), background .3s, border-color .3s, color .3s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); border-color: var(--mute); }
.btn .arrow { display: inline-block; transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Beaufort line */
.beaufort {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  margin: 0; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--ink-2);
}
.beaufort .bf-n {
  font: 600 12px/1 var(--font-mono); letter-spacing: .06em;
  padding: 6px 8px; border-radius: 6px; background: var(--accent); color: var(--accent-ink);
}
.beaufort .bf-name { font-weight: 600; color: var(--ink); }
.beaufort .bf-note { font: 500 12px/1.6 var(--font-mono); letter-spacing: .04em; color: var(--mute); text-transform: uppercase; margin-left: auto; }

/* ---------- compass rose portrait ---------- */
.rose {
  --deg: 225deg;
  position: relative; width: min(360px, 72vw); aspect-ratio: 1; margin: 0;
}
.rose .ring { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--mute); overflow: visible; }
.rose .ring text { font-family: var(--font-mono); font-size: 11px; font-weight: 500; fill: currentColor; letter-spacing: .05em; }
.rose .ring .cardinal { fill: var(--ink); }
.rose .photo {
  position: absolute; inset: 14%; border-radius: 50%; overflow: hidden;
  box-shadow: var(--shadow); background: var(--bg-3);
  transform: translate(var(--px, 0), var(--py, 0));
  transition: transform .5s var(--ease);
}
.rose .photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rose .needle {
  position: absolute; inset: 0; pointer-events: none;
  transform: rotate(var(--deg));
  transition: transform 1.6s var(--ease);
}
.rose .needle .knob {
  position: absolute; left: 50%; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  pointer-events: auto; touch-action: none; cursor: grab;
}
.rose .needle .knob::after {
  content: ""; position: absolute; inset: 7px; background: var(--accent); border-radius: 2px;
  transform: rotate(45deg); box-shadow: 0 0 0 3px var(--bg); transition: transform .3s var(--ease);
}
.rose .needle .knob:hover::after, .rose.dragging .knob::after { transform: rotate(45deg) scale(1.3); }
.rose.dragging, .rose.dragging .knob { cursor: grabbing; }
.rose.dragging .needle { transition: none; }
.rose .tag .manual { display: none; color: var(--accent); }
.rose.manual .tag .manual { display: inline; }
@media (hover: hover) and (pointer: fine) { .rose { cursor: grab; } }
/* the ring draws itself on arrival */
.js .rose .ring circle:first-of-type { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 1.8s var(--ease-out) forwards .15s; }
.js .rose .ring line { opacity: 0; animation: tick .5s var(--ease) forwards; animation-delay: calc(.4s + var(--i, 0) * 9ms); }
.js .rose .ring text, .js .rose .ring circle:nth-of-type(n+2) { opacity: 0; animation: tick .8s var(--ease) forwards 1.1s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes tick { to { opacity: 1; } }
.rose .needle::after {
  content: ""; position: absolute; left: calc(50% - .5px); top: 3.5%; width: 1px; height: 9.5%;
  background: var(--accent);
}
.rose .seal { --s: 64px; position: absolute; right: 6%; bottom: 7%; z-index: 2; pointer-events: none; }
.rose .tag {
  position: absolute; left: 50%; bottom: -36px; transform: translateX(-50%); white-space: nowrap;
  font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute);
}
.rose .tag b { color: var(--ink); font-weight: 500; }

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "readout" "rose" "text" "beaufort";
    row-gap: 40px; min-height: 0; padding-top: 28px;
  }
  .hero-rose { justify-self: start; }
  .rose { width: min(250px, 64vw); margin-bottom: 44px; }
  .rose .seal { --s: 48px; }
  .rose .tag { left: 0; transform: none; }
  .beaufort .bf-note { margin-left: 0; width: 100%; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 9vw, 120px); }
.section + .section { padding-top: 0; }
.page-head + .section { padding-top: clamp(8px, 2vw, 24px); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 44px); padding-top: 22px; border-top: 1px solid var(--line);
}
.section-head h2, .page-title {
  margin: 0;
  font-family: var(--font-display); font-weight: 500; letter-spacing: -.025em; line-height: 1;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-variation-settings: "opsz" 96;
}
.section-head .meta, .meta {
  font: 500 12px/1.6 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute);
}
.meta a { text-decoration-color: var(--line); }

/* page head (subpages) */
.page-head { padding-block: clamp(40px, 7vw, 88px) clamp(28px, 4vw, 48px); max-width: 60ch; }
.page-head .meta { margin: 0 0 18px; }
.page-title { font-size: clamp(2.6rem, 7vw, 5.2rem); letter-spacing: -.035em; margin-bottom: 20px; }
.page-title .jp { font-family: var(--font-jp); font-weight: 700; font-size: .55em; color: var(--accent); vertical-align: .12em; margin-left: .25em; letter-spacing: .04em; }
.page-lede { margin: 0; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-2); line-height: 1.55; text-wrap: pretty; }
.page-lede a { text-decoration-color: var(--accent); }

/* ---------- notes (hobbies) ---------- */
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.note {
  position: relative; padding: 26px 26px 24px; border-radius: 18px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 66%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
}
.note:hover { transform: translateY(-3px); border-color: var(--mute); box-shadow: var(--shadow); }
.note .ico { display: block; width: 72px; height: 48px; margin-bottom: 20px; color: var(--ink); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.note h3 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; }
.note p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.note .label { position: absolute; top: 22px; right: 22px; font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

.wheel { transform-box: fill-box; transform-origin: center; }
.note:hover .wheel { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.steam path { opacity: .55; animation: steam 3.2s ease-in-out infinite; }
.steam path:nth-child(2) { animation-delay: -1s; }
.steam path:nth-child(3) { animation-delay: -2s; }
@keyframes steam { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: .7; } 100% { transform: translateY(-6px); opacity: 0; } }

.note .greet-big { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--ink); display: inline-block; min-width: 8ch; transition: opacity .4s, transform .4s var(--ease); }
.note .greet-big.out { opacity: 0; transform: translateY(-4px); }

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

/* ---------- now in Tokyo ---------- */
.sunarc { display: block; width: 100%; max-width: 300px; height: auto; color: var(--mute); }
.sunarc .arc { fill: none; stroke: currentColor; stroke-width: 1; stroke-dasharray: 3 4; }
.sunarc .horizon { stroke: var(--line); stroke-width: 1; }
.sunarc .sun circle { fill: var(--accent); }
.sunarc .sun .glow { opacity: .2; }
.sunarc.night .sun circle { fill: var(--mute); }
.sunarc.night .sun .glow { opacity: .1; }
.sunarc text { font-family: var(--font-mono); font-size: 10px; font-weight: 500; fill: currentColor; letter-spacing: .06em; }
.now {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px) auto; gap: 24px 32px; align-items: center;
  padding: 26px 28px; border-radius: 18px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 66%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.now p { margin: 0; font-size: 1.05rem; color: var(--ink-2); }
.now p b { color: var(--ink); font-weight: 600; }
.now .meta { margin-top: 8px; font-size: 12px; }
@media (max-width: 640px) { .now { grid-template-columns: 1fr; } }

/* ---------- project cards ---------- */
.deck { display: flex; justify-content: center; gap: clamp(16px, 3vw, 32px); padding: 16px 0 24px; }
.card {
  --r: 0deg; --y: 0px;
  position: relative; width: 272px; aspect-ratio: 5 / 7; flex: 0 0 auto;
  display: flex; flex-direction: column;
  padding: 20px; border-radius: 16px;
  background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
  transform: rotate(var(--r)) translateY(var(--y));
  transition: transform .55s var(--ease), box-shadow .55s var(--ease), border-color .3s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
  opacity: 0; transition: opacity .5s;
}
.card:hover::before { opacity: 1; }
.deck .card:nth-child(1) { --r: -3deg; --y: 10px; }
.deck .card:nth-child(3) { --r: 3deg; --y: 10px; }
.card:hover { transform: rotate(0deg) translateY(-14px) scale(1.02); border-color: var(--mute); z-index: 2; }
.card .top { display: flex; justify-content: space-between; align-items: center; font: 500 12px/1 var(--font-mono); letter-spacing: .05em; color: var(--mute); }
.card .top .arrow { color: var(--ink); font-size: 16px; transition: transform .4s var(--ease); }
.card:hover .top .arrow { transform: translate(3px, -3px); }
.card .glyph {
  flex: 1; display: grid; place-items: center;
  font-family: var(--font-jp); font-weight: 700; font-size: 104px; line-height: 1; color: var(--accent);
  transition: transform .6s var(--ease);
}
.card:hover .glyph { transform: scale(1.06) rotate(-2deg); }
.card .title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.015em; line-height: 1.15; }
.card .sub { margin: 6px 0 0; color: var(--mute); font-size: 14.5px; }
.card .cut { position: absolute; left: 20px; right: 20px; bottom: 96px; border-top: 1px dashed var(--line); }

@media (max-width: 900px) {
  .deck { flex-direction: column; align-items: stretch; }
  .card { width: 100%; aspect-ratio: auto; min-height: 200px; --r: 0deg !important; --y: 0px !important; }
  .card .glyph { font-size: 72px; padding: 24px 0; }
  .card .cut { display: none; }
}

/* ---------- embeds ---------- */
.embed {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 14px; overflow: hidden; color-scheme: light;
}
.embed iframe { display: block; width: 100%; border: 0; }
/* hand-picked X posts */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; align-items: start; }
.posts:empty { display: none; }
.posts .twitter-tweet { margin: 0 !important; }
.posts blockquote.twitter-tweet { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.follow {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  margin-top: 24px; padding: 24px 28px; border-radius: 18px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 66%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.follow-h { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.follow-p { margin: 6px 0 0; color: var(--ink-2); max-width: 56ch; font-size: 15px; }
.embed-note { margin: 16px 0 0; font: 500 12px/1.6 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.embed-note a { text-decoration-color: var(--line); }

/* ---------- bookshelves (Goodreads grid widget output) ---------- */
.shelf { margin-bottom: 44px; }
.shelf > h2 { margin: 0 0 16px; }
.shelf[hidden] { display: none; }
#main .gr > h2, #main .gr .gr_grid_branding { display: none; }
#main .gr .gr_grid_container { display: flex; flex-wrap: wrap; gap: 16px; }
#main .gr .gr_grid_book_container { width: 98px; float: none; margin: 0; padding: 0; }
#main .gr .gr_grid_book_container a { display: block; border-radius: 6px; overflow: hidden; background: var(--bg-3); box-shadow: var(--shadow); transition: transform .4s var(--ease); }
#main .gr .gr_grid_book_container a:hover { transform: translateY(-5px) rotate(-1.5deg); }
#main .gr .gr_grid_book_container img { display: block; width: 100%; height: auto; min-height: 140px; object-fit: cover; }
@media (max-width: 520px) { #main .gr .gr_grid_book_container { width: calc(33.333% - 11px); } }

/* ---------- transfer slip ---------- */
.slip {
  position: relative; max-width: 600px; padding: 28px 28px 22px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  font-family: var(--font-mono);
}
.slip::before, .slip::after {
  content: ""; position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line); transform: translateY(-50%);
}
.slip::before { left: -12px; } .slip::after { right: -12px; }
.slip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.slip-head .jp { font-family: var(--font-jp); font-weight: 700; font-size: 18px; color: var(--accent); letter-spacing: .1em; white-space: nowrap; }
.row {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center;
  padding: 16px 0; border-top: 1px dashed var(--line);
}
.row .k { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.row .v { font-size: 17px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.copy {
  height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: 500 12px/1 var(--font-mono); letter-spacing: .04em;
  transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.copy:hover { border-color: var(--mute); transform: translateY(-1px); }
.copy[data-done] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.slip-foot { margin-top: 12px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr auto; } .row .k { grid-column: 1 / -1; } }

/* ---------- postcard ---------- */
.postcard-wrap { max-width: 860px; padding: 8px 0 16px; }
.postcard {
  position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px;
  padding: 26px 28px 24px; aspect-ratio: 1.6;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
  transform: rotate(-1deg);
  transition: transform .6s var(--ease);
}
.postcard:hover { transform: rotate(0deg); }
.postcard-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font: 500 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.postcard-head .jp { font-family: var(--font-jp); font-weight: 700; font-size: 15px; letter-spacing: .12em; color: var(--ink-2); }
.postcard .msg { border-right: 1px solid var(--line); padding-right: 28px; font-family: var(--font-display); font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.5; color: var(--ink-2); display: flex; flex-direction: column; justify-content: center; }
.postcard .msg p { margin: 0 0 .8em; text-wrap: pretty; }
.postcard .msg p:last-child { margin-bottom: 0; }
.postcard .addr { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-width: 0; }
.postcard .stamp { position: relative; align-self: flex-end; width: 92px; height: 92px; }
.postcard .stamp .seal { --s: 72px; position: absolute; right: 0; top: 0; }
.postcard .postmark { position: absolute; left: -46px; top: 16px; width: 92px; height: 92px; color: var(--ink-2); opacity: .8; transform: rotate(-14deg); z-index: 3; mix-blend-mode: multiply; }
html[data-theme="dark"] .postcard .postmark { mix-blend-mode: screen; color: var(--ink); opacity: .6; }
.postcard .postmark text { font-family: var(--font-mono); font-size: 9px; letter-spacing: .12em; fill: currentColor; }
.postcard .lines { display: flex; flex-direction: column; gap: 4px; }
.postcard .line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0 6px; border-bottom: 1px solid var(--line); font: 500 13px/1.3 var(--font-mono); min-width: 0; }
.postcard .line .k { color: var(--mute); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; flex: 0 0 auto; }
.postcard .line a { text-decoration: none; overflow-wrap: anywhere; }
.postcard .line a:hover { color: var(--accent); }
@media (max-width: 720px) {
  .postcard { grid-template-columns: 1fr; aspect-ratio: auto; transform: none; }
  .postcard .msg { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
  .postcard .stamp { align-self: flex-start; margin-left: 42px; }
}

.socials { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.socials a {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: border-color .25s, color .25s, transform .25s var(--ease), background .25s;
}
.socials a:hover { color: var(--ink); border-color: var(--mute); transform: translateY(-1px); background: var(--bg-2); }
.socials svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- weather-vane cursor companion ---------- */
.vane { position: fixed; left: 0; top: 0; z-index: 7; width: 18px; height: 18px; margin: -9px 0 0 -9px; pointer-events: none; opacity: 0; transition: opacity .4s; will-change: transform; }
.vane.on { opacity: .9; }
.vane svg { display: block; width: 100%; height: 100%; overflow: visible; }
.vane .tail { stroke: var(--mute); stroke-width: 1.6; fill: none; stroke-linecap: round; }
.vane .head { fill: var(--accent); }
@media (hover: none) { .vane { display: none; } }

/* ---------- 404 ---------- */
.lost { min-height: calc(100svh - var(--nav-h) - var(--ruler) - 160px); display: grid; align-content: center; padding-block: 48px; }
.lost .big { font-family: var(--font-display); font-weight: 500; font-size: clamp(5rem, 22vw, 16rem); line-height: .9; letter-spacing: -.05em; margin: 0 0 20px; font-variation-settings: "opsz" 96; }
.lost .big .jp { font-family: var(--font-jp); font-size: .28em; color: var(--accent); vertical-align: .45em; margin-left: .2em; letter-spacing: .06em; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 36px 44px; font-size: 14px; color: var(--mute); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 28px 40px; align-items: start; }
.footer .who { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 15px; margin: 0 0 6px; }
.footer p { margin: 0; }
.footer .meta { margin-top: 10px; }
.footer .list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer .list a { text-decoration: none; color: var(--ink-2); }
.footer .list a:hover { color: var(--accent); }
.footer .tools { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.footer .tools .hint { font: 500 11px/1.6 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
.footer .tools kbd { font: inherit; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; }
.footer .hint { display: none; }
@media (hover: hover) and (pointer: fine) { .footer .hint { display: block; } }
.footer .bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line-2); font: 500 11px/1.6 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; }
.footer .bottom a { text-decoration: none; }
.footer .bottom a:hover { color: var(--accent); }
.toggle { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font: 500 12px/1 var(--font-mono); letter-spacing: .04em; color: var(--ink-2); transition: border-color .25s, color .25s; }
.toggle:hover { border-color: var(--mute); color: var(--ink); }
.toggle i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transition: background .3s; }
.toggle[aria-pressed="false"] i { background: var(--line); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 40; transform: translate(-50%, 12px);
  padding: 10px 14px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font: 500 12px/1 var(--font-mono); letter-spacing: .04em; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- view transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .name .wi { transform: none; animation: none; }
  .seal.stamp { opacity: 1; animation: none; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  #wind, .sky, .vane, .ruler, .cursor-readout, .nav-tools, .footer .tools { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .site { padding: 0; }
}
