:root {
  --paper: #ffffff;
  --paper-2: #f1f0ed;
  --ink: #0a0a0a;
  --ink-2: #161616;
  --ts-paper: #6e6e6e;
  --ts-ink: #9a9a9a;
  --line-paper: #e2e0db;
  --line-ink: #2a2a2a;
  --shadow: 0 24px 70px rgba(10, 10, 10, 0.14);
  --chat-width: 380px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin-top: 0;
}

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

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px);
}

/* Cursor-fine only: hide native cursor on interactive elements so the
   custom ring/dot (cursor-fx.js) can take over. Touch/coarse pointers
   are completely untouched. */
@media (pointer: fine) and (hover: hover) {
  a,
  button,
  [data-magnetic],
  [data-work-card] {
    cursor: none;
  }
}

.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 998;
  opacity: 0;
  mix-blend-mode: difference;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid var(--paper);
  border-radius: 50%;
}

.cursor-dot {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: var(--paper);
  border-radius: 50%;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--paper);
  z-index: 999;
  mix-blend-mode: difference;
}

/* ---------- Dither backgrounds (pure CSS, no assets) ---------- */

[data-dither="hero"] {
  background-color: transparent;
  background-image: radial-gradient(circle, var(--paper) 1.15px, transparent 1.5px),
    radial-gradient(circle, var(--paper) 0.65px, transparent 1px);
  background-size: 7px 7px, 7px 7px;
  background-position: 0 0, 3.5px 3.5px;
  -webkit-mask-image: radial-gradient(
    closest-side ellipse at 50% 48%,
    #000 8%,
    rgba(0, 0, 0, 0.75) 34%,
    rgba(0, 0, 0, 0.25) 62%,
    transparent 85%
  );
  mask-image: radial-gradient(
    closest-side ellipse at 50% 48%,
    #000 8%,
    rgba(0, 0, 0, 0.75) 34%,
    rgba(0, 0, 0, 0.25) 62%,
    transparent 85%
  );
}

[data-dither="sm"] {
  background-color: transparent;
  background-image: radial-gradient(circle, var(--ink) 1.15px, transparent 1.5px),
    radial-gradient(circle, var(--ink) 0.65px, transparent 1px);
  background-size: 8px 8px, 8px 8px;
  background-position: 0 0, 4px 4px;
  -webkit-mask-image: radial-gradient(closest-side circle at 40% 45%, #000 10%, rgba(0, 0, 0, 0.6) 45%, transparent 80%);
  mask-image: radial-gradient(closest-side circle at 40% 45%, #000 10%, rgba(0, 0, 0, 0.6) 45%, transparent 80%);
}

[data-dither="foot"] {
  background-color: transparent;
  background-image: radial-gradient(circle, var(--ink) 1.15px, transparent 1.5px),
    radial-gradient(circle, var(--ink) 0.65px, transparent 1px);
  background-size: 7px 7px, 7px 7px;
  background-position: 0 0, 3.5px 3.5px;
  -webkit-mask-image: radial-gradient(
    closest-side ellipse at 50% 60%,
    #000 5%,
    rgba(0, 0, 0, 0.6) 32%,
    rgba(0, 0, 0, 0.2) 60%,
    transparent 82%
  );
  mask-image: radial-gradient(
    closest-side ellipse at 50% 60%,
    #000 5%,
    rgba(0, 0, 0, 0.6) 32%,
    rgba(0, 0, 0, 0.2) 60%,
    transparent 82%
  );
}

[data-dither="card"] {
  background-color: var(--ink-2);
}

/* ---------- Scroll-reveal hooks (motion.js / GSAP) ----------
   Elements start at their normal visible state; motion.js hides and
   re-reveals them itself (gsap.set/.from), so a no-JS or GSAP-failed
   visitor still sees all content instead of a page stuck at opacity:0. */

[data-anim="line"] > span {
  overflow: hidden;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  [data-anim="line"] > span > span {
    clip-path: none !important;
  }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--line-ink);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 2vw, 24px);
  min-height: 58px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 18px);
  min-width: 0;
}

