/* =====================================================================
   Saud Musaddiq — Portfolio
   Design system / global stylesheet
   Brand: soft-blue editorial canvas, serif-italic display, mono labels,
   gradient project cards.  Built to be filled with real content later.
   ===================================================================== */

/* ----------------------------- Tokens ----------------------------- */
:root {
  /* Surfaces */
  --bg:           #ebf2fe;   /* page canvas (soft icy blue) */
  --bg-soft:      #f3f7ff;
  --surface:      #ffffff;   /* cards */
  --surface-2:    #f6f9ff;

  /* Ink */
  --ink:          #0c0d12;   /* near-black headings */
  --ink-2:        #2b313c;
  --muted:        #5b6473;   /* body / secondary */
  --faint:        #98a1b2;   /* tertiary / meta */

  /* Brand */
  --brand:        #1b5fe0;   /* royal blue */
  --brand-ink:    #0e47b5;
  --brand-tint:   #e7eefc;
  --brand-soft:   rgba(27, 95, 224, .10);

  /* Gradients (project accents) */
  --grad-blue:    linear-gradient(135deg, #2e7ce8 0%, #5aa0f2 100%);
  --grad-green:   linear-gradient(135deg, #0f9d57 0%, #43c281 100%);
  --grad-purple:  linear-gradient(135deg, #6d54de 0%, #9c7bea 100%);
  --grad-night:   linear-gradient(135deg, #0e3a8a 0%, #2e7ce8 100%);

  /* Lines & shadow */
  --line:         rgba(12, 13, 18, .08);
  --line-2:       rgba(12, 13, 18, .14);
  --shadow-sm:    0 1px 2px rgba(13, 26, 64, .04), 0 2px 8px rgba(13, 26, 64, .04);
  --shadow-md:    0 8px 30px rgba(13, 26, 64, .08);
  --shadow-lg:    0 24px 60px rgba(13, 26, 64, .12);

  /* Type */
  --serif: "IBM Plex Serif", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:  "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Metrics */
  --radius:    24px;
  --radius-lg: 32px;
  --radius-sm: 16px;
  --pill:      999px;
  --maxw:      1160px;
  --gutter:    clamp(16px, 5vw, 40px);
  --nav-h:     72px;

  /* 8-pt spacing scale (4-pt half-steps below 16) */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-14: 56px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ----------------------------- Reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul { list-style: none; }
::selection { background: var(--brand); color: #fff; }

/* Fine grid texture from the source design (assets/img/bg-pattern.png) */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: url("../img/bg-pattern.png") top center / cover no-repeat;
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}

/* --------------------------- Layout ------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); position: relative; z-index: 1; }
/* Single "stack gap" rhythm: sections pad only the top, so adjacent
   sections never double up. The footer provides the final gap. */
.section { padding-top: clamp(64px, 9vw, 128px); padding-bottom: 0; }
.section--tight { padding-top: clamp(48px, 6vw, 80px); padding-bottom: 0; }
main { position: relative; z-index: 1; }

/* --------------------------- Typography --------------------------- */
.display {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.01em;
  color: var(--ink);
}
.h-hero  { font-size: clamp(1.875rem, 3.2vw, 2.5rem); }
.h-1     { font-size: clamp(1.875rem, 3.2vw, 2.5rem); }
.h-2     { font-size: clamp(1.5rem, 2.6vw, 1.875rem); }
.h-3     { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 46ch;
}
.lead .ai-hl {
  color: inherit;
  font-weight: 700;
}
.lead .lead-yr { color: inherit; font-weight: 700; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}
.eyebrow--muted { color: var(--faint); }

.txt-muted { color: var(--muted); }
.serif-accent { color: var(--brand); font-style: italic; }
.dot { color: var(--ink); }

/* --------------------------- Buttons ------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-radius: var(--pill);
  font-weight: 600; font-size: 1rem;
  transition: transform .35s var(--ease), background .3s, color .3s, box-shadow .3s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .ar { transition: transform .35s var(--ease); }
.btn:hover .ar { transform: translateX(4px); }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-ink, #0e47b5); box-shadow: var(--shadow-md); }

.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-ink); box-shadow: var(--shadow-md); }

.btn--ghost { color: var(--ink); padding-inline: 4px; }
.btn--ghost:hover { color: var(--brand); }

.btn--light { background: #fff; color: var(--brand); }
.btn--light:hover { box-shadow: var(--shadow-md); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brand); font-weight: 600; font-size: 1rem;
}
.link-arrow .ar { transition: transform .35s var(--ease); }
.link-arrow:hover .ar { transform: translateX(4px); }
.hero__cta .link-arrow { font-size: 1.125rem; }
.hero__cta .link-arrow .ar { width: 17px; height: 17px; }

/* --------------------------- Navbar ------------------------------- */
.nav {
  position: sticky; top: 18px; z-index: 50;
  width: 100%; max-width: var(--maxw);
  margin: 16px auto 0;
  padding-inline: var(--gutter);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  padding: 8px 12px 8px 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s, background .3s;
}
.nav.is-stuck .nav__inner { box-shadow: var(--shadow-md); background: rgba(255,255,255,.92); }

.brand { display: inline-flex; align-items: center; gap: .6em; }
.brand__mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.brand__name { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.125rem; }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  position: relative;
  padding: 8px 16px; border-radius: var(--pill);
  font-size: 1rem; font-weight: 500; color: var(--ink);
  letter-spacing: -.01em;
  transition: color .22s var(--ease), background .22s var(--ease), transform .22s var(--ease);
}
.nav__links a:not(.nav__cta):hover {
  color: var(--brand); background: var(--brand-soft);
  transform: translateY(-1px);
}
.nav__links a.is-active {
  color: var(--brand); background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(27,95,224,.16);
}

/* Resume CTA — soft blue, understated */
.nav__links a.nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: 8px;
  color: #fff; font-weight: 600;
  background: var(--brand);
  padding: 8px 24px; gap: 8px;
  transition: color .3s, background .3s, box-shadow .3s, transform .35s var(--ease);
}
.nav__links a.nav__cta::after { display: none; }
.nav__links a.nav__cta:hover {
  color: #fff; background: var(--brand-ink, #0e47b5);
  box-shadow: var(--shadow-sm);
}
.nav__links a.nav__cta:active { transform: translateY(1px); }
.nav__links a.nav__cta svg { width: 14px; height: 14px; }

.nav__toggle { display: none; width: 42px; height: 42px; border-radius: var(--pill); }
.nav__toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px auto; transition: .3s; }

/* --------------------------- Hero --------------------------------- */
.hero { position: relative; padding-top: clamp(32px, 4vw, 48px); }
.hero__blob {
  position: absolute; top: -4%; right: -6%;
  width: clamp(320px, 42vw, 620px); aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%, rgba(46,124,232,.20), rgba(90,160,242,.05) 60%, transparent 72%);
  border-radius: 50%;
  pointer-events: none; z-index: 0;
}
.hero__top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(16px, 4vw, 40px); }
.status {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-2);
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: #19b66b; box-shadow: 0 0 0 0 rgba(25,182,107,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(25,182,107,.45)} 70%{box-shadow:0 0 0 10px rgba(25,182,107,0)} 100%{box-shadow:0 0 0 0 rgba(25,182,107,0)} }

