/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg:        #f1ece1;          /* warm off-white */
  --bg-rise:   #ebe6da;          /* slightly raised card */
  --bg-card:   #e3decf;
  --fg:        #1c1a17;          /* near-black, warm */
  --fg-dim:    #5a554d;          /* mid grey */
  --fg-mute:   #8a8478;          /* light grey */
  --line:      #d2cbbb;
  --line-soft: #dcd5c6;
  --accent:    #c79a1e;          /* deeper soft yellow that reads on cream */
  --accent-dim:#a07f15;

  --font-display: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* density scale, overridden by tweak */
  --gap:        clamp(20px, 2.2vw, 32px);
  --section-py: clamp(96px, 12vw, 180px);
  --gutter:     clamp(24px, 4vw, 56px);
  --row-py:     clamp(40px, 5vw, 72px);

  --max-w: 1640px;
}

:root[data-density="compact"] {
  --gap:        clamp(14px, 1.6vw, 22px);
  --section-py: clamp(64px, 8vw, 120px);
  --gutter:     clamp(20px, 3vw, 40px);
  --row-py:     clamp(24px, 3vw, 44px);
}
:root[data-density="spacious"] {
  --gap:        clamp(28px, 3vw, 44px);
  --section-py: clamp(140px, 16vw, 240px);
  --gutter:     clamp(32px, 5vw, 80px);
  --row-py:     clamp(56px, 7vw, 104px);
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { margin: 0; padding: 0; background: var(--bg); color: var(--fg); scroll-behavior: smooth; }
body { margin: 0; padding: 0; background: transparent; color: var(--fg); }
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Soft multi-color gradient backdrop — fixed full-viewport. */
html::before {
  content: "";
  position: fixed;
  inset: -10vmax;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 12% 18%,  rgba(255, 176, 120, 0.70), transparent 65%),
    radial-gradient(ellipse 55% 45% at 88% 12%,  rgba(255, 210, 90,  0.60), transparent 65%),
    radial-gradient(ellipse 60% 55% at 92% 78%,  rgba(180, 160, 230, 0.55), transparent 65%),
    radial-gradient(ellipse 65% 50% at 8% 88%,   rgba(140, 200, 180, 0.55), transparent 65%),
    radial-gradient(ellipse 40% 35% at 50% 50%,  rgba(255, 230, 200, 0.40), transparent 70%);
  filter: blur(60px) saturate(1.15);
}
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(rgba(0,0,0,0.6) 1px, transparent 1px);
  background-size: 3px 3px;
}
body > * { position: relative; z-index: 1; }
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

.shell {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* ─── Top nav ────────────────────────────────────────────────────────────── */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(241,236,225,0.72);
  border-bottom: 1px solid var(--line-soft);
}
.topnav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 56px;
  padding: 0 var(--gutter);
  gap: 24px;
}
.topnav .brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 15px;
}
.topnav .brand-mark {
  display: inline-flex; align-items: center; gap: 8px;
}
.topnav .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(199,154,30,0.22);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0px rgba(199,154,30,0.40); }
  50%      { box-shadow: 0 0 0 6px rgba(199,154,30,0.02); }
}
.topnav-links {
  display: flex; gap: 28px;
  justify-content: center;
}
.topnav-links a {
  font-size: 13px;
  color: var(--fg-dim);
  transition: color .18s ease;
  position: relative;
  padding: 6px 0;
}
.topnav-links a:hover { color: var(--fg); }
.topnav-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.topnav-status {
  font-size: 12px;
  color: var(--fg-dim);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--accent); color: var(--bg); }
.btn.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding-top: calc(56px + var(--section-py) * 0.6);
  padding-bottom: var(--section-py);
  position: relative;
}
.hero-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap);
  margin-bottom: clamp(48px, 6vw, 80px);
  color: var(--fg-dim);
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.hero-meta > div { display: flex; flex-direction: column; gap: 6px; }
.hero-meta .v { color: var(--fg); font-size: 14px; font-weight: 500; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 10vw, 180px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin: 0;
  text-wrap: balance;
}
.hero-title .word { display: block; }
.hero-title .word.alt {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.04em;
}