.brand {
  font-size: clamp(14px, 3.4vw, 17px);
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-role {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ts-ink);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  flex: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav a:hover {
  opacity: 0.6;
}

/* Container query (not a viewport media query) because the available
   width here depends on whether the Agent sidebar is docked open, not
   just the window width — see container-type on .page-content. */
@container page-content (max-width: 768px) {
  .nav {
    display: none;
  }
}

.chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  background: var(--paper);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.chat-toggle:hover,
.chat-toggle[aria-expanded="true"] {
  opacity: 0.7;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(56px, 9vh, 104px) clamp(18px, 4vw, 48px) 0;
}

.hero .wrap {
  padding: 0;
  text-align: center;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ts-ink);
}

.hero h1 {
  margin: clamp(22px, 3.4vh, 38px) 0 0;
  font-size: clamp(31px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero h1 .dim {
  color: var(--ts-ink);
}

.hero-text {
  max-width: 640px;
  margin: clamp(20px, 3vh, 30px) auto 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.85;
  color: var(--ts-ink);
  text-wrap: pretty;
}

.hero-visual {
  margin: clamp(24px, 4vh, 48px) auto 0;
  width: min(720px, 92%);
  height: clamp(200px, 34vh, 380px);
}

.hero-cta-row {
  display: flex;
  justify-content: center;
  padding-bottom: clamp(40px, 6vh, 72px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 34px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background: transparent;
  color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--paper);
}

.stats-strip {
  border-top: 1px solid var(--line-ink);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stats-strip > div {
  padding: clamp(22px, 3vw, 34px) 8px;
  text-align: center;
  border-right: 1px solid var(--line-ink);
}

.stats-strip > div:last-child {
  border-right: none;
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ts-ink);
}

.stat-value {
  margin-top: 10px;
  font-size: clamp(17px, 1.9vw, 22px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ---------- Generic split section (About / Approach / Works / Experience / Contact) ---------- */

.split-section {
  background: var(--paper);
  color: var(--ink);
}

.split-section + .split-section {
  border-top: 1px solid var(--line-paper);
}

.split-section .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 88px);
}

.split-label-col {
  flex: 0 1 240px;
  min-width: 200px;
}

.section-index {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ts-paper);
}

.split-label-col h2 {
  margin: 14px 0 0;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.split-content-col {
  flex: 1 1 520px;
  min-width: 300px;
}

/* About */

#about {
  padding: clamp(72px, 11vh, 148px) 0 clamp(60px, 9vh, 116px);
}

.about-subtitle {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ts-paper);
}

.about-heading {
  margin: 0 0 clamp(28px, 4vh, 44px);
  padding-bottom: clamp(28px, 4vh, 44px);
  border-bottom: 1px solid var(--line-paper);
  font-size: clamp(23px, 2.9vw, 38px);
  font-weight: 800;
  line-height: 1.42;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}

.about-body p {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ts-paper);
  text-wrap: pretty;
}

.pill-rows {
  border-top: 1px solid var(--line-paper);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2.4vw, 40px);
  padding: clamp(24px, 3vw, 32px) 0;
  border-top: 1px solid var(--line-paper);
}

.pill-row:first-child {
  border-top: none;
}

.pill-row-label {
  flex: 0 1 160px;
  min-width: 130px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ts-paper);
  padding-top: 9px;
}

.pill-list {
  flex: 1 1 340px;
  min-width: 260px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 17px;
  border: 1px solid var(--line-paper);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pill:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Approach */

#approach {
  padding: clamp(60px, 9vh, 116px) 0 clamp(72px, 11vh, 148px);
}

.approach-visual {
  margin-top: 26px;
  width: 100%;
  max-width: 190px;
  height: 120px;
}

.approach-card {
  padding: clamp(26px, 3.6vw, 40px) 0;
  border-top: 1px solid var(--line-paper);
}

.approach-card:first-child {
  border-top: none;
}

