/* ==========================================================================
   ADITYA LAHADE — PORTFOLIO
   Design system + components
   ========================================================================== */

/* --------------------------------------------------------- 01. TOKENS --- */
:root {
  /* Foundation — warm off-white */
  --bg:            #FAF7F1;
  --bg-raise:      #F5F0E7;
  --surface:       #EFE8DC;
  --surface-2:     #E7DED0;
  --surface-3:     #DACEBC;

  /* Lines */
  --line:          rgba(74, 46, 23, 0.13);
  --line-strong:   rgba(74, 46, 23, 0.24);
  --line-accent:   rgba(139, 94, 60, 0.38);

  /* Type — coffee */
  --text:          #2B1D13;
  --text-2:        #56412F;
  --text-3:        #6E5843;
  --text-faint:    #7D6854;

  /* Accent — roasted coffee */
  --accent:        #8B5E3C;
  --accent-bright: #6B4423;
  --accent-deep:   #4A2E17;
  --accent-wash:   rgba(139, 94, 60, 0.10);
  --accent-wash-2: rgba(139, 94, 60, 0.05);
  --teal:          #6F7F55;
  --teal-wash:     rgba(111, 127, 85, 0.12);
  --cream:         #FFFBF4;

  /* Type scale */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, 'IBM Plex Mono', Menlo, monospace;

  /* Layout */
  --max:      1240px;
  --max-text: 760px;
  --gutter:   clamp(1.25rem, 4vw, 3.5rem);
  --section:  clamp(5rem, 11vw, 9.5rem);

  /* Motion */
  --ease:     cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --radius:    14px;
  --radius-lg: 20px;
}

/* ---------------------------------------------------------- 02. RESET --- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1, 'cv11' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

/* Scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border: 3px solid var(--bg);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: #C3B39C; }

/* ------------------------------------------------------- 03. UTILITY --- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section--line { border-top: 1px solid var(--line); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--line-accent);
}

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  margin-top: 1.1rem;
  max-width: 20ch;
  letter-spacing: -0.03em;
}
.section-head p {
  color: var(--text-2);
  max-width: 62ch;
  margin-top: 1.15rem;
  font-size: clamp(1rem, 1.5vw, 1.08rem);
  line-height: 1.7;
}
.section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
}
.section-head--split h2 { margin-bottom: 0; }
.section-head--split p { margin-top: 0; padding-bottom: 0.4rem; }

.text-accent { color: var(--accent); }
.mono { font-family: var(--mono); }

/* -------------------------------------------------------- 04. BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.92rem 1.5rem;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: all 0.28s var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn svg { width: 15px; height: 15px; flex: none; transition: transform 0.28s var(--ease); }

.btn--primary {
  background: var(--accent);
  color: var(--cream);
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 26px -10px rgba(74,46,23,0.38);
}
.btn--primary:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.24) inset, 0 14px 34px -10px rgba(74,46,23,0.45);
}
.btn--primary:hover svg { transform: translateX(3px); }

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(139,94,60,0.04);
}
.btn--ghost:hover {
  border-color: var(--line-accent);
  background: var(--accent-wash);
  color: var(--accent-deep);
  transform: translateY(-2px);
}
.btn--ghost:hover svg { transform: translateY(2px); }

.btn--quiet {
  color: var(--text-2);
  padding-inline: 0.4rem;
}
.btn--quiet:hover { color: var(--accent); }
.btn--quiet:hover svg { transform: translate(2px, -2px); }

/* ----------------------------------------------------------- 05. NAV --- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(250, 247, 241, 0.86);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 76px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 0.98rem;
  white-space: nowrap;   /* never let the name wrap into the CTA */
  flex: none;
}
.nav__mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: var(--cream);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  box-shadow: 0 4px 14px -4px rgba(74,46,23,0.40);
}
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a {
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color 0.22s var(--ease);
  position: relative;
  padding-block: 0.3rem;
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after,
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a.is-active { color: var(--text); }

.nav__cta { display: flex; align-items: center; gap: 0.9rem; }
.nav__cta .btn { padding: 0.62rem 1.1rem; font-size: 0.84rem; }

.nav__burger { display: none; width: 40px; height: 40px; place-items: center; border-radius: 8px; }
.nav__burger span {
  display: block; width: 18px; height: 1.5px; background: var(--text);
  position: relative; transition: all 0.3s var(--ease);
}
.nav__burger span::before, .nav__burger span::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 1.5px; background: var(--text);
  transition: all 0.3s var(--ease);
}
.nav__burger span::before { top: -6px; }
.nav__burger span::after  { top: 6px; }
.nav.is-open .nav__burger span { background: transparent; }
.nav.is-open .nav__burger span::before { top: 0; transform: rotate(45deg); }
.nav.is-open .nav__burger span::after  { top: 0; transform: rotate(-45deg); }

