* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
body { display: flex; flex-direction: column; padding: 14px; gap: 12px; height: 100vh; overflow: hidden; }
img { display: block; }

/* top hairline meta */
.topmeta { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tr-label); color: var(--ink-55); text-transform: uppercase; padding: 0 4px; }

.stage-wrap { flex: 1; display: grid; grid-template-columns: 200px 1fr; gap: 12px; min-height: 0; }

/* ---------------- accordion rail ---------------- */
.rail { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.nav-card {
  position: relative; flex: 0 0 auto; flex-grow: 0; flex-basis: 68px; min-height: 68px;
  border: none; border-radius: 18px; background: transparent; cursor: pointer;
  text-align: left; padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between;
  color: var(--ink); overflow: hidden;
  outline: none; -webkit-tap-highlight-color: transparent; -webkit-appearance: none; appearance: none;
  transition: flex-grow var(--dur-accordion) var(--ease-accordion);
}
.nav-card.hello   { background: var(--red);    color: var(--on-red); }
.nav-card.work    { background: var(--blue);   color: var(--on-blue); }
.nav-card.contact { background: var(--yellow); color: var(--on-yellow); }
.nav-card .ix { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tr-label); opacity: .72; }
.nav-card .lb { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1; transition: font-size var(--dur-accordion) var(--ease-accordion); }
.nav-card:active, .nav-card:focus, .nav-card:focus-visible { transform: none; outline: none; border: none; box-shadow: none; }
.rail.is-home .nav-card:not(.brand) { flex-grow: 1; }
.nav-card.active { flex-grow: 6; }
.nav-card.active .lb { font-size: 34px; }
.nav-card.brand { flex-grow: 0 !important; flex-basis: 68px; background: var(--white); }
.nav-card.brand .brand-mark { height: 16px; width: auto; }
.nav-card.brand .ix { color: var(--ink-55); }

/* ---------------- stage ---------------- */
.stage { position: relative; border: var(--bw) solid var(--ink); border-radius: var(--r-card); background: var(--paper); min-height: 0; overflow: hidden; }
.scroller { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.scroller::-webkit-scrollbar { display: none; }
.panel { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; padding: 34px 40px; display: flex; flex-direction: column; background: var(--paper); }
.panel.hero { color: #fff; }
.panel.hero.fg-dark { color: var(--ink); }

.panel-top { display: flex; justify-content: space-between; align-items: flex-start; font-family: var(--font-mono); font-size: var(--fs-small); letter-spacing: var(--tr-label); text-transform: uppercase; }
.panel-top .big-idx { font-family: var(--font-display); font-weight: 600; font-size: 44px; line-height: 0.8; letter-spacing: var(--tr-display); }
.panel-top .r { text-align: right; }

/* hero giant type */
.hero-type { flex: 1; display: flex; align-items: center; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-hero); line-height: var(--lh-tight); letter-spacing: var(--tr-display); }
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; font-family: var(--font-mono); font-size: var(--fs-small); letter-spacing: var(--tr-label); text-transform: uppercase; opacity: .9; }

/* home landing */
.home-mark { flex: 1; display: flex; align-items: center; justify-content: center; }
.home-mark img { width: min(34vh, 280px); }
.junu-mark { width: min(34vh, 280px); height: auto; display: block; will-change: transform; }
.junu-mark rect { fill: var(--ink); }

/* statement */
.statement { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 26px; }
.statement .lead { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-d1); line-height: var(--lh-display); letter-spacing: var(--tr-display); max-width: 16ch; }
.statement .lead .accent { color: var(--red); }
.statement .rule { height: 0; border-top: 1.5px solid var(--hair); }
.statement .desc { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.statement .desc .k { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tr-label); text-transform: uppercase; color: var(--ink-55); }
.statement .desc p { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-80); max-width: 50ch; }