.hero-sub {
  margin-top: clamp(32px, 4vw, 56px);
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--gap);
  align-items: end;
}
.hero-sub .lede {
  font-size: clamp(18px, 1.6vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  max-width: 32ch;
  color: var(--fg);
  text-wrap: pretty;
}
.hero-sub .lede em {
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}
.hero-roles {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: flex-end;
}
.hero-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-dim);
}

/* ── Marquee strip ── */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  padding: 16px 0;
  margin-top: clamp(48px, 6vw, 96px);
  position: relative;
}
.strip-track {
  display: inline-flex;
  gap: 56px;
  padding-left: 56px;
  animation: marquee 38s linear infinite;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 36px);
  letter-spacing: -0.025em;
  color: var(--fg);
}
.strip-track span:nth-child(odd) { color: var(--fg-dim); }
.strip-track .star {
  color: var(--accent);
  font-weight: 400;
  transform: translateY(-2px);
  display: inline-block;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Section heading ────────────────────────────────────────────────────── */
.section {
  padding: var(--section-py) 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--gap);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.section-head .index {
  color: var(--fg-mute);
  display: flex; align-items: center; gap: 12px;
}
.section-head .index::before {
  content: ""; width: 28px; height: 1px; background: var(--fg-mute);
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.2vw, 64px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.section-head .right {
  display: flex; flex-direction: column; gap: 18px;
  align-self: end;
}
.section-head .right p {
  margin: 0;
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--fg-dim);
  max-width: 56ch;
}

/* ─── Work list ──────────────────────────────────────────────────────────── */
.worklist {
  border-top: 1px solid var(--line);
}
.workrow {
  border-bottom: 1px solid var(--line);
  display: block;
  cursor: pointer;
  position: relative;
}
.workrow-head {
  display: grid;
  grid-template-columns: 64px 1fr 1.4fr 1fr 100px 44px;
  align-items: center;
  gap: var(--gap);
  padding: var(--row-py) 4px;
  transition: padding .25s ease, background .25s ease;
  position: relative;
}
.workrow:hover .workrow-head {
  background: rgba(199,154,30,0.06);
}
.workrow .num {
  color: var(--fg-mute);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  align-self: start;
  padding-top: 8px;
}
.workrow .brand {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.8vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.96;
  margin: 0;
  transition: color .25s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
.workrow:hover .brand {
  color: var(--accent);
}
.workrow .blurb {
  color: var(--fg-dim);
  font-size: 14px;
  max-width: 44ch;
  line-height: 1.45;
}
.workrow .tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-self: center;
}
.workrow .tags .t {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-dim);
}
.workrow .year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  text-align: right;
}
.workrow .toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, border-color .2s ease, transform .35s cubic-bezier(.2,.7,.2,1);
  color: var(--fg);
  cursor: pointer;
  justify-self: end;
}
.workrow:hover .toggle { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.workrow.open .toggle { transform: rotate(45deg); background: var(--accent); border-color: var(--accent); color: var(--bg); }
.workrow.open .brand { color: var(--accent); }

/* expanded case study */
.workrow-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .55s cubic-bezier(.2,.7,.2,1);
}
.workrow.open .workrow-body { grid-template-rows: 1fr; }
.workrow-body > .inner {
  overflow: hidden;
  min-height: 0;
}
.case {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  padding: 8px 4px clamp(48px, 6vw, 88px);
  border-top: 1px dashed var(--line);
}
.case .meta-col { grid-column: 1 / span 4; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 88px; align-self: start; }
.case .body-col { grid-column: 5 / span 8; display: flex; flex-direction: column; gap: clamp(28px, 3vw, 48px); }
.case .meta-block { display: flex; flex-direction: column; gap: 6px; }
.case .meta-block .k { color: var(--fg-mute); }
.case .meta-block .v { color: var(--fg); font-size: 14px; line-height: 1.45; }
.case h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  line-height: 1.15;
}
.case p {
  margin: 0;
  font-size: clamp(15px, 1.15vw, 17.5px);
  line-height: 1.55;
  color: var(--fg);
  max-width: 64ch;
  text-wrap: pretty;
}
.case p + p { margin-top: 14px; }
.case .stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(20px, 2.4vw, 32px) 0;
}
.case .stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 60px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--accent);
}
.case .stat-lbl {
  color: var(--fg-dim);
  font-size: 13px;
  margin-top: 6px;
  max-width: 24ch;
}
.case .gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.case .gallery .ph { grid-column: span 12; }
.case .gallery .ph.half { grid-column: span 6; }
.case .gallery .ph.third { grid-column: span 4; }

