/* ============================================================
   Portfolio — LIGHT theme. Single stylesheet, no build step.
   ============================================================ */

:root {
  --bg:          #ffffff;
  --bg-soft:     #f7f8fc;
  --bg-tint:     #f1f3fa;
  --card:        #ffffff;
  --line:        #e5e8f0;
  --line-strong: #d2d8e6;
  --text:        #10131a;
  --text-soft:   #3d4657;
  --muted:       #5f6a7d;

  --accent:      #5b21b6;
  --accent-2:    #7c3aed;
  --accent-3:    #0d9488;
  --accent-warm: #b45309;

  --shadow-sm: 0 1px 2px rgba(16,19,26,.05);
  --shadow:    0 1px 2px rgba(16,19,26,.04), 0 10px 26px -14px rgba(16,19,26,.20);
  --shadow-lg: 0 2px 4px rgba(16,19,26,.05), 0 24px 48px -20px rgba(16,19,26,.26);

  --radius: 16px;
  --wrap:   1120px;
  --ease:   cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

.ico { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav.is-stuck {
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 680; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 800; font-size: 15px;
}
.nav-links { display: flex; gap: 26px; font-size: 14.5px; color: var(--muted); }
.nav-links a { transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 48px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -220px 0 auto 0; height: 680px; pointer-events: none;
  background:
    radial-gradient(560px 320px at 18% 34%, rgba(124,58,237,.13), transparent 68%),
    radial-gradient(520px 300px at 78% 10%, rgba(13,148,136,.10), transparent 68%);
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: 56px; align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 18px; padding: 6px 14px 6px 11px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-soft);
  font-size: 13px; color: var(--muted);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: #10b981;
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  line-height: 1.08; letter-spacing: -.03em; font-weight: 780;
}
.grad {
  background: linear-gradient(100deg, var(--accent) 6%, var(--accent-2) 48%, var(--accent-3) 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin: 0 0 28px; max-width: 56ch; font-size: 17.5px; color: var(--muted); }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: 11px;
  border: 1px solid transparent;
  font-size: 15px; font-weight: 620; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), border-color .25s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(91,33,182,.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(91,33,182,.8); }
.btn-ghost {
  background: #fff; border-color: var(--line-strong); color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent-2); color: var(--accent); }

/* ---------- portrait ---------- */
.hero-portrait { display: grid; place-items: center; }
.portrait-ring {
  position: relative; width: 248px; height: 248px;
  border-radius: 50%; padding: 5px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 24px 50px -22px rgba(91,33,182,.55);
  /* Stack the photo and the monogram in one grid cell so whichever is
     showing fills the ring — and never pushes the other out of it. */
  display: grid;
}
.portrait-ring::after {
  content: ""; position: absolute; inset: -16px; border-radius: 50%;
  border: 1px dashed var(--line-strong);
}
.headshot, .monogram {
  grid-area: 1 / 1;
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; background: var(--bg-tint);
}
.headshot { object-position: 50% 32%; }
.monogram {
  display: grid; place-items: center;
  font-size: 80px; font-weight: 800; letter-spacing: -.04em;
  background: linear-gradient(150deg, #eceffa, #dfe4f4); color: var(--accent);
}
/* A class-level `display` beats the UA's [hidden] rule, so re-assert it. */
.monogram[hidden] { display: none; }

/* ---------- stats strip ---------- */
.strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  margin-top: 30px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--line); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.strip-item { display: flex; flex-direction: column; gap: 3px; padding: 20px 22px; background: var(--card); }
.strip-item strong { font-size: 19px; letter-spacing: -.02em; }
.strip-item span { font-size: 13.5px; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 76px 24px 8px; }
.section-head { margin-bottom: 28px; }
.section-head h2 {
  margin: 0 0 7px; font-size: clamp(1.5rem, 3.2vw, 2rem);
  letter-spacing: -.025em; font-weight: 740;
}
.section-head p { margin: 0; color: var(--muted); }

/* ---------- project grid ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, 1fr); } }

/* Cards are plain white. The ONLY colour treatment is the thin top
   rectangle, which takes each project's brand colours via --a / --b. */
.card {
  position: relative; display: flex; flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
/* the colourful top rectangle */
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(100deg, var(--a), var(--b));
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }

.card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.card-logo {
  width: 56px; height: 56px; border-radius: 14px; flex: none;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.card-logo-wide { object-fit: contain; padding: 6px; }
.logo-fallback {
  display: grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--a), var(--b));
  color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -.02em;
}
.card-titles { min-width: 0; }

.card h3 { margin: 0 0 2px; font-size: 18.5px; letter-spacing: -.02em; font-weight: 720; }
.card-sub { margin: 0; font-size: 12.8px; color: var(--muted); }
.card-body { margin: 0 0 18px; font-size: 14.6px; color: var(--text-soft); }

.platforms { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--bg-soft);
  font-size: 11.5px; color: var(--muted); white-space: nowrap;
}
.chip .ico { width: 12px; height: 12px; }

