/* =========================================================
   STUDIO HOURS — portfolio v2
   A live isometric pixel room beside an editorial column.
   ========================================================= */

:root {
  --paper: #edf0ea;
  --paper-2: #e2e6de;
  --ink: #141a16;
  --ink-2: #4a544e;
  --ink-3: #7d8882;
  --rule: #cdd3c9;
  --accent: #d2461f;
  --accent-soft: #f6d9cc;
  --note: #ffd84d;
  --note-ink: #2a2414;
  --hud: rgb(237 240 234 / 0.86);

  --f-pixel: "Jersey 10", "Arial Narrow", "Roboto Condensed", sans-serif-condensed, sans-serif;
  --f-serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(16px, 4vw, 56px);
  --scene-h: 100dvh;

  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111513;
    --paper-2: #181e1b;
    --ink: #e7ece5;
    --ink-2: #a9b3ac;
    --ink-3: #75817a;
    --rule: #28302b;
    --accent: #ff7a4d;
    --accent-soft: #3a2219;
    --note: #f2c94c;
    --note-ink: #2a2414;
    --hud: rgb(17 21 19 / 0.82);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111513;
  --paper-2: #181e1b;
  --ink: #e7ece5;
  --ink-2: #a9b3ac;
  --ink-3: #75817a;
  --rule: #28302b;
  --accent: #ff7a4d;
  --accent-soft: #3a2219;
  --note: #f2c94c;
  --note-ink: #2a2414;
  --hud: rgb(17 21 19 / 0.82);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--note); color: var(--note-ink); }
canvas { max-width: 100%; }

.skip { position: absolute; left: 16px; top: -80px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; font-family: var(--f-mono); font-size: 0.75rem; }
.skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.scene-col { position: relative; }
.scene {
  position: sticky; top: 0;
  height: var(--scene-h);
  overflow: hidden;
  background: #cfe0e6;
  user-select: none; -webkit-user-select: none;
}
.scene canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; touch-action: pan-y; }
.scene.is-hot canvas { cursor: pointer; }

.story { min-width: 0; padding-inline: var(--pad); }
main { max-width: 600px; }

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; align-items: center; gap: 16px;
  padding-block: 18px 14px;
  background: linear-gradient(var(--paper) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--f-pixel); font-size: 1.6rem; line-height: 1; white-space: nowrap; }
.brand-mark { width: 14px; height: 14px; background: var(--accent); box-shadow: 4px 4px 0 0 var(--ink); }
.sched { display: flex; gap: 2px; margin-left: auto; }
.sched a {
  font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.02em;
  color: var(--ink-3); text-decoration: none; padding: 6px 8px; display: flex; gap: 6px; align-items: baseline;
  border-radius: 2px; transition: color .2s, background-color .2s;
}
.sched a time { color: var(--ink-3); opacity: .7; }
.sched a:hover { color: var(--ink); background: var(--paper-2); }
.sched a.is-now { color: var(--ink); }
.sched a.is-now time { color: var(--accent); opacity: 1; }
.theme-btn { width: 34px; height: 34px; border: 1px solid var(--rule); background: transparent; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
.theme-btn span { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); border: 1.5px solid var(--ink); }
.theme-btn:hover { border-color: var(--ink); }

/* ---------- Chapters ---------- */
.ch { padding-block: clamp(64px, 14vh, 140px) clamp(96px, 26vh, 260px); }
.ch--intro { padding-top: clamp(32px, 10vh, 96px); min-height: 92vh; }
.stamp { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.stamp time { color: var(--accent); font-weight: 500; }
.stamp::after { content: ""; flex: 1; height: 1px; background: var(--rule); order: 1; }
.stamp time { order: 0; } .stamp span { order: 2; }

.name {
  font-family: var(--f-pixel); font-weight: 400;
  font-size: clamp(4.5rem, 2rem + 8vw, 10.5rem);
  line-height: 0.78; letter-spacing: 0.005em;
  margin: 0 0 32px;
  color: var(--ink);
}
.name::first-line { color: var(--ink); }
.lede { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); line-height: 1.35; font-weight: 350; margin: 0 0 36px; max-width: 30ch; text-wrap: balance; letter-spacing: -0.01em; }
.lede em, .h2 em { font-style: italic; color: var(--accent); }
.facts { margin: 0 0 48px; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-family: var(--f-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); padding-top: 5px; }
.facts dd { margin: 0; font-size: 1.0625rem; }
.cue { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); display: flex; gap: 10px; align-items: center; margin: 0; }
.cue span { display: inline-block; animation: bob 1.6s steps(2) infinite; color: var(--accent); }
@keyframes bob { 50% { transform: translateY(4px); } }