/* Progress bar */
.nav__progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--teal));
  width: 0;
  transition: width 0.1s linear;
}

/* ---------------------------------------------------------- 06. HERO --- */
.hero {
  position: relative;
  padding-top: clamp(8rem, 16vw, 11rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero__grid {
  position: absolute;
  inset: -10% -10% 0 -10%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, #000 20%, transparent 72%);
  opacity: 0.75;
}
.hero__glow {
  position: absolute;
  top: -28%;
  left: 50%;
  width: min(1000px, 120vw);
  aspect-ratio: 1.5;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(139,94,60,0.16) 0%, rgba(139,94,60,0.05) 38%, transparent 68%);
  filter: blur(28px);
}
.hero__inner { position: relative; z-index: 1; }

/* Two-column lead: copy alongside the portrait */
.hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(230px, 27vw, 340px);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.hero__copy { min-width: 0; }

.hero__portrait { margin: 0; position: relative; }
.hero__portrait::before {
  /* offset block behind the frame */
  content: '';
  position: absolute;
  inset: 16px -16px -16px 16px;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-lg);
  background: var(--accent-wash-2);
}
.hero__portrait-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  box-shadow: 0 22px 50px -26px rgba(74, 46, 23, 0.45);
}
.hero__portrait-frame::after {
  /* warm the greyscale studio backdrop into the palette */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, rgba(139, 94, 60, 0.16), rgba(74, 46, 23, 0.28));
  mix-blend-mode: multiply;
  pointer-events: none;
}
.hero__portrait-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.03);
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.9rem 0.4rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  background: rgba(139,94,60,0.05);
  font-size: 0.78rem;
  color: var(--text-2);
  backdrop-filter: blur(8px);
}
.hero__pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(111,127,85,0.55);
  animation: pulse 2.4s infinite;
  margin-left: 0.35rem;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(111,127,85,0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(111,127,85,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,127,85,0); }
}

.hero__name {
  font-size: clamp(2.9rem, 8.5vw, 6.2rem);
  font-weight: 620;
  letter-spacing: -0.045em;
  line-height: 0.98;
  margin-top: 1.9rem;
  background: linear-gradient(168deg, #2B1D13 12%, #7B5334 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__role {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.9rem;
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.5vw, 0.84rem);
  letter-spacing: 0.05em;
  color: var(--text-2);
  text-transform: uppercase;
}
.hero__role span:not(.dot) { white-space: nowrap; }
.hero__role .dot { color: var(--accent); opacity: 0.65; }

.hero__statement {
  margin-top: 2.1rem;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.5;
  color: var(--text);
  max-width: 28ch;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.hero__statement strong { font-weight: 600; color: var(--accent-deep); }

.hero__sub {
  margin-top: 1.4rem;
  color: var(--text-2);
  max-width: 56ch;
  font-size: 1rem;
  line-height: 1.75;
}

.hero__actions {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.hero__meta {
  margin-top: 3.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 2.4rem;
}
.hero__meta div { min-width: 0; }
.hero__meta dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.4rem;
}
.hero__meta dd { margin: 0; font-size: 0.9rem; color: var(--text); font-weight: 500; }

/* Hero flow diagram */
.flow {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  position: relative;
  z-index: 1;
}
.flow__track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(245,240,231,0.9), rgba(250,247,241,0.5));
  overflow: hidden;
  position: relative;
}
.flow__track::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: sweep 5.5s var(--ease) infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-100%); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