/* placeholder image */
.ph {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--fg-dim);
  isolation: isolate;
}
.ph::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(135deg, transparent 0 49.4%, rgba(0,0,0,0.06) 49.4% 50.6%, transparent 50.6% 100%),
    linear-gradient(45deg,  transparent 0 49.4%, rgba(0,0,0,0.06) 49.4% 50.6%, transparent 50.6% 100%);
  background-size: 22px 22px;
  z-index: 0;
}
.ph .ph-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 1.4vw, 22px);
  justify-content: space-between;
  min-height: 100%;
}
.ph .ph-tl, .ph .ph-br {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: flex; gap: 12px;
}
.ph .ph-tl .accent { color: var(--accent); }
.ph .ph-br { justify-content: space-between; }
.ph .ph-center {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ph .ph-center .label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 1.5vw, 26px);
  letter-spacing: -0.02em;
  color: var(--fg);
  text-align: center;
  max-width: 80%;
}

/* Real image fill (when src is provided) */
.ph .ph-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: block;
}
.ph.has-image::before { display: none; }
.ph.has-image .ph-inner { color: #fff; }
.ph.has-image .ph-tl,
.ph.has-image .ph-br {
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 2px rgba(0,0,0,0.45);
}
.ph.has-image .ph-tl .accent { color: var(--accent); }

/* Contain mode: image is letterboxed/centered (phone screenshot vibe) */
.ph.fit-contain .ph-img {
  object-fit: contain;
  padding: clamp(20px, 3vw, 40px);
}
.ph.fit-contain {
  background: linear-gradient(140deg, #2a2520 0%, #1a1714 60%, #14110d 100%);
}
.ph.fit-contain .ph-inner { color: rgba(255,255,255,0.85); }
.ph .ph-center .sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-top: 6px;
  text-align: center;
}
.ph.ratio-16x9 { aspect-ratio: 16/9; }
.ph.ratio-4x3  { aspect-ratio: 4/3; }
.ph.ratio-1x1  { aspect-ratio: 1/1; }
.ph.ratio-3x4  { aspect-ratio: 3/4; }
.ph.ratio-21x9 { aspect-ratio: 21/9; }
.ph.tint-warm  { background: linear-gradient(140deg, #f6e0cc, #efd3b7 60%, #e6c19c); color: #2a2620; }
.ph.tint-cool  { background: linear-gradient(140deg, #d8e2ec, #c8d6e3 60%, #b7c9da); color: #1f2530; }
.ph.tint-green { background: linear-gradient(140deg, #d8e6dc, #c5d8cc 60%, #b3c9bc); color: #1f2a23; }
.ph.tint-mono  { background: linear-gradient(140deg, #e8e4d8, #ddd8c8 60%, #cfc9b6); color: #2a2823; }
.ph.tint-acc   { background: linear-gradient(140deg, #f4e3a6, #edd57f 60%, #e2c45a); color: #3a2e08; }
.ph.tint-cream { background: linear-gradient(140deg, #f5f0e3, #ece6d4 60%, #e0d9c2); color: #2a2620; }
.ph.tint-cream .ph-tl,
.ph.tint-cream .ph-br,
.ph.tint-cream .ph-center .sub { color: #4a463c; opacity: 0.75; }
.ph.tint-cream .ph-center .label { color: #1a1612; }

/* ─── About ──────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 5vw, 96px);
  align-items: start;
}
.about-grid--solo {
  grid-template-columns: minmax(0, 880px);
  justify-content: start;
}
.about-grid .portrait {
  position: sticky;
  top: 88px;
}

/* Full-width portrait + caption byline, aligned to the copy column width */
.byline {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 14px 22px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.4);
  margin-bottom: clamp(28px, 3vw, 40px);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.byline-portrait {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  filter: contrast(1.02);
  box-shadow: 0 0 0 1px var(--line);
  flex: 0 0 auto;
}
.byline-meta { display: flex; flex-direction: column; gap: 2px; }
.byline-side { display: flex; flex-direction: column; gap: 2px; text-align: right; margin-left: auto; }
.byline-rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
  margin: 0 4px;
  min-width: 24px;
}
.byline-label { color: var(--fg-mute); }
.byline-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.byline-status {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.byline-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(199,154,30,0.18);
}
.about-grid .copy h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 24px;
  text-wrap: balance;
}
.about-grid .copy h3 em {
  color: var(--accent);
  font-style: normal;
}
.about-grid .copy p {
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  color: var(--fg-dim);
  margin: 0 0 18px;
  max-width: 56ch;
}
.about-grid .copy p strong {
  color: var(--fg);
  font-weight: 500;
}
.about-facts {
  margin-top: clamp(40px, 4vw, 64px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.about-fact .k { color: var(--fg-mute); margin-bottom: 8px; }
.about-fact .v {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

/* ─── Skills ─────────────────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}
.skills-col { grid-column: span 4; display: flex; flex-direction: column; gap: 16px; }
.skills-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin: 0 0 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.skills-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.skills-col li {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  font-size: clamp(17px, 1.3vw, 22px);
  font-weight: 500;
  letter-spacing: -0.015em;
  padding: 4px 0;
}
.skills-col li .pct {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--fg-mute);
  font-weight: 400;
}
.skills-bar {
  grid-column: 1 / -1;
  margin-top: clamp(32px, 4vw, 48px);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.skills-bar .label { color: var(--fg-mute); }
.skills-bar .tools { display: flex; flex-wrap: wrap; gap: 8px; }
.skills-bar .tool {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-dim);
  transition: all .2s ease;
}
.skills-bar .tool:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.skills-bar .tool.ai {
  border-color: rgba(199,154,30,0.35);
  color: var(--fg);
}
.skills-bar .tool.ai::before {
  content: "◇";
  display: inline-block;
  color: var(--accent);
  margin-right: 6px;
  transform: translateY(-1px);
}
.skills-bar + .skills-bar { margin-top: clamp(16px, 1.6vw, 24px); padding-top: 16px; border-top: 1px dashed var(--line); }

/* ─── Archive ────────────────────────────────────────────────────────────── */
.archive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.archive-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 22px 18px;
  background: var(--bg-rise);
  display: flex; flex-direction: column;
  gap: 14px;
  transition: border-color .2s, transform .3s cubic-bezier(.2,.7,.2,1);
}
.archive-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.archive-card .ac-head { display: flex; justify-content: space-between; align-items: center; }
.archive-card .ac-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.025em;
}
.archive-card .ac-blurb { font-size: 13.5px; color: var(--fg-dim); line-height: 1.45; }
.archive-card .ac-meta {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ─── Brand index (Archive, second tier) ────────────────────────────────── */
.brand-index-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(56px, 7vw, 96px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.brand-index {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid transparent; /* head already provides line */
}
.brand-cell {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 6px;
  padding: 22px 18px 22px 0;
  border-bottom: 1px solid var(--line);
  cursor: default;
  transition: background .2s ease, color .2s ease;
}
/* vertical dividers between columns */
.brand-index .reveal:not(:nth-child(4n)) .brand-cell::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 1px;
  background: var(--line);
}
.brand-index .reveal:not(:nth-child(4n)) .brand-cell { padding-right: 18px; }
.brand-index .reveal:nth-child(4n+1) .brand-cell { padding-left: 0; }
.brand-index .reveal:not(:nth-child(4n+1)) .brand-cell { padding-left: 18px; }

.brand-cell:hover { background: rgba(199,154,30,0.06); }
.brand-cell:hover .bc-name { color: var(--accent); }

.brand-cell .bc-num {
  grid-row: 1 / span 2;
  color: var(--fg-mute);
  font-size: 10.5px;
  padding-top: 8px;
}
.brand-cell .bc-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  transition: color .2s ease;
  text-wrap: balance;
}
.brand-cell .bc-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: var(--fg-dim);
  font-size: 10.5px;
}
.brand-cell .bc-meta .dim { color: var(--fg-mute); }

/* ─── CTA / footer ───────────────────────────────────────────────────────── */
.cta {
  padding: clamp(120px, 16vw, 220px) 0 clamp(72px, 8vw, 120px);
  border-top: 1px solid var(--line);
  text-align: left;
}
.cta h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 8.5vw, 150px);
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin: 0 0 clamp(40px, 5vw, 64px);
  text-wrap: balance;
}
.cta h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.cta .row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap);
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.cta .row .lbl { color: var(--fg-mute); margin-bottom: 8px; }
.cta .row a, .cta .row .v {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.6vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
  display: inline-block;
}
.cta .row a:hover { color: var(--accent); border-color: var(--accent); }

footer.footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;
  align-items: center;
  color: var(--fg-mute);
  font-size: 12px;
  letter-spacing: 0.04em;
}
footer.footer .center { font-family: var(--font-mono); }

/* ─── Scroll reveal helper ───────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .workrow-head { grid-template-columns: 48px 1fr 1fr 100px 40px; }
  .workrow-head .blurb { display: none; }
  .case .meta-col { grid-column: 1 / -1; position: static; }
  .case .body-col { grid-column: 1 / -1; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-sub { grid-template-columns: 1fr; }
  .hero-roles { justify-content: flex-start; }
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .portrait { position: static; }
  .skills-col { grid-column: span 6; }
  .archive { grid-template-columns: repeat(2, 1fr); }
  .brand-index { grid-template-columns: repeat(2, 1fr); }
  .brand-index .reveal:not(:nth-child(4n)) .brand-cell::after { display: none; }
  .brand-index .reveal:nth-child(odd) .brand-cell::after {
    content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 1px; background: var(--line);
  }
  .brand-index .reveal:nth-child(odd) .brand-cell { padding-right: 18px; padding-left: 0; }
  .brand-index .reveal:nth-child(even) .brand-cell { padding-left: 18px; padding-right: 0; }
}
@media (max-width: 700px) {
  .topnav-links { display: none; }
  .topnav-inner { grid-template-columns: 1fr auto; }
  .workrow-head { grid-template-columns: 36px 1fr 70px 32px; }
  .workrow-head .tags { display: none; }
  .skills-col { grid-column: span 12; }
  .archive { grid-template-columns: 1fr; }
  .brand-index { grid-template-columns: 1fr; }
  .brand-index .reveal .brand-cell::after { display: none; }
  .brand-index .reveal .brand-cell { padding-left: 0; padding-right: 0; }
  .case .stats { grid-template-columns: 1fr; }
  .cta .row { grid-template-columns: 1fr; }
  footer.footer { grid-template-columns: 1fr; text-align: left; }
}