.h2 { font-family: var(--f-serif); font-weight: 350; font-size: clamp(2rem, 1.4rem + 2.2vw, 3.1rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 32px; text-wrap: balance; }
.prose p { margin: 0 0 1.1em; color: var(--ink-2); max-width: 60ch; }
.aside { font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-3); margin: -12px 0 28px; }
.label { font-family: var(--f-mono); font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin: 44px 0 14px; }

.tools { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tools li { font-family: var(--f-mono); font-size: 0.8125rem; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; transition: border-color .2s, background-color .2s; }
.tools li:hover { border-color: var(--ink); background: var(--paper-2); }

.principles { list-style: none; padding: 0; margin: 0; counter-reset: p; display: grid; }
.principles li { counter-increment: p; position: relative; padding: 14px 0 14px 44px; border-top: 1px solid var(--rule); color: var(--ink-2); }
.principles li::before { content: counter(p, decimal-leading-zero); position: absolute; left: 0; top: 14px; font-family: var(--f-mono); font-size: 0.6875rem; color: var(--accent); padding-top: 6px; }
.principles strong { color: var(--ink); font-weight: 500; }

/* ---------- Work list ---------- */
.works { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.work { border-bottom: 1px solid var(--rule); }
.work-row {
  width: 100%; background: none; border: 0; color: inherit; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 18px; align-items: baseline; gap: 16px;
  padding: 18px 0 14px;
  font: inherit;
}
.work-year { font-family: var(--f-mono); font-size: 0.6875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.work-title { font-family: var(--f-pixel); font-size: clamp(2rem, 1.5rem + 1.6vw, 2.9rem); line-height: 0.9; transition: color .15s, transform .25s cubic-bezier(.2, .7, .2, 1); display: inline-block; }
.work-type { font-family: var(--f-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.work-arrow { width: 12px; height: 12px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translate(-3px, -3px); transition: transform .25s, border-color .2s; }
.work-row:hover .work-title, .work.is-open .work-title { color: var(--accent); transform: translateX(6px); }
.work.is-open .work-arrow { transform: rotate(225deg); border-color: var(--accent); }
.work-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.6, 0, .2, 1); }
.work.is-open .work-body { grid-template-rows: 1fr; }
.work-inner { overflow: hidden; }
.work-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding: 4px 0 26px 68px; }
.work-thumb { width: 100%; aspect-ratio: 4 / 3; max-width: 100%; image-rendering: pixelated; display: block; border: 1px solid var(--ink); }
.work-desc { margin: 0 0 12px; color: var(--ink-2); font-size: 1rem; }
.work-meta { margin: 0 0 12px; display: grid; gap: 4px; font-size: 0.9375rem; }
.work-meta div { display: grid; grid-template-columns: 64px 1fr; gap: 10px; }
.work-meta dt { font-family: var(--f-mono); font-size: 0.625rem; text-transform: uppercase; color: var(--ink-3); padding-top: 5px; }
.work-meta dd { margin: 0; }
.link { font-family: var(--f-mono); font-size: 0.75rem; color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- Logbook ---------- */
.log { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.job { border-bottom: 1px solid var(--rule); }
.job-row {
  width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 110px minmax(0, 1fr) 18px; gap: 16px; align-items: baseline; padding: 20px 0;
}
.job-date { font-family: var(--f-mono); font-size: 0.6875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.job-main { display: grid; }
.job-role { font-size: 1.45rem; line-height: 1.2; letter-spacing: -0.01em; transition: color .15s; }
.job-org { font-style: italic; color: var(--ink-2); font-size: 1rem; }
.job-row:hover .job-role { color: var(--accent); }
.job-sign { width: 14px; height: 14px; position: relative; align-self: center; }
.job-sign::before, .job-sign::after { content: ""; position: absolute; background: var(--ink); left: 0; top: 6px; width: 14px; height: 2px; transition: transform .25s; }
.job-sign::after { transform: rotate(90deg); }
.job.is-open .job-sign::after { transform: rotate(0); }
.job-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.6, 0, .2, 1); }
.job.is-open .job-body { grid-template-rows: 1fr; }
.job-inner { overflow: hidden; padding-left: 126px; }
.job-inner p { margin: 0 0 10px; color: var(--ink-2); font-size: 1rem; max-width: 56ch; }
.job-inner a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.job-inner ul { margin: 0 0 22px; padding-left: 18px; color: var(--ink-2); font-size: 1rem; }
.job-inner li::marker { color: var(--accent); content: "▪  "; }

/* ---------- Training ---------- */
.train-stats { margin: 8px 0 34px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.train-stats div { padding: 14px 12px 12px 0; border-right: 1px solid var(--rule); display: grid; gap: 2px; }
.train-stats div + div { padding-left: 16px; }
.train-stats div:last-child { border-right: 0; }
.train-stats dt { font-family: var(--f-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.train-stats dd { margin: 0; font-family: var(--f-pixel); font-size: clamp(2.6rem, 2rem + 2vw, 3.6rem); line-height: .9; color: var(--ink); }
.streak { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; max-width: 420px; }
.streak-week { display: grid; grid-template-rows: repeat(7, 1fr); gap: 4px; }
.streak i { aspect-ratio: 1; border-radius: 2px; background: color-mix(in srgb, #2f8f83 var(--l, 70%), var(--paper-2)); }
.streak i.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.train-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 28px; }
.train-count { margin: 0; font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-2); }
.train-count b { font-family: var(--f-pixel); font-size: 1.6rem; font-weight: 400; color: var(--accent); vertical-align: -3px; margin-left: 4px; }
#do-set:disabled { opacity: .6; cursor: default; }
@media (max-width: 560px) { .train-stats dd { font-size: 2.2rem; } }

/* ---------- Library (knowledge) ---------- */
.library { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.kcat { border-bottom: 1px solid var(--rule); }
.kcat-row { width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto 18px; gap: 16px; align-items: center; padding: 18px 0; }
.spines { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.spines i { width: 6px; border-radius: 1px 1px 0 0; background: var(--c); box-shadow: inset -2px 0 0 rgb(0 0 0 / .18), inset 1px 0 0 rgb(255 255 255 / .25); }
.spines i:nth-child(odd) { filter: brightness(1.15); }
.spines i:nth-child(3n) { filter: brightness(.85); }
.kcat-main { display: grid; }
.kcat-name { font-family: var(--f-pixel); font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.4rem); line-height: .9; transition: color .15s; }
.kcat-count { font-family: var(--f-mono); font-size: 0.6875rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.kcat-level { font-family: var(--f-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px; border: 1px solid var(--rule); color: var(--ink-2); white-space: nowrap; }
.kcat-row:hover .kcat-name, .kcat.is-open .kcat-name { color: var(--accent); }
.kcat .job-sign { justify-self: end; }
.kcat.is-open .job-sign::after { transform: rotate(0); }
.kcat-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.6, 0, .2, 1); }
.kcat.is-open .kcat-body { grid-template-rows: 1fr; }
.kcat-inner { overflow: hidden; padding-left: 74px; }
.kcat-inner p { margin: 0 0 12px; color: var(--ink-2); font-size: 1rem; max-width: 56ch; }
.books { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.books li { font-family: var(--f-mono); font-size: 0.75rem; padding: 5px 10px 5px 8px; border: 1px solid var(--rule); border-left: 4px solid var(--c); background: var(--paper-2); }
.kcat.is-flash .kcat-row { animation: flash 1.2s ease-out; }
@keyframes flash { 0%, 40% { background: color-mix(in srgb, var(--c) 18%, transparent); } }
@media (max-width: 560px) {
  .kcat-row { grid-template-columns: 44px minmax(0, 1fr) 14px; }
  .kcat-level { display: none; }
  .kcat-inner { padding-left: 0; }
}

/* ---------- Contact ---------- */
.hello { font-family: var(--f-pixel); font-weight: 400; font-size: clamp(5.5rem, 2rem + 9vw, 12rem); line-height: 0.76; margin: 0 0 32px; }
.email-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 0; border-block: 1px solid var(--ink); }
.email { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.2rem); letter-spacing: -0.02em; user-select: all; overflow-wrap: anywhere; flex: 1 1 auto; }
.btn { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: .02em; padding: 10px 16px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; transition: background-color .15s, color .15s; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.links { list-style: none; padding: 0; margin: 20px 0 56px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.links a { font-family: var(--f-mono); font-size: 0.8125rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 2px; transition: border-color .15s, color .15s; }
.links a:hover { color: var(--accent); border-color: var(--accent); }

.note-form { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; }
.note {
  background: var(--note); color: var(--note-ink);
  aspect-ratio: 1; max-width: 100%;
  padding: 18px 16px;
  transform: rotate(-3deg);
  box-shadow: 0 1px 0 rgb(0 0 0 / .1), 6px 10px 0 -2px rgb(0 0 0 / .12);
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.note::before { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; background: var(--accent); border-radius: 50%; box-shadow: inset -2px -2px 0 rgb(0 0 0 / .25); }
.note.is-pinned { transform: rotate(2deg) scale(.96); }
.note-text { font-family: var(--f-pixel); font-size: 1.55rem; line-height: 0.95; margin: 0; overflow-wrap: anywhere; overflow: hidden; }
.note-sig { font-family: var(--f-pixel); font-size: 1.2rem; margin: 0; text-align: right; opacity: .7; }
.note-fields { display: grid; gap: 14px; }
.note-fields .label { margin: 0; }
.field { display: grid; gap: 6px; }
.field label { font-family: var(--f-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.field input, .field textarea { font: inherit; font-size: 1rem; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--rule); padding: 6px 0; border-radius: 0; resize: vertical; width: 100%; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.note-fields .btn { justify-self: start; }
.note-status { margin: 0; font-family: var(--f-mono); font-size: 0.75rem; color: var(--ink-2); min-height: 1.4em; }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 96px; padding-top: 18px; border-top: 1px solid var(--rule); font-family: var(--f-mono); font-size: 0.6875rem; color: var(--ink-3); padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot p { margin: 0; }

/* ---------- Scene overlays ---------- */
.hud {
  position: absolute; left: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 16px 10px 14px;
  background: var(--hud); color: var(--ink);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-radius: 3px;
}
.clock { display: grid; line-height: 1; }
.clock-time { font-family: var(--f-pixel); font-size: 2.4rem; font-variant-numeric: tabular-nums; }
.clock-label { font-family: var(--f-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin-top: 2px; }
.daybar { width: 140px; }
.daybar-track { position: relative; height: 4px; background: var(--rule); }
.daybar-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); }
.daybar-dot { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--accent); border: 2px solid var(--paper); left: 0; }
.daybar-ticks { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--f-mono); font-size: 0.5625rem; color: var(--ink-3); }
.scene-hint { position: absolute; right: 16px; bottom: 16px; margin: 0; font-family: var(--f-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink); background: var(--hud); padding: 6px 10px; border-radius: 3px; }
.scene-actions { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--f-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: .04em; background: var(--hud); color: var(--ink); border: 1px solid transparent; padding: 6px 10px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: border-color .15s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.bubble {
  position: absolute; left: 0; top: 0; z-index: 3;
  transform: translate(-50%, calc(-100% - 12px));
  max-width: 220px; width: max-content;
  background: #fffdf6; color: #1a1712;
  font-family: var(--f-pixel); font-size: 1.3rem; line-height: 1;
  padding: 8px 10px 9px;
  box-shadow: 0 -2px 0 0 #1a1712, 0 2px 0 0 #1a1712, -2px 0 0 0 #1a1712, 2px 0 0 0 #1a1712;
  pointer-events: none;
  animation: pop .25s steps(3) both;
}
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -4px; width: 8px; height: 8px; background: #1a1712; clip-path: polygon(0 0, 100% 0, 0 100%); }
@keyframes pop { from { transform: translate(-50%, calc(-100% - 4px)) scale(.6); opacity: 0; } }

.tip {
  position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none;
  display: grid; gap: 2px;
  background: #1a1712; color: #fffdf6; padding: 7px 10px; border-radius: 2px;
  transform: translate(14px, 14px);
}
.tip-name { font-family: var(--f-pixel); font-size: 1.2rem; line-height: 1; }
.tip-hint { font-family: var(--f-mono); font-size: 0.5625rem; text-transform: uppercase; letter-spacing: .04em; color: #f2b84b; }

/* Floating project preview */
.peek {
  position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none;
  width: 240px;
  opacity: 0; transform: translate(-50%, -50%) scale(.85);
  transition: opacity .2s, transform .25s cubic-bezier(.2, .7, .2, 1);
  background: #1a1712; padding: 6px 6px 8px;
}
.peek.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-2deg); }
.peek canvas { width: 100%; aspect-ratio: 4 / 3; display: block; image-rendering: pixelated; }
.peek-label { display: block; font-family: var(--f-mono); font-size: 0.5625rem; text-transform: uppercase; color: #f2b84b; margin-top: 6px; letter-spacing: .04em; }

/* ---------- Responsive ---------- */
@media (max-width: 1800px) {
  .sched a time { display: none; }
}
@media (max-width: 1500px) {
  .bar .brand-last { display: none; }
  .sched a[data-ch="0"] { display: none; }
}
@media (max-width: 1180px) {
  .bar .brand-text { display: none; }
  .work-grid { grid-template-columns: 120px minmax(0, 1fr); padding-left: 0; }
}
@media (max-width: 1100px) {
  .bar { gap: 10px; }
  .sched a { padding: 6px 4px; font-size: 0.625rem; }
}
@media (max-width: 900px) {
  :root { --scene-h: 44vh; }
  .bar .brand-text, .bar .brand-last { display: inline; }
  .layout { grid-template-columns: 1fr; }
  .scene-col { position: sticky; top: 0; z-index: 5; height: var(--scene-h); }
  .scene { position: relative; }
  .bar { top: var(--scene-h); background: var(--paper); border-bottom: 1px solid var(--rule); padding-block: 10px; }
  .sched { display: none; }
  .theme-btn { margin-left: auto; }
  .ch { padding-block: 56px 120px; }
  .ch--intro { min-height: 0; padding-top: 32px; }
  .hud { left: 10px; bottom: 10px; padding: 6px 10px; gap: 12px; }
  .clock-time { font-size: 1.7rem; }
  .daybar { width: 90px; }
  .scene-hint { display: none; }
  .scene-actions { top: 10px; left: 10px; right: 10px; }
  .peek { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 1.0625rem; }
  .work-row { grid-template-columns: 40px minmax(0, 1fr) 14px; }
  .work-type { display: none; }
  .work-grid { grid-template-columns: 1fr; padding-left: 0; }
  .work-thumb { max-width: 240px; }
  .job-row { grid-template-columns: 1fr 14px; }
  .job-date { grid-column: 1; }
  .job-main { grid-column: 1; }
  .job-row .job-sign { grid-column: 2; grid-row: 1 / span 2; }
  .job-inner { padding-left: 0; }
  .note-form { grid-template-columns: 1fr; }
  .note { max-width: 220px; }
  .facts div { grid-template-columns: 96px 1fr; }
  .daybar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