.flow__node {
  padding: 1.5rem 1.15rem 1.6rem;
  border-right: 1px solid var(--line);
  position: relative;
  transition: background 0.35s var(--ease);
}
.flow__node:last-child { border-right: 0; }
.flow__node:hover { background: var(--accent-wash-2); }
.flow__node.is-lit .flow__dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash), 0 0 14px rgba(139,94,60,0.55);
}
.flow__node.is-lit .flow__label { color: var(--text); }

.flow__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--surface-3);
  margin-bottom: 1rem;
  transition: all 0.5s var(--ease);
}
.flow__num {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.35rem;
}
.flow__label {
  font-size: 0.86rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  color: var(--text-2);
  transition: color 0.4s var(--ease);
  line-height: 1.3;
}
.flow__note {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 0.45rem;
  line-height: 1.45;
}

/* --------------------------------------------------- 07. POSITIONING --- */
.pos {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.pos__lede {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--text);
  font-weight: 400;
}
.pos__lede em {
  font-style: normal;
  color: var(--accent-bright);
}
.pos__body { display: grid; gap: 1.25rem; }
.pos__body p { color: var(--text-2); line-height: 1.8; }
.pos__body p:first-child { color: var(--text); }

.pos__pills {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pill {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 0.42rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-2);
  background: rgba(139,94,60,0.04);
  transition: all 0.25s var(--ease);
}
.pill:hover {
  border-color: var(--line-accent);
  color: var(--accent-bright);
  background: var(--accent-wash);
}

/* ----------------------------------------------------- 08. KPI CARDS --- */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.kpi {
  background: var(--bg-raise);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  position: relative;
  transition: background 0.4s var(--ease);
  min-height: 210px;
  display: flex;
  flex-direction: column;
}
.kpi:hover { background: var(--surface); }
.kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s var(--ease);
}
.kpi:hover::before { transform: scaleX(1); }

.kpi__value {
  font-size: clamp(2.9rem, 6vw, 4.1rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(165deg, #2B1D13 10%, var(--accent) 125%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.kpi__label {
  margin-top: 1.1rem;
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.55;
  flex: 1;
}
.kpi__source {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.65rem;
  line-height: 1.55;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

.verified-note {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-3);
  text-transform: uppercase;
}
.verified-note svg { width: 13px; height: 13px; color: var(--teal); }

/* -------------------------------------------------- 09. CASE STUDIES --- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.filter {
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 0.82rem;
  color: var(--text-2);
  transition: all 0.25s var(--ease);
  background: rgba(139,94,60,0.04);
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--cream);
  font-weight: 550;
}

.cases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.15rem;
}
.case {
  display: flex;
  flex-direction: column;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
  position: relative;
  overflow: hidden;
  min-height: 100%;
}
.case::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(700px circle at var(--mx, 50%) var(--my, 0%), var(--accent-wash-2), transparent 42%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
.case:hover {
  transform: translateY(-4px);
  border-color: var(--line-accent);
  background: var(--surface);
}
.case:hover::after { opacity: 1; }
.case.is-hidden { display: none; }

.case__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.case__num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}
.case__cat {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border-radius: 5px;
  background: var(--accent-wash);
  color: var(--accent-bright);
  border: 1px solid var(--line-accent);
  white-space: nowrap;
}

.case__metric {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}
.case__metric b {
  font-size: clamp(1.75rem, 3.4vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--accent-bright);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.case__metric b.is-text { font-size: clamp(1.05rem, 2vw, 1.3rem); letter-spacing: -0.02em; }
.case__metric span { font-size: 0.78rem; color: var(--text-3); line-height: 1.35; }

.case__title {
  font-size: clamp(1.15rem, 2.1vw, 1.4rem);
  letter-spacing: -0.025em;
  line-height: 1.28;
  margin-bottom: 0.75rem;
}
.case__tagline {
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.65;
  flex: 1;
}

.case__org {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-3);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.case__org b { color: var(--text-2); font-weight: 500; }

.case__tech {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.case__tech span {
  font-size: 0.68rem;
  font-family: var(--mono);
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text-3);
}

.case__link {
  margin-top: 1.6rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 550;
  color: var(--accent);
  transition: gap 0.3s var(--ease);
}
.case__link svg { width: 16px; height: 16px; transition: transform 0.35s var(--ease); }
.case:hover .case__link svg { transform: translateX(4px); }

/* ---------------------------------------------------- 10. CAPABILITY --- */
.cap {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.cap__tabs {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: sticky;
  top: 100px;
}
.cap__tab {
  text-align: left;
  padding: 0.95rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--text-3);
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.28s var(--ease);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.cap__tab:hover { color: var(--text-2); background: rgba(139,94,60,0.05); }
.cap__tab.is-active {
  background: var(--surface);
  border-color: var(--line-accent);
  color: var(--text);
}
.cap__tab i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.68rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}
.cap__tab.is-active i { color: var(--accent); }

.cap__panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raise);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  min-height: 380px;
}
.cap__panel[hidden] { display: none; }
.cap__summary {
  color: var(--text);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  line-height: 1.68;
  letter-spacing: -0.012em;
  padding-bottom: 1.7rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  max-width: 62ch;
}
.cap__list { display: grid; gap: 0; }
.cap__item {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1.5rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.cap__item:last-child { border-bottom: 0; padding-bottom: 0; }
.cap__item strong {
  font-weight: 550;
  font-size: 0.95rem;
  letter-spacing: -0.012em;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}
.cap__item strong::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  transform: translateY(-2px);
}
.cap__item span { color: var(--text-3); font-size: 0.87rem; line-height: 1.6; }