.approach-card h3 {
  margin: 0 0 14px;
  font-size: clamp(19px, 2.1vw, 25px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.approach-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ts-paper);
  text-wrap: pretty;
}

/* Impact */

.impact {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(64px, 10vh, 128px) 0;
}

.impact-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ts-ink);
  margin-bottom: clamp(28px, 4vh, 48px);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--line-ink);
}

.impact-item {
  padding: clamp(26px, 3.2vw, 40px) clamp(14px, 2vw, 28px);
  border-bottom: 1px solid var(--line-ink);
}

.kpi-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.kpi-value {
  font-size: clamp(34px, 4.4vw, 56px);
}

.kpi-suffix {
  font-size: 15px;
  font-weight: 700;
  color: var(--ts-ink);
}

.impact-item p {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ts-ink);
  text-wrap: pretty;
}

/* Works */

#work {
  padding: clamp(72px, 11vh, 148px) 0;
}

.works-head {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 5vw, 88px);
  align-items: flex-end;
  justify-content: space-between;
}

.works-head p {
  max-width: 420px;
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ts-paper);
  text-wrap: pretty;
}

.work-group {
  margin-top: clamp(76px, 12vh, 148px);
}

.work-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: clamp(10px, 1.4vw, 18px);
}

.work-group-head h3 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.work-group-head span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ts-paper);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(16px, 2.2vw, 30px);
  row-gap: clamp(34px, 5vh, 56px);
  padding-top: clamp(30px, 4vh, 44px);
}

@media (max-width: 1100px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.work-card {
  display: block;
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  font-family: inherit;
}

.work-card-image {
  width: 100%;
  height: clamp(190px, 21vw, 285px);
  overflow: hidden;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-card:hover .work-card-image {
  transform: scale(1.03);
}

.work-card-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.work-card-meta h4 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.025em;
  /* Clamped to exactly 2 lines (with a matching min-height) so every
     card's tag row lands at the same height no matter how long its own
     title is or how narrow its column gets — a min-height alone still
     breaks once a title wraps past the reserved line count at some
     viewport width. Longer titles truncate with an ellipsis; the full
     title is still shown in the case-study detail page. */
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.work-card-year {
  flex: none;
  margin-top: 2px;
  padding: 4px 9px;
  border: 1px solid var(--line-paper);
  color: var(--ts-paper);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.work-card-tags {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ts-paper);
  text-wrap: pretty;
}

/* Experience / Resume */

#experience {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(72px, 11vh, 148px) 0;
}

#experience .wrap {
  align-items: flex-start;
}

.exp-intro {
  flex: 1 1 400px;
  min-width: 280px;
}

.exp-intro .section-index {
  color: var(--ts-ink);
}

.exp-intro h2 {
  margin: 20px 0 0;
  font-size: clamp(23px, 2.9vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.resume-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(28px, 4vh, 44px);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--paper);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.resume-download:hover {
  opacity: 0.55;
}

.exp-total {
  margin: clamp(24px, 4vh, 40px) 0 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--ts-ink);
  max-width: 360px;
  text-wrap: pretty;
}

.exp-list {
  flex: 1.15 1 470px;
  min-width: 300px;
}

.exp-row {
  padding-bottom: clamp(34px, 5vh, 52px);
  border-bottom: 1px solid var(--line-ink);
  margin-bottom: clamp(34px, 5vh, 52px);
}

.exp-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.exp-date {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ts-ink);
}

.exp-row h3 {
  margin: 12px 0 16px;
  font-size: clamp(20px, 2.3vw, 28px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.exp-row p {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--ts-ink);
  text-wrap: pretty;
}

.exp-row p + p {
  margin-top: 14px;
}

.exp-row .hl {
  color: var(--paper);
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  background-image: linear-gradient(var(--paper), var(--paper));
  background-repeat: no-repeat;
  background-position: 0 1.15em;
  background-size: 0% 1px;
}

@media (prefers-reduced-motion: reduce) {
  .exp-row .hl {
    background-size: 100% 1px;
  }
}

/* Contact */

#contact {
  padding: clamp(72px, 12vh, 152px) 0 0;
}

