/* ============================================================
   yoshik v4 — ramx.in inspired, animation engine kept
   warm minimal, narrow column, hairline everything, lowercase
   ============================================================ */

/* ---------- themes ---------- */
:root, html[data-theme="light"] {
  --bg: #fafafa;
  --panel: #ffffff;
  --ink: #171717;
  --dim: #737373;
  --faint: #a3a3a3;
  --line: #e5e5e5;
  --hover: #f4f4f5;
  --accent: #3b5bfd;
  --accent-soft: rgba(59, 91, 253, .08);
  --grn: #00c758;
  --grn-soft: rgba(0, 199, 88, .1);
  --amber: #d97706;
  --rose: #e11d48;
  --glow: 0 0 22px rgba(59, 91, 253, .18);
  --shadow: 0 8px 30px rgba(0, 0, 0, .06);
}
html[data-theme="dark"] {
  --bg: #0a0a0a;
  --panel: #141414;
  --ink: #fafafa;
  --dim: #a3a3a3;
  --faint: #6b6b6b;
  --line: #262626;
  --hover: #1c1c1c;
  --accent: #7d9bff;
  --accent-soft: rgba(125, 155, 255, .1);
  --grn: #4ade80;
  --grn-soft: rgba(74, 222, 128, .1);
  --amber: #fbbf24;
  --rose: #fb7185;
  --glow: 0 0 22px rgba(125, 155, 255, .22);
  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
}

/* ---------- base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[data-motion="off"] { scroll-behavior: auto; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .4s ease, color .4s ease;
  font-size: 15px; line-height: 1.65;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
.mono, .tagline, .sp-line, .subline, .pill, .chev, .chips, footer,
.np-artist, .dc-status, .q-text, .foot-label { font-family: "JetBrains Mono", ui-monospace, monospace; }
.wrap { max-width: 672px; margin: 0 auto; padding: 0 16px; }
.dim { color: var(--dim); }
.ok { color: var(--grn); }
b, strong { font-weight: 600; }

/* ---------- boot ---------- */
#boot {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .45s ease, visibility .45s;
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-box { width: min(380px, 86vw); }
.boot-line { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--dim); line-height: 2.2; opacity: 0; transform: translateY(6px); }
.boot-line.show { opacity: 1; transform: none; transition: all .25s ease; }

/* ---------- cursor ---------- */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; border-radius: 50%; display: none; }
@media (pointer: fine) {
  .cursor-dot, .cursor-ring { display: block; }
  body, a, button { cursor: none; }
}
.cursor-dot { width: 5px; height: 5px; background: var(--accent); }
.cursor-ring { width: 30px; height: 30px; border: 1px solid var(--accent); opacity: .5; transition: width .25s ease, height .25s ease, opacity .25s ease; }
body.link-hover .cursor-ring { width: 48px; height: 48px; opacity: .85; }

