/* ============================================================
   Shinerw — studio site
   Type: Newsreader (display) · Inter (text) · system mono (labels)
   ============================================================ */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/Newsreader-var-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/Newsreader-var-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */

:root {
  --bg:        #f3f0e9;
  --bg-alt:    #eae6db;
  --surface:   #fbf9f3;
  --ink:       #14130f;
  --ink-2:     #4c4840;
  --ink-3:     #8a8477;
  --rule:      rgba(20, 19, 15, 0.14);
  --rule-strong: rgba(20, 19, 15, 0.34);
  --accent:    #c4441e;
  --accent-ink:#fdf6ec;
  --term-bg:   #100f0d;
  --term-line: rgba(255, 255, 255, 0.09);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --shell: 78rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.2, 0.7, 0.25, 1);
}

[data-theme="dark"] {
  --bg:        #121110;
  --bg-alt:    #171614;
  --surface:   #1b1a17;
  --ink:       #eeeae1;
  --ink-2:     #b4afa3;
  --ink-3:     #7f7a6e;
  --rule:      rgba(238, 234, 225, 0.14);
  --rule-strong: rgba(238, 234, 225, 0.36);
  --accent:    #e8673d;
  --accent-ink:#16110d;
  --term-bg:   #0a0a09;
  --term-line: rgba(255, 255, 255, 0.08);
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

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

a { color: inherit; }
img, svg { display: block; max-width: 100%; }

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

h1, h2, h3, h4 { margin: 0; font-weight: 400; }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 0.6rem 1.1rem; font-size: 0.85rem;
}
.skip:focus { left: 0; }

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

/* ---------- shared type ---------- */

.kicker {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.section h2,
.contact h2 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.032em;
  font-variation-settings: "opsz" 60;
  text-wrap: balance;
}

.section h2 em,
.contact h2 em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 60;
}

.section-note {
  margin: 1rem 0 0;
  max-width: 34rem;
  color: var(--ink-2);
  font-size: 0.97rem;
}

.num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn-solid {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-solid:hover { filter: brightness(0.93); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--surface); }

.btn-lg { padding: 0.88rem 1.5rem; font-size: 0.95rem; }

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem 2.5rem;
  padding-block: 0.9rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-right: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 2px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.brand-name em { font-style: normal; color: var(--accent); }

.primary {
  display: flex;
  gap: 1.6rem;
}
.primary a {
  font-size: 0.87rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
.primary a:hover,
.primary a.is-active { color: var(--ink); }
.primary a.is-active { position: relative; }
.primary a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -0.45rem;
  height: 1px;
  background: var(--accent);
}

.head-tools { display: flex; align-items: center; gap: 0.75rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink); }
.icon-btn svg {
  width: 1.05rem; height: 1.05rem;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round;
}
.icon-btn .i-moon { display: none; }
[data-theme="dark"] .icon-btn .i-sun { display: none; }
[data-theme="dark"] .icon-btn .i-moon { display: block; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(3.5rem, 8vw, 7.5rem) clamp(3rem, 6vw, 5.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.85rem, 1.1rem + 6vw, 5.7rem);
  line-height: 0.97;
  letter-spacing: -0.038em;
  font-variation-settings: "opsz" 72;
  margin: 0 0 1.6rem;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 72;
}

.lede {
  margin: 0;
  max-width: 32rem;
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.16rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.1rem;
}

.hero-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2.4rem;
  margin: 2.6rem 0 0;
  padding: 1.35rem 0 0;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--ink-3);
}
.hero-facts strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.15rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- terminal ---------- */