.hero__title { position: relative; z-index: 1; max-width: 54ch; margin-inline: auto; line-height: 1.32; text-wrap: balance; }
.hero__title .grey { color: var(--brand); }
.hero__cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: clamp(24px, 4vw, 40px); }

/* Meta strip (BASED / FOCUS / STACK / EXP) */
.meta-row {
  margin-top: clamp(8px, 1.2vw, 16px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  padding-top: 12px; border-top: 1px solid var(--line);
}
.meta__k { font-family: var(--mono); font-size: 0.75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.meta__v { font-weight: 600; margin-top: 8px; font-size: 1rem; }

/* --------------------------- Hero: centered + photo --------------- */
.hero__inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  position: relative; z-index: 1;
}
.hero__lead-col {
  display: flex; flex-direction: column; align-items: center;
  max-width: 960px; margin-inline: auto;
}
.hero__lead-col .status { margin-bottom: clamp(16px, 1.8vw, 16px); font-size: 0.875rem; }
.hero__lead-col .status .status__dot { width: 9px; height: 9px; }
.hero__lead-col .lead { margin-top: clamp(16px, 2.2vw, 24px); margin-inline: auto; font-size: 1.125rem; line-height: 1.7; max-width: 62rem; text-wrap: balance; }
.hero__lead-col .hero__cta { justify-content: center; margin-top: clamp(24px, 2.8vw, 32px); }

/* Focus-area pills under the subheading */
.hero__tags {
  list-style: none; margin: clamp(16px, 2.2vw, 24px) auto 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  max-width: 640px;
}
.hero__tags li {
  font-size: 1rem; font-weight: 500; color: var(--ink-2);
  background: transparent; border: 1px solid var(--line);
  padding: 8px 16px; border-radius: var(--pill);
  letter-spacing: -.005em;
  transition: color .25s, border-color .25s;
}
.hero__tags li:hover { color: var(--brand); border-color: rgba(27,95,224,.35); }

.hero__visual {
  order: -1;                 /* photo sits above the headline */
  position: relative;
  width: min(520px, 100%); margin-inline: auto;
  min-height: 320px;
  margin-bottom: clamp(2px, 0.6vw, 8px);
  display: grid; place-items: center;
}
.hero__photo {
  position: relative; z-index: 2;
  width: min(188px, 56%); aspect-ratio: 1;
  border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #2e7ce8 0%, #1b5fe0 70%);
  box-shadow: var(--shadow-lg);
  outline: 10px solid rgba(255,255,255,.7);
  display: grid; place-items: center;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo.is-empty::after {
  content: "Add assets/img/profile.jpg";
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); text-align: center; padding: 0 16px;
}
.hero__ring { /* soft circle behind photo */
  position: absolute; z-index: 1; inset: 50% auto auto 50%;
  width: clamp(280px, 30vw, 360px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,124,232,.18), rgba(90,160,242,.05) 58%, transparent 72%);
  pointer-events: none;
}