/* ---------- progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 150; background: transparent; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100; height: 56px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { height: 56px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -.02em; display: inline-block; }
.brand-dot { color: var(--accent); }
.nav { display: flex; gap: 22px; }
.nav a { display: inline-block; font-size: 14px; font-weight: 500; color: var(--dim); transition: color .15s ease, transform .32s cubic-bezier(.34, 1.56, .64, 1); }
.nav a:hover { color: var(--ink); transform: scale(1.1); }
.nav a:active { transform: scale(.94); }
.controls { display: flex; gap: 8px; }
.ctl {
  font-size: 15px; color: var(--dim); width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  transition: all .15s ease;
}
.ctl:hover { color: var(--ink); border-color: var(--faint); }
.ctl.off { opacity: .4; }

/* ---------- hero ---------- */
.hero { padding: 40px 0 8px; }
.hero-id { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.avatar { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 1px solid var(--line); transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.avatar:hover { transform: rotate(-8deg) scale(1.05); }
.avatar svg { width: 100%; height: 100%; display: block; }
.hero-id-text h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.subline { font-size: 12.5px; color: var(--dim); margin-top: 4px; }
.copy-mail { color: var(--dim); font-size: 12.5px; display: inline-block; transition: color .15s ease, transform .38s cubic-bezier(.34, 1.56, .64, 1); }
.copy-mail:hover { color: var(--accent); }
.copy-mail:active { transform: scale(.94); }
.tagline { font-size: 14px; color: var(--ink); margin-bottom: 10px; min-height: 1.7em; }
.prompt { color: var(--faint); margin-right: 6px; }
.caret { display: inline-block; width: 8px; height: 1.1em; background: var(--accent); vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-note { color: var(--dim); font-size: 14px; max-width: 520px; margin-bottom: 16px; }
.sp-line { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); margin-bottom: 18px; }
.sp-glyph { width: 17px; height: 17px; color: var(--grn); flex-shrink: 0; }
.sp-glyph-link { display: inline-flex; align-items: center; flex-shrink: 0; border-radius: 50%; line-height: 0; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.sp-glyph-link .sp-glyph { width: 17px; height: 17px; display: block; border-radius: 50%; }
.sp-glyph-link:hover { transform: scale(1.12); }
.sp-label { color: var(--faint); }
.sp-track { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sp-line { min-width: 0; }
.sp-song { color: var(--ink); font-weight: 600; text-decoration: none; }
.sp-song[href]:hover { text-decoration: underline; }
.sp-artists { color: var(--dim); font-weight: 400; }
.socials { display: flex; gap: 6px; }
.socials a {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--dim); border-radius: 10px;
  transition: transform .38s cubic-bezier(.34, 1.56, .64, 1), color .15s ease, background .15s ease;
}
.socials a svg { width: 18px; height: 18px; }
.socials a:hover { color: var(--ink); background: var(--hover); transform: scale(1.14); }
.socials a:active { transform: scale(.9); }

/* ---------- sections ---------- */
.section { padding: 40px 0 8px; }
.section h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; }

/* ---------- work rows ---------- */
.rows { border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row-top {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 4px; text-align: left; border-radius: 8px; transition: background .15s ease;
}
.row-top:hover { background: var(--hover); }
.row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.row-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-desc { font-size: 13.5px; color: var(--dim); }
.chev {
  color: var(--faint); font-size: 18px; flex-shrink: 0; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .2s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1), background .15s ease;
}
.row-top:hover .chev, .row-top:focus-visible .chev { opacity: 1; transform: translateY(0); }
.row-top[aria-expanded="true"] .chev { transform: rotate(180deg); opacity: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; letter-spacing: .04em; padding: 4px 10px; border-radius: 99px; border: 1px solid;
}
.pill.live { color: var(--grn); border-color: color-mix(in srgb, var(--grn) 45%, transparent); background: var(--grn-soft); }
.pdot { width: 6px; height: 6px; border-radius: 50%; background: var(--grn); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.pill.ship { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }
.pill.lab { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 10%, transparent); }
.pill.wip { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 40%, transparent); background: color-mix(in srgb, var(--rose) 8%, transparent); }
.row-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s cubic-bezier(.34, 1.25, .64, 1); }
.row-detail.open { grid-template-rows: 1fr; }
.row-detail-in { overflow: hidden; }
.row-detail-in > * { opacity: 0; transform: translateY(10px); transition: opacity .35s ease .12s, transform .35s ease .12s; }
.row-detail.open .row-detail-in > * { opacity: 1; transform: none; }
.row-detail-in p { color: var(--dim); font-size: 14px; max-width: 560px; padding: 2px 4px 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 4px 14px; }
.chips span { font-size: 11px; color: var(--dim); border: 1px solid var(--line); background: var(--panel); border-radius: 7px; padding: 5px 10px; }
.row-links { display: flex; gap: 20px; padding: 0 4px 22px; }
.row-links a { font-family: "JetBrains Mono", monospace; font-size: 12.5px; color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 2px; transition: color .15s ease; }
.row-links a:hover { color: var(--accent); }

/* ---------- prose ---------- */
.prose p { color: var(--dim); font-size: 14.5px; margin-bottom: 14px; max-width: 600px; }
.prose b { color: var(--ink); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px; overflow: hidden;
  transform-style: preserve-3d; will-change: transform;
  transition: background .15s ease, border-color .2s ease, box-shadow .25s ease, transform .5s cubic-bezier(.16, 1, .3, 1);
}
.card:hover { background: var(--hover); border-color: var(--faint); box-shadow: var(--shadow); }
.card-title { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; display: flex; align-items: center; }
.card-arrow { position: absolute; top: 14px; right: 16px; color: var(--faint); font-size: 15px; opacity: 0; transform: translate(-6px, 6px); transition: all .25s ease; }
.card:hover .card-arrow { opacity: 1; transform: translate(0, 0); color: var(--accent); }
.glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease; background: radial-gradient(300px circle at var(--gx, 50%) var(--gy, 50%), var(--accent-soft), transparent 65%); }
.tilt:hover .glare { opacity: 1; }
.meters { list-style: none; }
.meters li { margin-bottom: 13px; }
.meters li:last-child { margin-bottom: 0; }
.meters span { display: block; font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--dim); margin-bottom: 6px; }
.bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--grn)); transition: width 1.1s cubic-bezier(.16, 1, .3, 1) .15s; }
.in .bar i { width: var(--v); }