/* ----------------------------------------------------- 11. LIFECYCLE --- */
.life__rail {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  background: var(--bg-raise);
  margin-bottom: 1.15rem;
}
.life__step {
  flex: 1 0 auto;
  min-width: 110px;
  padding: 1.05rem 0.9rem;
  border-right: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-3);
  transition: all 0.3s var(--ease);
  position: relative;
  text-align: center;
  white-space: nowrap;
}
.life__step:last-child { border-right: 0; }
.life__step:hover { color: var(--text-2); background: rgba(139,94,60,0.05); }
.life__step.is-active { color: var(--text); background: var(--surface); }
.life__step.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
}
.life__step i {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.6rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}
.life__step.is-active i { color: var(--accent); }

.life__panel {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 12px;
  background: linear-gradient(120deg, var(--accent-wash-2), transparent 55%), var(--bg-raise);
  padding: clamp(1.75rem, 3.4vw, 2.75rem);
  min-height: 250px;
}
.life__q {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 1.15rem;
  max-width: 24ch;
}
.life__body {
  color: var(--text-2);
  line-height: 1.8;
  max-width: 68ch;
  font-size: 1rem;
}
.life__evidence {
  margin-top: 1.8rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.life__evidence::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--teal);
  border-radius: 50%;
}
.life__fade { animation: fadeUp 0.5s var(--ease-out) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------------------------------------------- 12. EXPERIENCE --- */
.xp { display: grid; gap: 1.15rem; }
.xp__item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-raise);
  overflow: hidden;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.xp__item.is-open { border-color: var(--line-accent); background: var(--surface); }

.xp__head {
  width: 100%;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto auto;
  gap: 1.4rem;
  align-items: center;
  padding: clamp(1.35rem, 2.6vw, 1.9rem) clamp(1.35rem, 2.6vw, 2.1rem);
  text-align: left;
  transition: background 0.3s var(--ease);
}
.xp__head:hover { background: rgba(139,94,60,0.04); }

.xp__marker {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid var(--surface-3);
  background: var(--bg);
  transition: all 0.35s var(--ease);
}
.xp__item.is-open .xp__marker,
.xp__item.is-current .xp__marker {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}
.xp__item.is-current .xp__marker { animation: pulse 2.6s infinite; }

.xp__role {
  font-size: clamp(1.02rem, 1.9vw, 1.22rem);
  letter-spacing: -0.022em;
  font-weight: 570;
  margin-bottom: 0.35rem;
}
.xp__org { font-size: 0.85rem; color: var(--text-3); }
.xp__org b { color: var(--accent); font-weight: 500; }

.xp__period {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-3);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.xp__chev {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-3);
  transition: all 0.35s var(--ease);
}
.xp__chev svg { width: 13px; height: 13px; transition: transform 0.35s var(--ease); }
.xp__item.is-open .xp__chev { border-color: var(--line-accent); color: var(--accent); }
.xp__item.is-open .xp__chev svg { transform: rotate(180deg); }