.hero-term {
  background: var(--term-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 40px 80px -40px rgba(0, 0, 0, 0.6),
    0 12px 28px -18px rgba(0, 0, 0, 0.45);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.62rem 0.85rem;
  border-bottom: 1px solid var(--term-line);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #8a8477;
}
.term-dots { display: flex; gap: 0.32rem; }
.term-dots i {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: #3a3730;
}
.term-title { margin-right: auto; letter-spacing: 0.02em; }
.term-badge {
  color: #8fbf8a;
  border: 1px solid rgba(143, 191, 138, 0.35);
  border-radius: 999px;
  padding: 0.05rem 0.45rem;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.term-body {
  margin: 0;
  padding: 1.15rem 1.15rem 1.4rem;
  min-height: 20.5rem;
  font-family: var(--mono);
  font-size: 0.775rem;
  line-height: 1.78;
  color: #cfc9ba;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
}
.term-body b { color: #f0ebdf; font-weight: 400; }
.term-body .c-cmd { color: #f0ebdf; }
.term-body .c-dim { color: #6c675c; }
.term-body .c-ok  { color: #8fbf8a; }
.term-body .c-file{ color: #c9a98a; }
.term-body .c-accent { color: #e8673d; }
.term-body .caret {
  display: inline-block;
  width: 0.45rem;
  height: 0.9rem;
  background: #e8673d;
  vertical-align: -0.1rem;
  animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.term-foot {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  border-top: 1px solid var(--term-line);
  font-family: var(--mono);
  font-size: 0.66rem;
  color: #6f6a5f;
  letter-spacing: 0.03em;
}
#term-status { color: #8fbf8a; }

/* ---------- ticker ---------- */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--rule);
  background: var(--surface);
  padding-block: 0.9rem;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.ticker-set {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  padding-right: 2.2rem;
  font-family: var(--mono);
  font-size: 0.71rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.ticker-set i { color: var(--accent); font-style: normal; font-size: 0.55rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
.ticker:hover .ticker-track { animation-play-state: paused; }

/* ---------- section frame ---------- */

.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--rule); }
.section[id] { scroll-margin-top: 4.5rem; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 4rem;
  align-items: end;
  margin-bottom: clamp(2.2rem, 4vw, 3.5rem);
}
.section-head .kicker { grid-column: 1 / -1; margin-bottom: -0.2rem; }
.section-head .section-note { margin: 0; align-self: end; justify-self: end; }

/* ---------- services ---------- */

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

.service {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 2rem;
  gap: 1.5rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.2s var(--ease);
}
.service .num { padding-top: 0.5rem; }
.service h3 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.1rem + 0.9vw, 1.85rem);
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin-bottom: 0.55rem;
  transition: color 0.2s var(--ease);
}
.service p {
  margin: 0;
  max-width: 48ch;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.66;
}
.service-arrow {
  align-self: center;
  justify-self: end;
  font-size: 1.1rem;
  color: var(--ink-3);
  opacity: 0;
  transform: translate(-5px, 5px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), color 0.22s var(--ease);
}
.service:hover h3 { color: var(--accent); }
.service:hover .service-arrow { opacity: 1; transform: none; color: var(--accent); }

/* ---------- work ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.4rem, 4vw, 3.6rem) clamp(1.6rem, 2.6vw, 2.6rem);
}

.work-wide { grid-column: 1 / -1; }

.work h3 {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.6rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0.85rem 0 0.5rem;
  text-wrap: balance;
}
.work p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.93rem;
  line-height: 1.62;
  max-width: 52ch;
}

.work-meta {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.work-tag { color: var(--accent); }
.work-year { margin-left: auto; }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0 0;
  padding: 0;
}
.chips li {
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.16rem 0.6rem;
  background: var(--surface);
}

/* cover photography */

.work-art {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
  background: var(--term-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  isolation: isolate;
}
.work-wide .work-art { aspect-ratio: 21 / 9; }

.work-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.03);
  transition: transform 0.7s var(--ease), filter 0.4s var(--ease);
}
.work:hover .work-art img { transform: scale(1.045); filter: saturate(1.02) contrast(1.05); }

.work-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(185deg, rgba(16, 15, 13, 0.08) 0%, rgba(16, 15, 13, 0.55) 100%),
              linear-gradient(0deg, var(--glow, #c4441e) -40%, transparent 42%);
  mix-blend-mode: multiply;
  opacity: 0.55;
  pointer-events: none;
}

.art-label {
  position: absolute;
  top: 1rem;
  left: 1.1rem;
  z-index: 1;
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(246, 242, 233, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75), 0 0 1px rgba(0, 0, 0, 0.9);
}

.art-1 { --glow: #b8451f; }
.art-2 { --glow: #2f6f6a; }
.art-3 { --glow: #6a5a2f; }
.art-4 { --glow: #7a3450; }
.art-5 { --glow: #8a5a24; }
.art-6 { --glow: #3a4a78; }

/* ---------- process ---------- */

.process {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule-strong);
}
.process > li {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.8rem 1.8rem 0 1.8rem;
  border-right: 1px solid var(--rule);
  min-height: 19rem;
}
.process > li:first-child { padding-left: 0; }
.process > li:last-child { border-right: 0; padding-right: 0; }
.process h3 {
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: -0.024em;
  margin-top: 0.4rem;
}
.process p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.62;
}
.step-meta {
  margin-top: auto;
  padding-top: 1.2rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- stack ---------- */

.stack-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.stack-grid .section-note { max-width: 27rem; }

.stack-list { margin: 0; }
.stack-list > div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--rule);
}
.stack-list > div:first-child { border-top: 1px solid var(--rule-strong); }
.stack-list dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 0.22rem;
}
.stack-list dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: -0.005em;
}

/* ---------- principles ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.8rem, 3vw, 3rem);
}
.principles article { padding-top: 1.5rem; border-top: 1px solid var(--rule-strong); }
.principles h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: -0.024em;
  margin: 0.9rem 0 0.65rem;
}
.principles p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.66;
}

/* ---------- contact ---------- */

.contact {
  padding-block: clamp(4rem, 8vw, 7rem);
  scroll-margin-top: 4.5rem;
}

.contact-inner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--surface);
  padding: clamp(2.2rem, 6vw, 5rem);
}
.contact-inner::before {
  content: "";
  position: absolute;
  right: -12%;
  top: -55%;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 62%);
  opacity: 0.14;
  filter: blur(40px);
  pointer-events: none;
}
.contact-inner > * { position: relative; }

.contact h2 { margin-bottom: 1.3rem; }

.contact-lede {
  margin: 0;
  max-width: 38rem;
  color: var(--ink-2);
  font-size: 1.02rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.2rem;
}

.contact-fine {
  margin: 1.8rem 0 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

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

.site-foot {
  border-top: 1px solid var(--rule);
  padding-block: 3.5rem 2rem;
  background: var(--bg);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.foot-brand .brand-name { font-size: 1.35rem; }
.foot-brand p {
  margin: 0.9rem 0 0;
  max-width: 20rem;
  font-size: 0.9rem;
  color: var(--ink-3);
  line-height: 1.6;
}
.foot-grid h4 {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0.35rem 0 1rem;
}
.foot-grid a {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-2);
  text-decoration: none;
  padding-block: 0.22rem;
  transition: color 0.15s var(--ease);
}
.foot-grid a:hover { color: var(--accent); }
.foot-muted { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--ink-3); }

.foot-base {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
}
.foot-base a { text-decoration: none; }
.foot-base a:hover { color: var(--accent); }

/* ---------- assistant dock ---------- */

.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;
}

.dock {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
}
.dock[hidden] { display: none; }

.dock-launch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.05rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.55);
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease);
}
.dock-launch:hover { transform: translateY(-2px); }
.dock-launch svg {
  width: 1.05rem; height: 1.05rem;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.dock-open .dock-launch { display: none; }

.dock-panel {
  display: flex;
  flex-direction: column;
  width: min(23.5rem, calc(100vw - 2rem));
  max-height: min(34rem, calc(100vh - 3rem));
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 36px 70px -30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: dock-in 0.22s var(--ease);
}
.dock-panel[hidden] { display: none; }
@keyframes dock-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
}