.contact-heading {
  margin: 0 0 clamp(32px, 5vh, 56px);
  font-size: clamp(26px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.38;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 17px 32px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-contact:hover {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.contact-location {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: clamp(28px, 4vh, 44px);
  font-size: 14px;
  color: var(--ts-paper);
}

.contact-visual {
  position: relative;
  margin-top: clamp(56px, 10vh, 120px);
  display: flex;
  justify-content: center;
}

.contact-visual > div {
  width: min(760px, 100%);
  height: clamp(160px, 26vw, 300px);
  pointer-events: none;
}

.contact-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-top: clamp(48px, 8vh, 96px);
  padding: 24px 0;
  border-top: 1px solid var(--line-paper);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ts-paper);
}

/* ---------- Case-study overlay ---------- */

.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: var(--chat-width);
  z-index: 950;
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* .no-agent is toggled on <html> by chat.js when the panel is closed,
   so the overlay reclaims the space instead of leaving a gap where a
   closed panel used to be. */
html.no-agent .overlay {
  right: 0;
}

@media (max-width: 860px) {
  .overlay {
    right: 0;
    z-index: 980;
  }
}

.overlay-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line-paper);
}

.overlay-topbar .wrap {
  max-width: 1140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
}

.overlay-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

.overlay-back:hover {
  opacity: 0.55;
}

.overlay-brand {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.overlay-count {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ts-paper);
  white-space: nowrap;
}

.overlay-hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(44px, 8vh, 92px) clamp(18px, 4vw, 48px) clamp(30px, 5vh, 50px);
}

.overlay-hero .section-index {
  color: var(--ts-paper);
}

.overlay-hero h1 {
  margin: 18px 0 0;
  font-size: clamp(30px, 4.6vw, 58px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.overlay-summary {
  max-width: 720px;
  margin: clamp(18px, 3vh, 28px) 0 0;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ts-paper);
  text-wrap: pretty;
}

.overlay-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(22px, 3.5vh, 34px);
}

.overlay-tags .year {
  padding: 7px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.overlay-tags .tag {
  padding: 7px 14px;
  border: 1px solid var(--line-paper);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ts-paper);
}

.overlay-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.overlay-gallery-band {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px) clamp(44px, 7vh, 84px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vh, 28px);
}

.overlay-gallery-band img {
  width: 100%;
  height: auto;
  display: block;
}

.overlay-facts-band {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(26px, 4vh, 42px) clamp(18px, 4vw, 48px) 0;
}

.overlay-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px clamp(20px, 3vw, 40px);
  border-top: 1px solid var(--line-paper);
  padding-top: clamp(20px, 3vh, 30px);
}

.overlay-facts-grid .k {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ts-paper);
}

.overlay-facts-grid .v {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.overlay-body-band {
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(44px, 7vh, 84px) clamp(18px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 80px);
}

.overlay-body-label {
  flex: 0 1 200px;
  min-width: 160px;
}

.overlay-body-content {
  flex: 1 1 520px;
  min-width: 280px;
}

.overlay-fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px clamp(20px, 3vw, 44px);
  padding: clamp(15px, 2.2vh, 21px) 0;
  border-top: 1px solid var(--line-paper);
}

.overlay-fact-row:first-child {
  border-top: none;
}

.overlay-fact-row .k {
  flex: 0 0 104px;
  padding-top: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ts-paper);
}

.overlay-fact-row .v {
  flex: 1 1 300px;
  min-width: 220px;
  font-size: 15px;
  line-height: 1.85;
  text-wrap: pretty;
}

.overlay-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-top: clamp(30px, 5vh, 50px);
  padding-top: clamp(24px, 4vh, 36px);
  border-top: 1px solid var(--ink);
}

.overlay-metrics .n {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.overlay-metrics .c {
  margin-top: 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ts-paper);
}

.overlay-more-band {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(44px, 8vh, 88px) clamp(18px, 4vw, 48px);
}

.overlay-more-band .inner {
  max-width: 1140px;
  margin: 0 auto;
}