/* ---------- live panels ---------- */
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); margin-left: 8px; vertical-align: 1px; }
.live-dot.on { background: var(--grn); animation: pulse 1.8s infinite; }
.np-body, .dc-body { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.np-art { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--hover); border: 1px solid var(--line); color: var(--dim); background-size: cover; background-position: center; }
.np-track { font-weight: 600; font-size: 14.5px; margin-bottom: 3px; }
.np-artist { font-size: 11.5px; color: var(--dim); }
.np-bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.np-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1s linear; }
.dc-ava { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); border: 1px solid var(--line); color: var(--accent); font-weight: 700; font-size: 19px; background-size: cover; }
.dc-name { font-weight: 600; font-size: 14.5px; margin-bottom: 3px; }
.dc-status { font-size: 11.5px; color: var(--dim); }
.dc-actions { display: flex; align-items: center; justify-content: space-between; }
.copy-ico {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 4px; margin: -4px; border-radius: 6px;
  color: var(--dim); cursor: pointer;
  transition: color .15s ease, background .15s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.copy-ico:hover { color: var(--ink); background: var(--hover); }
.copy-ico:active { transform: scale(.88); }
.copy-ico .ico-check { display: none; }
.copy-ico.ok { color: var(--grn); }
.copy-ico.ok .ico-copy { display: none; }
.copy-ico.ok .ico-check { display: block; }

/* ---------- quote card ---------- */
.quote-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 30px 28px 24px; margin-top: 12px; box-shadow: var(--shadow); overflow: hidden; }
.q-marks { font-family: Georgia, serif; font-size: 64px; line-height: 0.6; color: var(--line); margin-bottom: 10px; }
.q-text { font-size: 16px; font-style: italic; margin-bottom: 12px; }
.q-attr { font-size: 12px; color: var(--faint); text-align: right; }

/* ---------- buttons ---------- */
.pill-btn {
  display: inline-block; font-family: "JetBrains Mono", monospace; font-size: 12.5px;
  padding: 10px 22px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); will-change: transform;
  text-decoration: none; cursor: pointer;
  transition: transform .38s cubic-bezier(.34, 1.56, .64, 1), border-color .15s ease, background .15s ease, color .15s ease;
}
.pill-btn:hover { border-color: var(--ink); transform: scale(1.06); }
.pill-btn:active { transform: scale(.92); }
.pill-btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 500; }
.pill-btn.solid:hover { opacity: .88; }

/* ---------- contact ---------- */
.contact-big { font-size: clamp(24px, 5vw, 34px); font-weight: 700; letter-spacing: -.025em; margin-bottom: 10px; }
.contact-sub { font-size: 14px; margin-bottom: 24px; }
.contact-cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 32px 0 90px; font-size: 12px; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px; }
.foot-label { font-size: 11px; letter-spacing: .18em; color: var(--faint); margin-bottom: 12px; text-transform: uppercase; }
.foot-col a { display: block; color: var(--dim); padding: 3px 0; font-size: 13px; transition: color .15s ease; width: fit-content; }
.foot-col a:hover { color: var(--ink); }
.foot-socials { display: grid; grid-template-columns: repeat(4, 40px); gap: 8px; }
.foot-socials a {
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--dim);
  transition: transform .38s cubic-bezier(.34, 1.56, .64, 1), color .15s ease, border-color .15s ease, background .15s ease; padding: 0;
}
.foot-socials a:hover { color: var(--ink); border-color: var(--faint); background: var(--hover); transform: scale(1.1); }
.foot-socials a:active { transform: scale(.9); }
.foot-base { color: var(--faint); font-size: 11.5px; }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px) scale(.985); }
[data-reveal].in { opacity: 1; transform: none; transition: opacity .55s ease var(--d, 0s), transform .65s cubic-bezier(.34, 1.45, .64, 1) var(--d, 0s); }

/* ---------- motion off ---------- */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; }
html[data-motion="off"] [data-reveal] { opacity: 1; transform: none; }
html[data-motion="off"] .in .bar i { width: var(--v); }
html[data-motion="off"] #boot { display: none; }
html[data-motion="off"] .cursor-dot, html[data-motion="off"] .cursor-ring { display: none; }
/* restore the native cursor when the custom one is off */
html[data-motion="off"] body, html[data-motion="off"] a, html[data-motion="off"] button { cursor: auto; }
html[data-motion="off"] .row-detail { transition: none; }

/* ---------- refinements ---------- */
section { scroll-margin-top: 72px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.row-top { -webkit-tap-highlight-color: transparent; }
.card { -webkit-tap-highlight-color: transparent; }
.hero-id-text h1 { text-wrap: balance; }
::placeholder { color: var(--faint); }

/* ---------- accuracy hud ---------- */
.acc-badge {
  position: fixed; top: 66px; right: 14px; z-index: 90;
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .05em;
  color: var(--dim); background: color-mix(in srgb, var(--panel) 88%, transparent);
  border: 1px solid var(--line); border-radius: 99px; padding: 7px 13px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  user-select: none; -webkit-user-select: none;
  transition: border-color .15s ease, color .15s ease, transform .38s cubic-bezier(.34, 1.56, .64, 1);
}
.acc-badge span { color: var(--faint); }
.acc-badge:hover { border-color: var(--accent); color: var(--ink); transform: scale(1.07); }
.acc-badge:active { transform: scale(.93); }

/* ---------- pokeball bg + osu trail ---------- */
#pokebg { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
#fgtrail { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
main.wrap, footer { position: relative; z-index: 2; }
html[data-motion="off"] #pokebg, html[data-motion="off"] #fgtrail { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .nav { display: none; }
  .cards { grid-template-columns: 1fr; }
  .chev { opacity: 1; transform: none; }
  .hero { padding-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