.xp__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.xp__item.is-open .xp__body { grid-template-rows: 1fr; }
.xp__inner { overflow: hidden; }
.xp__content {
  padding: 0 clamp(1.35rem, 2.6vw, 2.1rem) clamp(1.6rem, 3vw, 2.2rem) calc(clamp(1.35rem, 2.6vw, 2.1rem) + 14px + 1.4rem);
  border-top: 1px solid var(--line);
  margin-top: 0.2rem;
  padding-top: 1.7rem;
}
.xp__flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.9rem;
}
.xp__block h4 {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
  font-weight: 500;
}
.xp__block p { color: var(--text-2); font-size: 0.9rem; line-height: 1.7; }
.xp__block ul { display: grid; gap: 0.6rem; }
.xp__block li {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.65;
  padding-left: 1.15rem;
  position: relative;
}
.xp__block li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.62em;
  width: 5px; height: 1px;
  background: var(--text-faint);
}
.xp__block--outcome li::before { background: var(--teal); width: 6px; height: 2px; }
.xp__block--outcome li { color: var(--text); }

/* ------------------------------------------------------- 13. METHOD --- */
.method {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.method__step {
  background: var(--bg-raise);
  padding: clamp(1.75rem, 3vw, 2.4rem);
  transition: background 0.4s var(--ease);
  position: relative;
}
.method__step:hover { background: var(--surface); }
.method__n {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 1.5rem;
}
.method__step h3 {
  font-size: 1.22rem;
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
}
.method__step p { color: var(--text-2); font-size: 0.9rem; line-height: 1.72; }

/* -------------------------------------------------------- 14. SKILLS --- */
.skills { display: grid; gap: 0; border-top: 1px solid var(--line); }
.skill-row {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(1.5rem, 2.6vw, 2.1rem) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.skill-row h3 {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  font-weight: 560;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.skill-row h3::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
  flex: none;
}
.skill-row ul { display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* -------------------------------------------------------- 15. RESUME --- */
.resume {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.resume__card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-raise) 100%);
  padding: clamp(1.75rem, 3.2vw, 2.5rem);
  position: sticky;
  top: 100px;
}
.resume__doc {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.resume__icon {
  width: 46px; height: 46px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-wash);
  border: 1px solid var(--line-accent);
  color: var(--accent);
}
.resume__icon svg { width: 21px; height: 21px; }
.resume__doc b { display: block; font-size: 0.95rem; font-weight: 560; letter-spacing: -0.015em; }
.resume__doc span { font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); }
.resume__card .btn { width: 100%; justify-content: center; }

.resume__edu { margin-top: 1.6rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.resume__edu h4 {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1rem;
  font-weight: 500;
}
.resume__edu li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}
.resume__edu li:last-child { border-bottom: 0; }
.resume__edu b { font-weight: 500; }
.resume__edu span { color: var(--text-3); font-size: 0.78rem; text-align: right; }

.resume__summary { display: grid; gap: 0; }
.resume__block {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: baseline;
}
.resume__block:first-child { padding-top: 0; }
.resume__block:last-child { border-bottom: 0; }
.resume__block h4 {
  font-size: 0.92rem;
  font-weight: 560;
  letter-spacing: -0.015em;
  color: var(--text);
}
.resume__block p { color: var(--text-2); font-size: 0.89rem; line-height: 1.72; }