.overlay-more-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ts-ink);
}

.overlay-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(16px, 2.2vw, 30px);
  margin-top: clamp(22px, 3.5vh, 34px);
}

.overlay-more-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-ink);
  overflow: hidden;
  background: none;
  padding: 0;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.overlay-more-card:hover {
  border-color: var(--paper);
}

.overlay-more-card .thumb {
  width: 100%;
  height: clamp(150px, 17vw, 220px);
  object-fit: cover;
  display: block;
}

.overlay-more-card .body {
  padding: clamp(20px, 2.4vw, 28px);
}

.overlay-more-card .cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ts-ink);
}

.overlay-more-card h3 {
  margin: 12px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.overlay-more-card p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ts-ink);
  text-wrap: pretty;
}

.overlay-more-band .back-row {
  max-width: 1140px;
  margin: clamp(28px, 4vh, 40px) auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line-ink);
}

.overlay-more-band .back-row button {
  min-height: 44px;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ts-ink);
  cursor: pointer;
}

.overlay-more-band .back-row button:hover {
  color: var(--paper);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 34px 0 50px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--ts-paper);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

/* ---------- Page shell: docked chat panel, not an overlay ----------
   The site and the chat panel sit side by side. Opening/closing the
   panel resizes the page content instead of dimming it. */

.page-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.page-content {
  flex: 1 1 auto;
  min-width: 0;
  container-type: inline-size;
  container-name: page-content;
}

/* ---------- Chat panel ----------
   Always-dark surface, independent of the light site around it, so the
   boundary between "the site" and "the agent" reads unambiguously at a
   glance. Scoped custom properties: every existing chat-* rule already
   reads var(--paper)/var(--ink)/etc., so redefining them here recolors
   the whole panel without touching those rules. */

.chat-panel {
  --paper: #1e1e1e;
  --paper-2: #363636;
  --ink: #f5f5f3;
  --ts-paper: #adadad;
  --ts-ink: #adadad;
  --line-paper: #4a4a4a;

  flex: 0 0 var(--chat-width);
  width: var(--chat-width);
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border-left: 1px solid var(--line-paper);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}

.chat-panel:not([hidden]) {
  display: flex;
}

/* Keep this 860px cutoff in sync with the matchMedia check in chat.js,
   which decides whether the panel opens by default on load. */
@media (max-width: 860px) {
  .page-shell {
    display: block;
  }

  .chat-panel {
    position: fixed;
    inset: 0;
    z-index: 970;
    width: 100%;
    height: 100%;
    box-shadow: var(--shadow);
  }
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-paper);
  font-size: 14px;
  font-weight: 700;
}

.chat-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--ts-paper);
  cursor: pointer;
}

.chat-close:hover {
  color: var(--ink);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
}

.chat-bubble {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-bubble-assistant {
  align-self: flex-start;
  background: var(--paper-2);
  color: var(--ink);
}

.chat-bubble-user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--paper);
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 16px;
}

.chat-chip {
  padding: 7px 12px;
  border: 1px solid var(--line-paper);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.chat-chip:hover {
  border-color: var(--ink);
  opacity: 0.75;
}

.chat-contact-hint {
  display: block;
  padding: 0 24px 12px;
  color: var(--ts-paper);
  font-size: 12px;
}

.chat-contact-hint:hover {
  color: var(--ink);
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line-paper);
}

.chat-input-row input {
  flex: 1;
  border: 1px solid var(--line-paper);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper-2);
}

.chat-input-row input:focus {
  outline: none;
  border-color: var(--ink);
}

.chat-input-row button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

.chat-input-row button:hover {
  opacity: 0.8;
}

.chat-input-row input:disabled,
.chat-input-row button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chat-bubble-thinking {
  color: var(--ts-paper);
  font-style: italic;
  animation: chat-thinking-pulse 1.1s ease-in-out infinite;
}

@keyframes chat-thinking-pulse {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .split-section .wrap,
  #experience .wrap {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .brand-role {
    display: none;
  }
}