/* work list */
.work-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.work-head .h { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h2); letter-spacing: var(--tr-tight); }
.work-head .c { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--ink-55); text-transform: uppercase; letter-spacing: var(--tr-label); }
.wlist { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.wrow { display: grid; grid-template-columns: 48px 1fr 200px 64px 40px; align-items: center; gap: 18px; padding: 18px 8px; border-top: 1.5px solid var(--hair); cursor: pointer; transition: padding-left var(--dur-hover) var(--ease-out), background var(--dur-hover) var(--ease-out); }
.wrow:last-child { border-bottom: 1.5px solid var(--hair); }
.wrow:hover { padding-left: 22px; background: rgba(14,14,13,0.04); }
.wrow .n { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--ink-55); align-self: start; padding-top: 6px; }
.wrow .ti { display: flex; flex-direction: column; gap: 4px; }
.wrow .ti .t { font-family: var(--font-display); font-weight: 600; font-size: 27px; letter-spacing: var(--tr-tight); line-height: 1.05; }
.wrow .ti .role { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--ink-55); }
.wrow .disc { display: flex; flex-wrap: wrap; gap: 6px; }
.wrow .disc .tag { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tr-label); text-transform: uppercase; border: 1.5px solid var(--ink); border-radius: var(--r-pill); padding: 4px 10px; }
.wrow .yr { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--ink-55); }
.wrow .ar { justify-self: end; font-family: var(--font-mono); opacity: 0; transform: translateX(-6px); transition: opacity var(--dur-hover) var(--ease-out), transform var(--dur-hover) var(--ease-out); }
.wrow:hover .ar { opacity: 1; transform: none; }

/* contact */
.contact-wrap { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding-top: 12px; }
.contact-big { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-d1); line-height: var(--lh-tight); letter-spacing: var(--tr-display); }
.contact-big a { color: inherit; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-col .k { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--tr-label); text-transform: uppercase; color: var(--ink-55); margin-bottom: 8px; }
.contact-col .v { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-h3); line-height: 1.4; }
.contact-col .v a { color: inherit; text-decoration: none; border-bottom: 2px solid var(--ink-30); }
.contact-col .v a:hover { border-color: var(--ink); }

/* ---------------- ticker (static, minimal) ---------------- */
.ticker { flex: 0 0 auto; border-radius: 14px; background: var(--ticker-bg, var(--ink)); color: var(--ticker-fg, var(--paper)); height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; overflow: hidden; font-family: var(--font-mono); font-size: var(--fs-small); letter-spacing: var(--tr-label); transition: background var(--dur-state) ease, color var(--dur-state) ease; }
.ticker .scr { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.ticker .ct { flex: 0 0 auto; padding-left: 20px; display: flex; gap: 8px; align-items: center; }
.ticker .ct .pip { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.scroll-hint { position: absolute; right: 24px; bottom: 20px; font-family: var(--font-mono); font-size: var(--fs-small); letter-spacing: var(--tr-label); text-transform: uppercase; display: flex; align-items: center; gap: 8px; pointer-events: none; transition: opacity var(--dur-state) ease; }
.scroll-hint .arrow { display: inline-block; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint .arrow { animation: none; } }

/* ================= PHONE ================= */
@media (max-width: 640px) {
  body { padding: 10px; gap: 8px; }
  .topmeta { font-size: 10px; }
  .stage-wrap { grid-template-columns: 1fr; grid-template-rows: 60px 1fr; gap: 8px; }

  /* rail becomes a top tab bar */
  .rail { flex-direction: row; gap: 8px; min-height: 0; }
  .nav-card { flex-direction: row; align-items: center; justify-content: center; flex-basis: 0; min-height: 0; padding: 0 12px; border-radius: 14px; flex-grow: 1; }
  .nav-card .ix { display: none; }
  .nav-card .lb { font-size: 15px; }
  .nav-card.active { flex-grow: 2.4; }
  .nav-card.active .lb { font-size: 17px; }
  .nav-card.brand { flex-grow: 0 !important; flex-basis: 56px; }
  .nav-card.brand .brand-mark { height: 14px; }

  .panel { padding: 22px 20px; }
  .panel-top .big-idx { font-size: 34px; }
  .hero-type { font-size: clamp(60px, 17vw, 104px); }
  .home-mark img { width: min(44vw, 190px); }
  .junu-mark { width: min(44vw, 190px); }
  .statement { gap: 18px; }
  .statement .desc { grid-template-columns: 1fr; gap: 10px; }
  .contact-grid { grid-template-columns: 1fr; gap: 14px; }
  .contact-col .v { font-size: var(--fs-body); }
  .work-head { margin-bottom: 10px; }
  .wlist { justify-content: flex-start; }
  .wrow { grid-template-columns: 28px 1fr; gap: 10px; padding: 14px 4px; }
  .wrow .disc, .wrow .yr, .wrow .ar { display: none; }
  .wrow .ti .t { font-size: 20px; }
  .scroll-hint { display: none; }
}