/* ------------------------------------------------------- 16. CONTACT --- */
.contact { position: relative; overflow: hidden; }
.contact__glow {
  position: absolute;
  bottom: -55%;
  left: 50%;
  transform: translateX(-50%);
  width: min(950px, 115vw);
  aspect-ratio: 1.7;
  background: radial-gradient(ellipse at center, rgba(139,94,60,0.15), transparent 66%);
  filter: blur(34px);
  pointer-events: none;
}
.contact__inner { position: relative; text-align: center; }
.contact h2 {
  font-size: clamp(2rem, 5.4vw, 3.8rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 1.4rem auto 0;
  max-width: 17ch;
  background: linear-gradient(168deg, #2B1D13 18%, #7B5334 104%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contact__sub {
  margin: 1.5rem auto 0;
  max-width: 52ch;
  color: var(--text-2);
  line-height: 1.75;
}
.contact__actions {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}
.contact__grid {
  margin-top: clamp(3.5rem, 7vw, 5rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-align: left;
}
.contact__cell {
  background: var(--bg-raise);
  padding: 1.65rem;
  transition: background 0.35s var(--ease);
  display: block;
}
a.contact__cell:hover { background: var(--surface); }
.contact__cell dt {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.6rem;
}
.contact__cell dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  word-break: break-word;
}
a.contact__cell:hover dd { color: var(--accent-bright); }
.contact__cell dd svg { width: 13px; height: 13px; flex: none; opacity: 0.55; }

/* -------------------------------------------------------- 17. FOOTER --- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.4rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-3);
}
.footer__links { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.footer__links a { transition: color 0.25s var(--ease); }
.footer__links a:hover { color: var(--accent); }

/* --------------------------------------------- 18. CASE STUDY PAGE --- */
.cs-hero {
  padding-top: clamp(7.5rem, 14vw, 10rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: var(--text-3);
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
  margin-bottom: 2.4rem;
}
.cs-back svg { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.cs-back:hover { color: var(--accent); }
.cs-back:hover svg { transform: translateX(-3px); }

.cs-hero h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.9rem);
  letter-spacing: -0.04em;
  line-height: 1.06;
  margin-top: 1.3rem;
  max-width: 18ch;
}
.cs-hero__tagline {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  color: var(--text-2);
  max-width: 60ch;
  line-height: 1.6;
  letter-spacing: -0.015em;
}
.cs-hero__meta {
  margin-top: 2.8rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.75rem;
}
.cs-hero__meta dt {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.5rem;
}
.cs-hero__meta dd { margin: 0; font-size: 0.9rem; font-weight: 500; line-height: 1.5; }

/* Summary strip */
.cs-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cs-strip__cell { background: var(--bg-raise); padding: 1.75rem; }
.cs-strip__cell h4 {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
  font-weight: 500;
}
.cs-strip__cell p { font-size: 0.88rem; color: var(--text-2); line-height: 1.7; }

/* Chapters */
.cs-body {
  display: grid;
  grid-template-columns: minmax(0, 210px) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: start;
}
.cs-toc { position: sticky; top: 100px; display: grid; gap: 0.1rem; }
.cs-toc a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.52rem 0.7rem;
  border-radius: 7px;
  font-size: 0.82rem;
  color: var(--text-3);
  transition: all 0.25s var(--ease);
  border-left: 2px solid transparent;
}
.cs-toc a i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.66rem;
  color: var(--text-faint);
}
.cs-toc a:hover { color: var(--text-2); background: rgba(139,94,60,0.05); }
.cs-toc a.is-active {
  color: var(--text);
  border-left-color: var(--accent);
  background: var(--accent-wash-2);
}
.cs-toc a.is-active i { color: var(--accent); }

.chapter { padding-bottom: clamp(2.75rem, 5vw, 4rem); scroll-margin-top: 100px; }
.chapter:last-child { padding-bottom: 0; }
.chapter__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.chapter__n {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.chapter__head h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  letter-spacing: -0.03em;
}
.chapter p {
  color: var(--text-2);
  line-height: 1.85;
  max-width: 72ch;
  font-size: 1rem;
}
.chapter p + p { margin-top: 1.15rem; }

.cs-list { display: grid; gap: 0.85rem; margin-top: 0.4rem; }
.cs-list li {
  color: var(--text-2);
  line-height: 1.75;
  padding-left: 1.6rem;
  position: relative;
  font-size: 0.97rem;
}
.cs-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.72em;
  width: 8px; height: 1px;
  background: var(--accent);
}

.cs-users { display: grid; gap: 0; }
.cs-user {
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.cs-user:last-child { border-bottom: 0; }
.cs-user b { font-weight: 550; font-size: 0.94rem; letter-spacing: -0.015em; }
.cs-user span { color: var(--text-3); font-size: 0.9rem; line-height: 1.65; }

.cs-tech { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cs-tech__row {
  background: var(--bg-raise);
  padding: 1.1rem 1.4rem;
  display: grid;
  grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr);
  gap: 1.5rem;
  align-items: baseline;
}
.cs-tech__row b {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-bright);
  letter-spacing: -0.01em;
}
.cs-tech__row span { color: var(--text-3); font-size: 0.88rem; line-height: 1.6; }