/* Floating tool chips */
.tool {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: .55em;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 8px 16px 8px 12px;
  box-shadow: var(--shadow-md);
  font-size: 0.875rem; font-weight: 600; color: var(--ink);
  animation: floaty 6s var(--ease) infinite;
  will-change: transform;
}
.tool > svg, .tool .logo { width: 24px; height: 24px; flex: none; display: block; }
.tool span { white-space: nowrap; }
.tool--solo { padding: 12px; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .tool { animation: none; } }

/* ------------------------- Boards (2x2 grid) ---------------------- */
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 24px); }
.board {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(16px, 2.4vw, 32px);
  min-height: 168px;
  display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(16px, 2.2vw, 24px);
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
}
.board--blue   { --accent: #2e7ce8; --accent-grad: var(--grad-blue); }
.board--night  { --accent: #2e7ce8; --accent-grad: var(--grad-night); }
.board--green  { --accent: #0f9d57; --accent-grad: var(--grad-green); }
.board--purple { --accent: #6d54de; --accent-grad: var(--grad-purple); }
.board:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 52px -20px color-mix(in srgb, var(--accent) 55%, transparent);
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}
/* soft accent glow blob, top-right */
.board::before {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: var(--accent-grad);
  opacity: .14; filter: blur(8px); z-index: -1;
  transition: opacity .4s, transform .55s var(--ease);
}
.board:hover::before { opacity: .28; transform: scale(1.15); }

.board__top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.board__icon {
  width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 8px 18px -8px var(--accent);
}
.board__icon svg, .board__icon .logo { width: 21px; height: 21px; stroke: #fff; }
.board__go {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent);
  border: 1px solid var(--line);
  transition: transform .4s var(--ease), background .3s, color .3s, border-color .3s;
}
.board:hover .board__go { background: var(--accent); color: #fff; border-color: transparent; transform: translate(3px,-3px); }
.board__body { position: relative; z-index: 1; }
.board__title { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.5rem); }
.board__body p { color: var(--muted); font-size: 1rem; margin-top: 8px; max-width: 34ch; }

/* --------------------------- Section head ------------------------- */
.sec-head { margin-bottom: clamp(32px, 5vw, 48px); max-width: 720px; }
.sec-head .eyebrow { display: inline-block; margin-bottom: 16px; }
.sec-head .lead { margin-top: 16px; }
.sec-head--tight { margin-bottom: clamp(8px, 1.4vw, 16px); }
.sec-head--tight .eyebrow { margin-bottom: 8px; }
.sec-head--tight .mt-s { margin-top: 8px; }

.row-between { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* --------------------------- Cards: gradient work ----------------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2.4vw, 24px); }

.gcard {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 280px;
  padding: 24px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
  isolation: isolate;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.gcard::after { /* hover sheen */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.28));
  opacity: .85; transition: opacity .5s;
}
.gcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.gcard.is-blue   { background: var(--grad-blue); }
.gcard.is-green  { background: var(--grad-green); }
.gcard.is-purple { background: var(--grad-purple); }
.gcard.is-night  { background: var(--grad-night); }

.gcard__num {
  position: absolute; right: 14px; bottom: -6px; z-index: 1;
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: clamp(5rem, 12vw, 9rem); line-height: .8;
  color: rgba(255,255,255,.16);
  user-select: none;
}
.gcard__tag { position: relative; z-index: 2; font-family: var(--mono); font-size: 0.75rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.gcard__title { position: relative; z-index: 2; font-family: var(--serif); font-style: italic; font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 1.875rem); margin-top: auto; padding-right: 56px; }
.gcard__btn {
  position: absolute; right: 22px; bottom: 26px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
  display: grid; place-items: center; color: #fff;
  transition: background .3s, transform .35s var(--ease);
}
.gcard:hover .gcard__btn { background: rgba(255,255,255,.28); transform: rotate(0) scale(1.05); }
.gcard__meta { margin-top: 16px; }
.work-item__cap { margin-top: 16px; }
.work-item__cap .k { font-family: var(--mono); font-size: 0.75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.work-item__cap p { color: var(--muted); margin-top: 8px; font-size: 1rem; }

/* --------------------------- Split case row (work index) ---------- */
.case-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.case-row + .case-row { margin-top: clamp(16px, 2.4vw, 24px); }
.case-row:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.case-row.is-flip .case-row__media { order: 2; }
.case-row__media { min-height: 300px; background: var(--grad-blue); }
.case-row__media.is-green { background: var(--grad-green); }
.case-row__media.is-purple { background: var(--grad-purple); }
.case-row__media.is-night { background: var(--grad-night); }
.case-row__body { padding: clamp(24px, 3.4vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.case-row__body .eyebrow { margin-bottom: 16px; }
.case-row__body .h-3 { margin-bottom: 12px; }
.case-row__body .link-arrow { margin-top: 16px; }

/* --------------------------- Study cards (Figma page 1 style) ----- */
.studies { display: flex; flex-direction: column; gap: clamp(16px, 2.6vw, 32px); }
.study {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
[data-work-list] .study + .study { margin-top: clamp(16px, 2.6vw, 32px); }
.study:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.study.is-flip .study__media { order: 2; }

.study__body {
  padding: clamp(24px, 3vw, 48px);
  display: flex; flex-direction: column; justify-content: center;
}
.study__brand { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.study__logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: grid; place-items: center;
}
.study__logo--mark {
  background: var(--brand-tint); color: var(--brand-ink);
  font-family: var(--serif); font-weight: 700; font-size: 1.125rem;
}
/* Accent-themed letter badge — matches each project's accent */
.study__logo--mark.is-blue   { background: rgba(27, 95, 224, .12);  color: #1b5fe0; }
.study__logo--mark.is-night  { background: rgba(14, 58, 138, .14);  color: #0e3a8a; }
.study__logo--mark.is-green  { background: rgba(15, 157, 87, .14);  color: #0c8f50; }
.study__logo--mark.is-purple { background: rgba(109, 84, 222, .14); color: #5b3fd6; }
.study__domain {
  font-family: var(--mono); font-size: 1rem; font-weight: 700; letter-spacing: .02em;
  color: var(--ink-2);
}
.study__title {
  font-family: var(--sans); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(1.5rem, 2.6vw, 1.875rem); line-height: 1.12;
  color: var(--ink); margin-bottom: 12px;
}
.study__sum { color: var(--muted); font-size: 1rem; line-height: 1.55; max-width: 44ch; }
.study__meta {
  display: flex; gap: clamp(32px, 5vw, 56px); flex-wrap: wrap;
  margin: 24px 0 24px; padding-top: 24px; border-top: 1px solid var(--line);
}
.study__meta-item { display: flex; flex-direction: column; gap: 4px; }
.study__meta-k {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 400; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint);
}
.study__meta-v { font-weight: 600; font-size: 1.125rem; color: var(--ink); }
.study__btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand); color: #fff; font-weight: 600; font-size: 1rem;
  padding: 12px 16px; border-radius: var(--pill);
  transition: transform .35s var(--ease), background .35s var(--ease);
}
.study__btn:hover { transform: translateY(-2px); background: var(--brand-ink, #0e47b5); }
.study__btn .ar { transition: transform .35s var(--ease); }
.study__btn:hover .ar { transform: translate(3px, 0); }

.study__media {
  position: relative; min-height: 320px; background: var(--grad-blue);
  display: grid; place-items: center; overflow: hidden;
}
.study__media.is-green { background: var(--grad-green); }
.study__media.is-purple { background: var(--grad-purple); }
.study__media.is-night { background: var(--grad-night); }
.study__media-ph {
  font-family: var(--serif); font-weight: 700; font-size: clamp(3.4rem, 8vw, 6rem);
  color: rgba(255,255,255,.22); line-height: 1;
}

/* --------------------------- Filter pills ------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip {
  padding: 8px 16px; border-radius: var(--pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 1rem; font-weight: 500; color: var(--ink-2);
  transition: all .25s;
}
.chip:hover { border-color: var(--line-2); }
.chip.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* --------------------------- Plain white cards -------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(24px, 2.6vw, 32px);
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-2); }

.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2vw, 24px); }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 1.6vw, 16px); }

/* numbered service card */
.svc__n {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--brand-tint); color: var(--brand);
  font-family: var(--mono); font-weight: 700; font-size: 0.875rem;
  margin-bottom: 16px;
}
.svc__title { font-weight: 700; font-size: 1.125rem; margin-bottom: 8px; }
.svc__title .arrow-inline { color: var(--brand); }
.svc p { color: var(--muted); font-size: 1rem; }

.step__n { font-family: var(--mono); color: var(--brand); font-weight: 700; font-size: 0.875rem; letter-spacing: .08em; }
.step h4 { font-weight: 700; font-size: 1.125rem; margin: 8px 0 8px; }
.step p { color: var(--muted); font-size: 1rem; }

/* --------------------------- Tags / pills (about) ----------------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 8px 16px; border-radius: var(--pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 1rem; font-weight: 500; color: var(--ink-2);
  transition: border-color .25s, transform .25s;
}
.tag:hover { border-color: var(--brand); transform: translateY(-2px); }

/* --------------------------- Timeline (experience) ---------------- */
.tl-item {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 24px;
  transition: border-color .3s, transform .3s var(--ease);
}
.tl-item + .tl-item { margin-top: 16px; }
.tl-item:hover { border-color: var(--line-2); transform: translateX(4px); }
.tl-item__when { font-family: var(--mono); color: var(--brand); font-weight: 700; font-size: 0.875rem; letter-spacing: .04em; }
.tl-item__role { font-weight: 700; font-size: 1.125rem; }
.tl-item__desc { color: var(--muted); font-size: 1rem; margin-top: 4px; }

/* --------------------------- About portrait ---------------------- */
.about-grid { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.portrait {
  aspect-ratio: 4 / 5; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #dbe7fb, #fff);
  border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--faint);
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: .14em; text-transform: uppercase;
}
.about-copy p { color: var(--muted); margin-bottom: 16px; max-width: 56ch; }
.about-copy p:last-child { margin-bottom: 0; }

/* --------------------------- CTA banner --------------------------- */
.cta-band {
  position: relative; overflow: hidden;
  background: var(--grad-night); color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band::before { content:""; position:absolute; right:-60px; top:-60px; width:280px; height:280px; border-radius:50%; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%); }
.cta-band__title { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 1.875rem); position: relative; }
.cta-band p { color: rgba(255,255,255,.82); margin-top: 8px; max-width: 40ch; position: relative; }

/* --------------------------- Case study ban ---------------------- */
.back-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--pill); padding: 8px 16px;
  font-size: 1rem; font-weight: 600; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease);
}
.back-pill:hover { transform: translateX(-3px); color: var(--brand); }

.cs-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 32px; }
.cs-hero-media { margin-top: 40px; aspect-ratio: 16/9; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display:grid; place-items:center; color: var(--faint); font-family: var(--mono); font-size:0.75rem; letter-spacing:.14em; text-transform:uppercase; }

.prose { max-width: 760px; }
.prose h2 { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 1.875rem); margin: clamp(32px, 5vw, 48px) 0 16px; }
.prose p { color: var(--muted); margin-bottom: 16px; }

.results {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow-sm); margin-top: 40px;
}
.results__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 16px; }
.stat__v { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: clamp(1.875rem, 3.2vw, 2.5rem); }
.stat__k { color: var(--muted); font-size: 1rem; margin-top: 4px; }