.stack { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 4px; }
.stack span {
  padding: 4px 10px; border-radius: 7px;
  background: rgba(91,33,182,.07); border: 1px solid rgba(91,33,182,.16);
  font-size: 12.2px; color: var(--accent);
}
/* Inside a card, the chips take that card's brand colour instead of
   the page accent — a violet chip in a pink card reads as a bug. */
@supports (background: color-mix(in srgb, red 10%, white)) {
  .card .stack span {
    background: color-mix(in srgb, var(--a) 9%, #fff);
    border-color: color-mix(in srgb, var(--a) 26%, #fff);
    color: color-mix(in srgb, var(--a) 86%, #000);
  }
}
.stack-todo {
  background: var(--bg-soft) !important; border-color: var(--line) !important;
  border-style: dashed !important; color: var(--muted) !important;
}

/* ---------- store buttons ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.store {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: #fff;
  font-size: 13px; font-weight: 600; color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform .16s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.store:hover { transform: translateY(-2px); border-color: var(--accent-2); color: var(--accent); }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .card .store:hover,
  .case .store:hover {
    border-color: color-mix(in srgb, var(--a) 50%, var(--line-strong));
    color: color-mix(in srgb, var(--a) 86%, #000);
  }
}
.store .ico { width: 15px; height: 15px; }
.store small { display: block; font-weight: 500; font-size: 10.5px; color: var(--muted); line-height: 1.1; }
.store span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.store-pending { border-style: dashed; color: var(--muted); cursor: not-allowed; }
.store-pending:hover { transform: none; border-color: var(--line-strong); color: var(--muted); }

/* ---------- case studies ---------- */
.case {
  position: relative;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); box-shadow: var(--shadow-sm);
  padding: 30px; margin-bottom: 22px;
}
/* carries the same brand accent through into the detail sections */
.case::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(100deg, var(--a), var(--b));
}
@supports (background: color-mix(in srgb, red 10%, white)) {
  .case { border-color: color-mix(in srgb, var(--a) 20%, var(--line)); }
}
.case-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 6px; }
.case-logo {
  width: 68px; height: 68px; border-radius: 17px; flex: none;
  object-fit: cover; border: 1px solid var(--line); background: #fff;
  box-shadow: var(--shadow-sm);
}
.case-titles h3 { margin: 0; font-size: 23px; letter-spacing: -.025em; font-weight: 750; }
.case-tagline { margin: 3px 0 0; color: var(--accent); font-size: 14.5px; font-weight: 600; }

.spec {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; margin: 22px 0 24px;
  border: 1px solid var(--line); border-radius: 13px;
  background: var(--line); overflow: hidden;
}
.spec > div { background: var(--bg-soft); padding: 13px 15px; }
.spec dt {
  margin: 0 0 3px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
}
.spec dd { margin: 0; font-size: 14.2px; font-weight: 600; color: var(--text); }

.case-body { display: grid; grid-template-columns: 1fr; gap: 26px; }
@media (min-width: 820px) { .case-body { grid-template-columns: 1.05fr .95fr; } }
.case-body p { margin: 0 0 14px; color: var(--text-soft); font-size: 15.4px; }
.highlights { margin: 0; padding: 0; list-style: none; }
.highlights li {
  position: relative; padding-left: 26px; margin-bottom: 10px;
  font-size: 14.8px; color: var(--text-soft);
}
.highlights li::before {
  content: ""; position: absolute; left: 4px; top: .55em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
}
.case-note {
  margin-top: 18px; padding: 12px 15px;
  border: 1px dashed var(--line-strong); border-radius: 11px;
  background: var(--bg-soft); font-size: 13.4px; color: var(--muted);
}

/* ---------- about ---------- */
.about { max-width: 72ch; }
.about p { margin: 0 0 16px; color: var(--text-soft); font-size: 16.4px; }

/* ---------- contact ---------- */
.contact {
  text-align: center; padding: 52px 32px;
  border: 1px solid var(--line); border-radius: 22px;
  background:
    radial-gradient(560px 220px at 50% 0%, rgba(124,58,237,.10), transparent 70%),
    var(--bg-soft);
}
.contact h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 3.6vw, 2.2rem); letter-spacing: -.028em; }
.contact p { margin: 0 auto 26px; max-width: 46ch; color: var(--muted); }

/* ---------- footer ---------- */
.footer { margin-top: 84px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: space-between;
  padding-block: 26px; font-size: 13.5px; color: var(--muted);
}
.footer-dim { opacity: .75; }

/* ---------- scroll reveal ---------- */
.reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero { padding-top: 48px; }
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  /* Centre the portrait once the hero collapses to a single column. */
  .hero-portrait { order: -1; justify-items: center; }
  .portrait-ring { width: 168px; height: 168px; }
  .monogram { font-size: 56px; }
  .strip { grid-template-columns: 1fr; }
  .section { padding-top: 58px; }
  .case { padding: 24px; }
}
@media (max-width: 560px) {
  .nav-links { gap: 16px; font-size: 13.5px; }
  .brand-text { display: none; }
  .contact { padding: 40px 20px; }
  .case { padding: 20px; }
  .case-head { gap: 14px; }
  .case-logo { width: 56px; height: 56px; border-radius: 14px; }
  .case-titles h3 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
  .btn:hover, .card:hover, .store:hover { transform: none; }
}
