@font-face {
  font-family: 'PP Mori';
  src: url('fonts/PPMori-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PP Mori';
  src: url('fonts/PPMori-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'PP Mori';
  src: url('fonts/PPMori-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Respira';
  src: url('fonts/RespiraBlack.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #0B0B0C;
  --ink: #EDECEA;
  --muted: #C9C7C3;
  --slate: #9A9894;
  --accent: #E4674B;
  --rule: rgba(237, 236, 234, 0.10);
  --panel: #151517;

  --display: 'Respira', Georgia, serif;
  --body: 'PP Mori', system-ui, sans-serif;

  --spin: 9s;
  --gutter: clamp(20px, 5vw, 56px);
  --section-gap: clamp(64px, 9vw, 120px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; }

a { color: var(--ink); }
a:hover { color: var(--accent); }

::selection { background: #26262A; color: #F5F4F2; }

#top, #about, #career, #nowplaying, #elsewhere { scroll-margin-top: 92px; }

/* ---------- header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 11, 12, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  animation: fade 800ms cubic-bezier(.2, .7, .2, 1) both;
}

header .bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px var(--gutter) 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  justify-content: space-between;
  align-items: center;
}

#ticker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--slate);
  cursor: pointer;
  user-select: none;
}

#ticker .place { display: inline-flex; gap: 6px; align-items: baseline; }
#ticker .mark {
  letter-spacing: 0.07em;
  color: var(--slate);
}
#ticker span { white-space: pre; }
#ticker .num { font-variant-numeric: tabular-nums; }
#oc-time, #tokyo-time { color: var(--muted); }
.wx-short { display: none; }

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12.5px;
}

header nav a {
  color: var(--slate);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 5px;
  transition: color 120ms, background 120ms;
}

header nav a:hover {
  color: var(--ink);
  background: rgba(237, 236, 234, 0.08);
}

/* ---------- layout ---------- */

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

#top { padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); }

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 48px);
  justify-content: space-between;
  align-items: flex-end;
}

#mast-left { flex: 1 1 420px; min-width: 260px; max-width: 34ch; }

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 8.4vw, 86px);
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0 0 22px;
  white-space: nowrap;
  animation: rise 800ms cubic-bezier(.2, .7, .2, 1) 80ms both;
}

#tagline {
  font-size: clamp(17px, 2.2vw, 23px);
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: var(--muted);
  max-width: 44ch;
  margin: 0;
  text-wrap: pretty;
  animation: rise 800ms cubic-bezier(.2, .7, .2, 1) 200ms both;
}

#kata {
  flex: 0 1 300px;
  min-width: 200px;
  text-align: right;
  animation: rise 800ms cubic-bezier(.2, .7, .2, 1) 320ms both;
}

#kata > div {
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.3;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* two-column sections: label rail + body */
#about, #career, #nowplaying {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 56px);
  padding-bottom: var(--section-gap);
}

.col-label { flex: 0 1 170px; min-width: 140px; }
.col-body { flex: 1 1 500px; min-width: 280px; }

#about .col-body, #nowplaying .col-body {
  border-top: 1px solid var(--rule);
  padding-top: 26px;
}

.label {
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--muted);
}

.note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--slate);
  margin: 10px 0 0;
  max-width: 22ch;
}

.prose {
  font-size: clamp(15px, 1.5vw, 16.5px);
  line-height: 1.72;
  color: var(--muted);
  max-width: 66ch;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.prose p { margin: 0; text-wrap: pretty; }
.ink { color: var(--ink); }
.accent { color: var(--accent); }

#dropcap {
  float: left;
  font-family: var(--display);
  font-size: 3.4em;
  line-height: 0.78;
  padding: 0.06em 0.14em 0 0;
  color: var(--ink);
}

/* ---------- figures ---------- */

figure { margin: 0; }

.frame {
  background: var(--panel);
  border: 1px solid var(--rule);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 420ms cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}

.frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

figure:hover .frame { transform: translateY(-6px) scale(1.008); }
figure[data-nozoom] .frame { cursor: default; }
figure[data-nozoom]:hover .frame { transform: none; }
@media (hover: none) { figure:hover .frame { transform: none; } }

figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: 12px;
  line-height: 1.45;
  color: var(--slate);
  margin-top: 10px;
  transition: color 320ms ease;
}

figure:hover figcaption { color: var(--muted); }

.hero { margin-bottom: var(--section-gap); animation: rise 800ms cubic-bezier(.2, .7, .2, 1) 480ms both; }

#pair {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2.5vw, 28px);
  padding-bottom: var(--section-gap);
  align-items: flex-start;
}

#pair figure { flex: 1 1 300px; }
#pair .offset { padding-top: clamp(0px, 6vw, 64px); }

/* ---------- career ---------- */

.jobs {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.jobs li {
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 74px;
  gap: 4px 20px;
  align-items: baseline;
  padding: 16px 0;
}

.company {
  font-family: var(--display);
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: 0.005em;
}

.role { font-size: 13px; line-height: 1.45; color: var(--muted); }

.years {
  font-size: 12px;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* ---------- now playing ---------- */

.np {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 32px);
  align-items: flex-start;
}

/* 206 = 160 sleeve + the 46px slot the record slides into.
   Shrinking this makes the record cover the track text. */
#deck {
  position: relative;
  width: 206px;
  height: 160px;
  flex: 0 0 auto;
  cursor: pointer;
}