/* --------------------------- Contact ------------------------------ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 56px); align-items: start; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 16px; color: var(--ink);
  transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field textarea { min-height: 130px; resize: vertical; }

.contact-list li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .k { font-family: var(--mono); font-size: 0.75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); width: 90px; }
.contact-list a { font-weight: 600; }
.contact-list a:hover { color: var(--brand); }

/* --------------------------- Footer ------------------------------- */
.footer { padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(32px, 4vw, 48px); }
.footer__card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(32px, 4vw, 48px);
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px;
  box-shadow: var(--shadow-sm);
}
.footer__about p { color: var(--muted); font-size: 1rem; margin: 16px 0 8px; max-width: 32ch; }
.footer__copy { color: var(--faint); font-size: 0.875rem; }
.footer__col h5 { font-weight: 700; font-size: 1rem; margin-bottom: 16px; }
.footer__col a { display: block; color: var(--muted); padding: 4px 0; font-size: 1rem; transition: color .25s; }
.footer__col a:hover { color: var(--brand); }

/* --------------------------- Reveal anim -------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* --------------------------- Utilities ---------------------------- */
.mt-s { margin-top: 16px; } .mt-m { margin-top: 24px; } .mt-l { margin-top: 48px; }
.text-center { text-align: center; }
.hide { display: none !important; }