.dock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--rule);
}
.dock-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.dock-sub {
  margin: 0.15rem 0 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.dock-close {
  background: none;
  border: 0;
  padding: 0.15rem 0.3rem;
  font-size: 0.85rem;
  color: var(--ink-3);
  cursor: pointer;
  line-height: 1;
}
.dock-close:hover { color: var(--ink); }

.dock-log {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 12rem;
}

.msg {
  max-width: 92%;
  padding: 0.6rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.55;
}
.msg p { margin: 0; }
.msg p + p { margin-top: 0.5rem; }
.msg-bot {
  align-self: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  color: var(--ink);
}
.msg-user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--bg);
}
.msg-src {
  margin: 0.45rem 0 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.msg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  background: none;
  border: 0;
  padding: 0;
  max-width: 100%;
}
.msg-chips button {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.msg-chips button:hover { border-color: var(--ink-2); color: var(--ink); }

.dock-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem;
  border-top: 1px solid var(--rule);
}
.dock-form input {
  flex: 1;
  min-width: 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.55rem 0.7rem;
}
.dock-form input::placeholder { color: var(--ink-3); }
.dock-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.dock-send {
  display: grid;
  place-items: center;
  width: 2.35rem;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: 3px;
  cursor: pointer;
}
.dock-send svg {
  width: 1.05rem; height: 1.05rem;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.dock-send:disabled { opacity: 0.5; cursor: default; }

/* ---------- reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal:nth-child(2) { transition-delay: 0.05s; }
.js .reveal:nth-child(3) { transition-delay: 0.1s; }
.js .reveal:nth-child(4) { transition-delay: 0.15s; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-term { max-width: 40rem; }
  .section-head { grid-template-columns: 1fr; }
  .section-head .section-note { justify-self: start; margin-top: 0.4rem; }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process > li { min-height: 0; padding-bottom: 2rem; }
  .process > li:nth-child(2n) { border-right: 0; padding-right: 0; }
  .process > li:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .stack-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .principles article { padding-bottom: 0.5rem; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .head-inner { gap: 0.9rem; }
  .primary {
    order: 3;
    width: 100%;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: none;
  }
  .primary::-webkit-scrollbar { display: none; }
  .primary a { white-space: nowrap; }
}

@media (max-width: 680px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-wide { grid-column: auto; }
  .work-art,
  .work-wide .work-art { aspect-ratio: 16 / 10; }
  .service { grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; }
  .service-arrow { display: none; }
  .stack-list > div { grid-template-columns: 1fr; gap: 0.25rem; }
  .foot-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .foot-base { flex-direction: column; gap: 0.4rem; }
  .term-body { min-height: 17rem; font-size: 0.72rem; }
  .contact-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
  .term-body .caret { animation: none; }
}

@media print {
  .site-head, .ticker, .hero-term, .contact-actions, .site-foot { display: none; }
  body { background: #fff; color: #000; }
}