#vinyl {
  position: absolute;
  top: 0;
  left: 46px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  background: #0F0F10;
  animation: spin var(--spin) linear infinite;
}

#vinyl img, #sleeve img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

#sleeve {
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 160px;
  background: var(--panel);
  border: 1px solid var(--rule);
  transition: transform 420ms cubic-bezier(.2, .7, .2, 1);
}

#deck:hover #sleeve { transform: translateX(-46px); }
#deck.pulled #sleeve,
#deck.pulled:hover #sleeve { transform: translateX(-100%) rotate(-3deg); }

.track {
  flex: 1 1 200px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 2px;
}

.track-artist {
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.2;
  letter-spacing: 0.005em;
}

.track-title { font-size: 13px; line-height: 1.5; color: var(--muted); }
.track-meta { font-size: 12px; line-height: 1.5; color: var(--slate); }

/* ---------- footer ---------- */

#elsewhere {
  border-top: 1px solid var(--rule);
  padding: clamp(26px, 4vw, 40px) 0 clamp(44px, 6vw, 72px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 56px);
  justify-content: space-between;
  align-items: flex-start;
}

.links { flex: 1 1 300px; }
.links .label { margin-bottom: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid rgba(237, 236, 234, 0.16);
  border-radius: 6px;
  transition: border-color 120ms, color 120ms;
}

.pill:hover { border-color: var(--accent); color: var(--accent); }

.colophon {
  flex: 0 1 240px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--slate);
}

.colophon p { margin: 0; }
.colophon p + p { margin-top: 12px; }

/* ---------- lightbox ---------- */

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(11, 11, 12, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 64px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
  cursor: zoom-out;
}

#lightbox.open { opacity: 1; pointer-events: auto; }

#lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  transform: scale(0.98);
  transition: transform 300ms cubic-bezier(.2, .7, .2, 1);
}

#lightbox.open #lightbox-img { transform: scale(1); }

#lightbox-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(16px, 3vw, 32px);
  text-align: center;
  font-size: 12px;
  color: var(--slate);
}

/* ---------- motion ---------- */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 760ms cubic-bezier(.2, .7, .2, 1), transform 760ms cubic-bezier(.2, .7, .2, 1);
}

[data-reveal].in { opacity: 1; transform: none; }

[data-para] > img { will-change: transform; }

/* custom cursor — pointer devices only */
@media (hover: hover) and (pointer: fine) {
  html.cursorized, html.cursorized * { cursor: none !important; }

  #cur {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    pointer-events: none;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    opacity: 0;
    will-change: transform;
  }

  #face {
    transition: transform 150ms cubic-bezier(.2, .7, .2, 1);
    transform-origin: 50% 50%;
  }

  #cur.big #face { transform: scale(1.3) rotate(12deg); }
  #cur.tiny #face { transform: scale(0.7); }
}

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  h1 { font-size: clamp(38px, 11vw, 86px); }

  /* masthead stacks: name, katakana, then the tagline above the hero photo */
  .masthead { flex-direction: column; align-items: stretch; gap: 0; }
  #mast-left { display: contents; }
  h1 { order: 1; margin: 0 0 10px; }
  #kata { order: 2; min-width: 0; text-align: left; flex-basis: 100%; }
  #tagline { order: 3; margin-top: 22px; max-width: none; }

  /* hero: wide, not screen-filling */
  .hero .frame { aspect-ratio: 4/3 !important; }

  /* photos stack full width, no stagger */
  #pair .offset { padding-top: 0; }

  /* header: tighter ticker, nav flush to the gutter and spanning the width */
  header .bar { padding-top: 12px; padding-bottom: 10px; gap: 8px 0; }
  #ticker { font-size: 11px; gap: 4px 18px; width: 100%; }
  header nav {
    width: 100%;
    justify-content: flex-start;
    margin: 0 -7px;
    flex-wrap: nowrap;
    font-size: 12.5px;
    gap: 6px;
  }
  header nav a { padding: 5px 7px; }

  /* temperature only; the emoji carries the city label at every width */
  .wx-full { display: none; }
  .wx-short { display: inline; }

  /* career: company on its own line, role + years beneath */
  .jobs li { grid-template-columns: 1fr auto; gap: 2px 14px; padding: 14px 0; }
  .company { grid-column: 1 / -1; font-size: 26px; line-height: 1.1; }
  .role { grid-column: 1; }
  .years { grid-column: 2; }

  /* compact deck, info stays beside it instead of wrapping under */
  #deck { width: 180px; height: 140px; }
  #vinyl, #sleeve { width: 140px; height: 140px; }
  #vinyl { left: 40px; }
  #deck:hover #sleeve { transform: translateX(-40px); }
  .np { gap: 14px; align-items: flex-start; }
  .track { flex: 1 1 120px; min-width: 0; }
  .track-artist { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  #vinyl { animation: none; }
}