/* --------------------------- Responsive --------------------------- */
@media (max-width: 960px) {
  .hero__visual { min-height: 340px; width: min(460px, 80%); }
  .boards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .work-grid, .cards-2, .cards-3 { grid-template-columns: 1fr; }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .case-row { grid-template-columns: 1fr; }
  .case-row.is-flip .case-row__media { order: 0; }
  .case-row__media { min-height: 220px; }
  .study { grid-template-columns: 1fr; }
  .study.is-flip .study__media { order: 0; }
  .study__media { min-height: 220px; order: 0; }
  .study__body { order: 1; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .meta-row, .cs-meta { grid-template-columns: repeat(2, 1fr); }
  .results__grid { grid-template-columns: 1fr; }
  .footer__card { grid-template-columns: 1fr 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 620px) {
  .nav__links { position: fixed; inset: 88px 16px auto; flex-direction: column; align-items: stretch;
    background: rgba(255,255,255,.96); backdrop-filter: blur(14px);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 8px;
    box-shadow: var(--shadow-lg); transform-origin: top; transform: scaleY(.9); opacity: 0;
    pointer-events: none; transition: opacity .25s, transform .25s; }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 12px 16px; }
  .nav__links a:not(.nav__cta)::after { display: none; }
  .nav__links a.nav__cta { margin-left: 0; margin-top: 4px; justify-content: center; }
  .nav__toggle { display: block; }
  .meta-row { grid-template-columns: 1fr 1fr; }
  .cards-4 { grid-template-columns: 1fr; }
  .footer__card { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .boards { grid-template-columns: 1fr; }
  .hero__visual { min-height: 300px; width: min(360px, 82%); }
  .tool span { display: none; }
  .tool { padding: 8px; }
  /* Center card content on small screens to match the centered layout */
  .study__body { align-items: center; text-align: center; }
  .study__brand { justify-content: center; }
  .study__sum { max-width: 38ch; }
  .study__meta { justify-content: center; }
  .study__btn { align-self: center; }
}