.cs-impact {
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, var(--accent-wash), transparent 60%), var(--bg-raise);
  padding: clamp(1.75rem, 3.2vw, 2.5rem);
}
.cs-impact ul { display: grid; gap: 1rem; }
.cs-impact li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  color: var(--text);
  line-height: 1.65;
  font-size: 0.98rem;
}
.cs-impact li svg { width: 17px; height: 17px; flex: none; color: var(--teal); margin-top: 0.22em; }

.cs-stakeholders { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }

/* Prev / next */
.cs-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cs-nav a {
  background: var(--bg);
  padding: clamp(1.75rem, 3.4vw, 2.6rem) clamp(1.25rem, 3vw, 2.2rem);
  transition: background 0.35s var(--ease);
}
.cs-nav a:hover { background: var(--bg-raise); }
.cs-nav small {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  display: block;
  margin-bottom: 0.75rem;
}
.cs-nav b {
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1.35;
  display: block;
}
.cs-nav a:hover b { color: var(--accent-bright); }
.cs-nav .is-next { text-align: right; }

/* --------------------------------------------------- 19. ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

/* ------------------------------------------------- 20. RESPONSIVE --- */
@media (max-width: 1080px) {
  .cap { grid-template-columns: 1fr; }
  .cap__tabs {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.4rem;
    padding-bottom: 0.4rem;
  }
  .cap__tab { white-space: nowrap; flex: none; }
  .cap__tab i { display: none; }
  .cs-body { grid-template-columns: 1fr; }
  .cs-toc {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 0.3rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 2.5rem;
  }
  .cs-toc a { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; border-radius: 7px 7px 0 0; }
  .cs-toc a.is-active { border-left: 0; border-bottom-color: var(--accent); }
  .resume { grid-template-columns: 1fr; }
  .resume__card { position: static; }
}

@media (max-width: 900px) {
  /* Portrait leads, copy follows */
  .hero__top { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero__portrait { order: -1; width: min(230px, 52vw); }
  .hero__portrait::before { inset: 12px -12px -12px 12px; }

  .flow__track { grid-template-columns: repeat(3, 1fr); }
  .flow__node:nth-child(3) { border-right: 0; }
  .flow__node:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .pos { grid-template-columns: 1fr; }
  .section-head--split { grid-template-columns: 1fr; align-items: start; }
  .section-head--split p { padding-bottom: 0; }
}

@media (max-width: 780px) {
  .nav__links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(250, 247, 241, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--ease);
  }
  .nav.is-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 0.95rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
  .nav__links a::after { display: none; }
  .nav__burger { display: grid; }
  .nav__cta .btn--ghost { display: none; }

  .skill-row, .resume__block, .cs-user, .cs-tech__row, .cap__item { grid-template-columns: 1fr; gap: 0.75rem; }
  .xp__head { grid-template-columns: 14px minmax(0, 1fr) auto; row-gap: 0.5rem; }
  .xp__period { grid-column: 2 / 3; font-size: 0.72rem; }
  .xp__chev { grid-row: 1 / 3; grid-column: 3 / 4; }
  .xp__content { padding-left: clamp(1.35rem, 2.6vw, 2.1rem); }
  .hero__meta { gap: 1.5rem 2rem; }
  .cs-nav .is-next { text-align: left; }
}

@media (max-width: 560px) {
  /* Tighten the bar so brand + CTA + burger fit on one line */
  .nav__inner { gap: 0.6rem; }
  .nav__cta { gap: 0.35rem; }
  .nav__cta .btn { padding: 0.58rem 0.85rem; font-size: 0.8rem; }

  .flow__track { grid-template-columns: repeat(2, 1fr); }
  .flow__node:nth-child(3) { border-right: 1px solid var(--line); }
  .flow__node:nth-child(2n) { border-right: 0; }
  .flow__node:nth-last-child(-n+2) { border-bottom: 0; }
  .flow__node:not(:nth-last-child(-n+2)) { border-bottom: 1px solid var(--line); }
  .cases { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }
}

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

/* --------------------------------------------------------- 21. PRINT --- */
@media print {
  .nav, .hero__bg, .contact__glow, .cs-nav, .filters { display: none; }
  body { background: #fff; color: #000; }
}
