/* ============================================================
   Azan Asghar — Portfolio
   Design system: light theme, rounded shapes, generous whitespace
   Tokens (from the reference design files you supplied):
     bg #ffffff · bg-secondary #0a0a0a · section #efefec
     text #101010 · text-secondary #666666
     primary #888888 · secondary #aaaaaa · border #fafafa
     headings: Anton (400) · body: Segoe UI · kickers: IBM Plex Mono
     script eyebrow: Caveat · base spacing unit 12px
     card radius 24px · button radius 16px · pill radius 999px
     card shadow: rgba(0,0,0,.30) 0 18px 40px -26px
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-dark: #0a0a0a;
  --bg-section: #efefec;
  --text: #101010;
  --text-secondary: #666666;
  --primary: #888888;
  --secondary: #aaaaaa;
  --border: #fafafa;
  --card: #ffffff;
  --off-white: #fbfbfa;
  --shadow-card: rgba(0, 0, 0, 0.3) 0px 18px 40px -26px;
  --shadow-soft: rgba(0, 0, 0, 0.45) 0px 14px 30px -18px;
  --font-heading: "Anton", "Arial Narrow", "Segoe UI", sans-serif;
  --font-body: "Segoe UI", "Segoe UI Variable Text", "Helvetica Neue", system-ui, -apple-system, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-script: "Caveat", cursive;
  --radius-card: 24px;
  --radius-btn: 16px;
  --radius-pill: 999px;
  --max: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Loader ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .5s ease, visibility .5s;
}

.loader.done {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  text-align: center;
}

.loader-name {
  font-family: var(--font-heading);
  font-size: clamp(40px, 8vw, 84px);
  letter-spacing: 1px;
  display: block;
}

.loader-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--secondary);
  display: block;
  margin-top: 12px;
}

.loader-count {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--primary);
  display: block;
  margin-top: 24px;
}

/* ---------- Floating pill nav ---------- */
.nav-wrap {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 12px;
}

.nav {
  width: min(var(--max), 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: var(--radius-pill);
  padding: 8px 12px 8px 20px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.logo {
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 24px;
  text-decoration: none;
  letter-spacing: 1px;
}

.logo-img {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
}

.nav-links a:hover {
  background: var(--bg-section);
}

.nav-cta {
  background: var(--bg-dark) !important;
  color: #fff !important;
}

.nav>.nav-cta {
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  background: var(--off-white);
  color: #111;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: var(--radius-btn);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
}

.btn-dark {
  background: var(--bg-dark);
  color: #fff;
  border-color: transparent;
  border-radius: var(--radius-pill);
  padding: 16px 28px;
  font-size: 13px;
  letter-spacing: .5px;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, .25);
  border-radius: var(--radius-pill);
  padding: 16px 28px;
  font-size: 13px;
  letter-spacing: .5px;
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 700;
}

.btn-light {
  background: #fff;
  color: #000;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 14px 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
}

.btn:hover {
  opacity: .88;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 144px 24px 0;
  overflow: hidden;
}

.hero-watermark {
  position: absolute;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-heading);
  white-space: nowrap;
  font-size: clamp(120px, 22vw, 300px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 0, 0, .07);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: -35px auto 0;
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 48px;
  align-items: center;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  color: var(--text-secondary);
}

.eyebrow {
  font-family: var(--font-script);
  font-size: 44px;
  font-weight: 700;
  margin: 2px 0 0;
  transform: rotate(-2deg);
}

.hero h1 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(72px, 10vw, 132px);
  line-height: .92;
  margin: 0;
  letter-spacing: 1px;
}

.hero-roles {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(24px, 7vw, 32px);
  line-height: 1.05;
  margin: 16px 0 0;
  letter-spacing: .5px;
}

.role-outlined {
  color: transparent;
  -webkit-text-stroke: 1.5px #101010;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 12px;
}

.skill-pills span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}

.loc-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: #0a0a0a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.hero-meta small {
  display: block;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
}

.scroll-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, .25);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.portrait-frame {
  position: relative;
  margin-top: -8
  0px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  aspect-ratio: auto;
  overflow: visible;
}

.portrait-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 96px;
  color: #101010;
  z-index: 0;
}

.portrait-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
}

.portrait-frame.no-photo {
  background: #efefec;
  border-radius: 26px;
  aspect-ratio: 4 / 5;
}


.deco-dot {
  position: absolute;
  border-radius: 50%;
  background: #0a0a0a;
  z-index: 3;
  pointer-events: none;
}

.deco-dot.dot-a {
  width: 14px;
  height: 14px;
  bottom: 18%;
  right: 2%;
}

.deco-dot.dot-b {
  width: 10px;
  height: 10px;
  top: 42%;
  right: -6px;
}

.portrait-caption {
  font-style: italic;
  color: var(--text-secondary);
  text-align: center;
}

/* ---------- Ticker / marquees ---------- */
.ticker {
  margin-top: 72px;
  background: var(--bg-dark);
  color: #fff;
  overflow: hidden;
  padding: 14px 0;
  transform: rotate(-1deg) scale(1.02);
}

.ticker-track,
.marquee-track {
  display: flex;
  width: max-content;
  animation: scroll 28s linear infinite;
}

.ticker-track span {
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1px;
  white-space: nowrap;
}

@keyframes scroll {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 128px 24px;
}

.section-alt {
  background: var(--bg-section);
  max-width: none;
  padding-left: max(24px, calc((100vw - var(--max)) / 2));
  padding-right: max(24px, calc((100vw - var(--max)) / 2));
}

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--primary);
}

.display {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(48px, 6.5vw, 88px);
  line-height: .95;
  margin: 12px 0 36px;
  letter-spacing: .5px;
}

.lead {
  font-size: 19px;
}

.fact-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.fact-list li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.about-portrait {
  position: relative;
  border-radius: 999px 999px 26px 26px;
  overflow: hidden;
  background: #efefec;
  box-shadow: rgba(0, 0, 0, 0.30) 0px 18px 40px -26px;
  aspect-ratio: 3 / 4;
  align-self: start;
}

.about-portrait .portrait-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 56px;
  color: #101010;
  z-index: 0;
}

.about-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(1);
  z-index: 1;
}

.about-portrait.no-photo {
  background: #efefec;
}

.about-pill {
  position: absolute;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
  white-space: nowrap;
  pointer-events: none;
}

.about-pill.pill-black {
  background: #0a0a0a;
  color: #fff;
  top: 14px;
  right: -10px;
}

.about-pill.pill-white {
  background: #fff;
  color: #000;
  border: 1px solid rgba(0, 0, 0, .12);
  bottom: 18px;
  left: -10px;
}

.about-portrait .deco-dot.dot-c {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0a0a0a;
  top: 46%;
  right: -4px;
  z-index: 3;
  pointer-events: none;
}

.fact-grid {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 20px;
  overflow: hidden;
}

.fact-grid li {
  padding: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.fact-grid li:nth-child(odd) {
  border-right: 1px solid rgba(0, 0, 0, .08);
}

.fact-grid li:nth-last-child(-n+2) {
  border-bottom: none;
}

.fact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.about-speech {
  background: #0a0a0a;
  color: #fff;
  font-family: var(--font-script);
  font-size: 30px;
  font-weight: 700;
  padding: 16px 22px;
  border-radius: 16px;
  width: 78%;
  margin-left: auto;
  transform: rotate(-2deg);
}

#about .about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 48px;
}

#about .about-portrait {
  grid-row: 1 / span 2;
}

#about .stats {
  grid-column: 2;
}

.about-grid>*,
.person-grid>*,
.contact-grid>* {
  min-width: 0;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
}

.stat {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 56px;
  display: block;
  line-height: 1;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ---------- Cards & grids ---------- */
.problem-grid,
.service-grid,
.work-grid,
.design-grid,
.process-grid {
  display: grid;
  gap: 24px;
}

.problem-grid {
  grid-template-columns: repeat(4, 1fr);
}

.service-grid {
  grid-template-columns: repeat(4, 1fr);
}

.work-grid {
  grid-template-columns: repeat(4, 1fr);
}

.design-grid {
  grid-template-columns: repeat(3, 1fr);
}

.process-grid {
  grid-template-columns: repeat(4, 1fr);
}

.problem-card,
.service-card,
.work-card,
.design-card,
.process-step {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.problem-card h3,
.service-card h3,
.work-card h3,
.process-step h3 {
  margin-top: 0;
  font-size: 20px;
}

.problem-num {
  display: none;
}

.service-icon {
  display: none;
}

.service-num,
.step-num {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--primary);
}

.tags {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .5px;
  color: var(--text-secondary);
}

.status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  border-radius: var(--radius-pill);
  padding: 6px 12px;
}

.status.done {
  background: #e8f5e9;
  color: #2e7d32;
}

.status.in-progress {
  background: #fff3e0;
  color: #e65100;
}

.section-cta {
  margin-top: 36px;
  font-weight: 600;
}

.work-controls {
  display: none;
}

.work-preview {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 999px;
  padding: 10px 18px;
}

.work-thumb {
  position: relative;
  overflow: hidden;
  height: 150px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  margin-bottom: 20px;
  background: var(--bg-section);
}

.thumb-text {
  font-family: var(--font-heading);
  font-size: 52px;
  letter-spacing: 2px;
}

.work-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.work-thumb .thumb-hover {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.work-card:hover .work-thumb .thumb-hover {
  opacity: 1;
}

.thumb-karigar {
  background: #e3f2fd;
}

.thumb-foodtable {
  background: #ffebee;
}

.thumb-nova {
  background: #f3e5f5;
}

.thumb-crm {
  background: #e8f5e9;
}

.thumb-pos {
  background: #fff3e0;
}

.thumb-booking {
  background: #e0f2f1;
}

.thumb-zynk {
  background: #fce4ec;
}

.thumb-chess {
  background: #efebe9;
}

.thumb-db {
  background: #e8eaf6;
}

.person-portrait {
  position: relative;
  background: transparent;
  overflow: visible;
  align-self: start;
}

.person-pill {
  display: none;
}

.person-watermark {
  position: absolute;
  top: -8px;
  left: -8px;
  font-family: var(--font-heading);
  font-size: clamp(72px, 11vw, 150px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 0, 0, .12);
  z-index: 0;
  white-space: nowrap;
  pointer-events: none;
}

.person-portrait .portrait-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 56px;
  color: #101010;
  z-index: 0;
}

.person-portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
}

.person-portrait.no-photo {
  background: #efefec;
  border-radius: 26px;
  aspect-ratio: 3 / 4;
}

.person-portrait .deco-dot.dot-d {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0a0a0a;
  top: 30%;
  left: -6px;
  z-index: 3;
  pointer-events: none;
}

.person-portrait .deco-dot.dot-e {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #0a0a0a;
  top: 52%;
  left: -14px;
  z-index: 3;
  pointer-events: none;
}

.person-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.person-pills span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
}

.person-script {
  font-family: var(--font-script);
  font-size: 32px;
  font-weight: 700;
  margin-top: 16px;
}

#person .person-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 48px;
}

#person .person-portrait {
  grid-row: 1 / span 4;
}

.portrait-frame.no-photo .portrait-initials,
.about-portrait.no-photo .portrait-initials,
.person-portrait.no-photo .portrait-initials {
  color: #101010;
}

.mock {
  background: var(--bg-dark);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 170px;
  aspect-ratio: 16 / 10;
}

.design-img-frame {
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  background: #0a0a0c;
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .14);
  position: relative;
  cursor: zoom-in;
  transition: box-shadow 0.35s ease;
}

.design-card:nth-child(3) .design-img-frame {
  background: #0f111a;
}

.design-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.design-card:nth-child(3) .design-img-frame img {
  object-position: left top;
}

.design-card:hover .design-img-frame img {
  transform: scale(1.035);
}

.design-card:hover .design-img-frame {
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, .22);
}

/* ---------- Lightbox Modal ---------- */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-inner {
  position: relative;
  max-width: min(92vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.92);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.open .lightbox-inner {
  transform: scale(1);
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lightbox-caption {
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  margin-top: 14px;
  text-align: center;
  opacity: 0.85;
  letter-spacing: 0.3px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.mock-bar {
  height: 14px;
  width: 45%;
  background: rgba(255, 255, 255, .85);
  border-radius: 8px;
}

.mock-row {
  height: 26px;
  background: rgba(255, 255, 255, .16);
  border-radius: 8px;
}

.mock-row.short {
  width: 60%;
}

.design-card figcaption {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* ---------- Stack marquees ---------- */
.marquee-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.marquee-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin: 0;
}

.marquee {
  overflow: hidden;
  border-top: 1px solid rgba(0, 0, 0, .08);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  padding: 12px 0;
  cursor: default;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track > span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.tool-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 28px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  vertical-align: middle;
  padding: 4px 6px;
  border-radius: 8px;
  color: var(--text);
  transition: transform 0.2s ease, color 0.2s ease;
}

.tool-item:hover {
  transform: translateY(-2px);
  color: #000;
}

.tool-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: currentColor;
  display: inline-block;
  vertical-align: middle;
}

.tool-sep {
  margin: 0 16px;
  font-size: 13px;
  opacity: 0.35;
  display: inline-block;
  vertical-align: middle;
}

/* ---------- Pipeline ---------- */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}

.pipe-step {
  flex: 1;
  min-width: 150px;
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.pipe-step strong {
  display: block;
  font-size: 15px;
}

.pipe-step span {
  color: var(--text-secondary);
  font-size: 13px;
}

.pipe-arrow {
  align-self: center;
  font-size: 22px;
  color: var(--primary);
}

.pipeline-note {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
}

.live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2e7d32;
  margin-right: 6px;
}

/* ---------- Contact (dark) ---------- */
.section-dark {
  background: var(--bg-dark);
  color: #fff;
  max-width: none;
  padding-left: max(24px, calc((100vw - var(--max)) / 2));
  padding-right: max(24px, calc((100vw - var(--max)) / 2));
}

.kicker-light {
  color: var(--secondary);
}

.display-light {
  color: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
}

.contact-form {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius-card);
  padding: 28px;
}

.contact-form h3,
.contact-info h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: 1px;
}

.contact-form label {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .5px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: inherit;
  font-weight: 400;
}

.contact-form select option {
  background: #181818;
  color: #fff;
  padding: 8px;
}

.phone-input-group {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 8px;
}

.phone-input-group select {
  flex: 0 0 145px;
  max-width: 155px;
  margin-top: 0;
  cursor: pointer;
  font-size: 13.5px;
}

.phone-input-group input {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, .5);
}

.form-note {
  color: rgba(255, 255, 255, .6);
  font-size: 13px;
}

.contact-info ul {
  list-style: none;
  padding: 0;
}

.contact-info li {
  margin-bottom: 20px;
}

.response-note {
  color: var(--secondary);
}

/* ---------- Footer & game ---------- */
.footer {
  background: var(--bg-dark);
  color: #fff;
  padding: 96px 24px 48px;
  text-align: center;
}

.footer .display {
  color: #fff;
}

.game {
  max-width: 520px;
  margin: 0 auto;
}

.game-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.diff-btn {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.diff-btn.active {
  background: #fff;
  color: #000;
}

.game-status {
  min-height: 24px;
  color: var(--secondary);
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
}

.cell {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 20px;
  font-family: var(--font-heading);
  font-size: 52px;
  color: #fff;
  cursor: pointer;
}

.cell:disabled {
  cursor: default;
  opacity: .9;
}

.cell.win {
  background: rgba(255, 255, 255, .22);
}

.score {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--secondary);
}

.footer-nav,
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 48px;
}

.footer-nav a,
.footer-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
}

.signoff {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--secondary);
  margin-top: 36px;
  line-height: 2;
}

.back-top {
  display: inline-block;
  margin-top: 24px;
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {

  .problem-grid,
  .service-grid,
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inner,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  #about .about-grid {
    grid-template-columns: 42% 58%;
  }

  #about .stats {
    grid-column: 1 / -1;
  }

  #person .person-grid {
    grid-template-columns: 42% 58%;
  }

  .hero-portrait {
    max-width: 420px;
  }

  #work .work-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 24px 24px;
    margin-left: -24px;
    margin-right: -24px;
    scrollbar-width: none;
  }

  #work .work-grid::-webkit-scrollbar {
    display: none;
  }

  #work .work-card {
    flex: 0 0 clamp(300px, 84vw, 420px);
    scroll-snap-align: center;
  }

  .work-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
  }

  .work-arrow {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .2);
    background: #fff;
    cursor: pointer;
    font-size: 18px;
  }

  .work-counter {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    white-space: nowrap;
  }

  .work-swipe {
    flex: 1;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 999px;
    padding: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 80px 20px;
  }

  .hero {
    padding-top: 120px;
  }

  .problem-grid,
  .service-grid,
  .design-grid,
  .process-grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .nav {
    justify-content: space-between;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: none;
  }

  .hero-inner {
    display: block;
    position: relative;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
  }

  .hero h1 {
    font-size: clamp(54px, 17vw, 76px);
  }

  .hero-copy h1,
  .hero-copy .hero-roles {
    max-width: 56%;
  }

  .hero-portrait {
    position: absolute;
    top: 107px;
    right: 20px;
    width: 44%;
    max-width: none;
    z-index: 1;
  }

  .portrait-caption {
    display: none;
  }


  .deco-dot.dot-a {
    width: 10px;
    height: 10px;
  }

  .deco-dot.dot-b {
    width: 8px;
    height: 8px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .skill-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-left: -24px;
    margin-right: -24px;
    padding: 0 24px 10px;
    scrollbar-width: none;
  }

  .skill-pills::-webkit-scrollbar {
    display: none;
  }

  .skill-pills span {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  #about .about-grid {
    grid-template-columns: 44% 1fr;
    gap: 16px;
    align-items: center;
  }

  #about .about-text {
    display: contents;
  }

  #about .about-portrait {
    grid-row: 1;
    grid-column: 1;
    width: 100%;
    align-self: center;
  }

  #about .about-portrait .portrait-initials {
    display: none;
  }

  #about .about-pill {
    font-size: 8px;
    padding: 5px 9px;
    letter-spacing: 0.8px;
  }

  #about .about-pill.pill-black {
    top: 10px;
    right: 6px;
  }

  #about .about-pill.pill-white {
    bottom: 12px;
    left: 6px;
  }

  #about .about-lead-wrap {
    grid-row: 1;
    grid-column: 2;
    align-self: center;
  }

  #about .about-lead-wrap .lead {
    font-size: clamp(12.5px, 3.4vw, 14.5px);
    line-height: 1.48;
    margin: 0;
    color: var(--text-secondary);
  }

  #about .about-lead-wrap .lead a {
    color: var(--text);
    text-decoration: underline;
    font-weight: 600;
  }

  #about .about-rest {
    display: contents;
  }

  #about .about-rest > p {
    order: 3;
    grid-column: 1 / -1;
    font-size: 14.5px;
    line-height: 1.6;
    margin: 10px 0 0;
  }

  #about .fact-grid {
    order: 4;
    grid-column: 1 / -1;
    margin: 16px 0;
  }

  #about .about-speech {
    order: 5;
    grid-column: 1 / -1;
    width: 100%;
    font-size: 24px;
    text-align: center;
    margin: 16px 0 12px;
    transform: none;
  }

  #about .stats {
    order: 6;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: 22px 0 24px;
    padding: 0;
  }

  #about .stat {
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 2px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  }

  #about .stats.visible .stat {
    opacity: 1;
    transform: translateY(0);
  }

  #about .stats.visible .stat:nth-child(1) { transition-delay: 0.05s; }
  #about .stats.visible .stat:nth-child(2) { transition-delay: 0.15s; }
  #about .stats.visible .stat:nth-child(3) { transition-delay: 0.25s; }
  #about .stats.visible .stat:nth-child(4) { transition-delay: 0.35s; }

  #about .stat-num {
    font-family: var(--font-heading);
    font-size: clamp(28px, 7.5vw, 36px);
    line-height: 1;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    transition: transform 0.2s ease;
  }

  #about .stat-label {
    font-family: var(--font-mono);
    font-size: 7.8px;
    line-height: 1.35;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #737373;
    display: block;
    text-align: center;
  }

  #about .about-cta {
    order: 7;
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1.5px;
    margin-top: 0;
  }

  #about .about-cta .cta-arrow {
    font-size: 15px;
    transition: transform 0.2s ease;
  }

  #about .about-cta:hover .cta-arrow {
    transform: translate(2px, -2px);
  }

  .problem-card {
    position: relative;
    overflow: hidden;
    text-align: center;
  }

  .problem-card::before {
    content: "“";
    display: block;
    font-family: var(--font-heading);
    font-size: 40px;
    line-height: 1;
    color: var(--primary);
  }

  .problem-num {
    display: block;
    position: absolute;
    top: 8px;
    right: 12px;
    font-family: var(--font-heading);
    font-size: 96px;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(0, 0, 0, .15);
    pointer-events: none;
  }

  #services {
    overflow: hidden;
  }

  .service-grid {
    gap: 16px;
    padding: 6px 2px;
  }

  .service-card {
    display: flex;
    flex-direction: row;
    gap: 14px;
    align-items: center;
    text-align: left;
    padding: 14px 18px;
    border-radius: 20px;
    background: #fff;
    color: #0a0a0a;
    border: 1px solid rgba(0, 0, 0, 0.22);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    transform: rotate(-1.5deg);
    transform-origin: center center;
    transition: transform 0.25s ease;
  }

  .service-body {
    flex: 1;
    min-width: 0;
  }

  .service-body h3 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.25;
  }

  .service-body p {
    font-size: 11.5px;
    line-height: 1.35;
    margin: 3px 0 0;
    color: #555;
  }

  .service-card .tags {
    display: none;
  }

  .service-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #0a0a0a;
    color: #fff;
    font-size: 18px;
  }

  .service-num {
    display: none;
  }

  .service-card:nth-child(even) {
    flex-direction: row-reverse;
    text-align: right;
    background: #0a0a0a;
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
    transform: rotate(1.5deg);
  }

  .service-card:nth-child(even) .service-body p {
    color: rgba(255, 255, 255, .75);
  }

  .service-card:nth-child(even) .service-icon {
    background: #fff;
    color: #000;
  }

  #person .person-grid {
    grid-template-columns: 44% 1fr;
    gap: 16px;
    align-items: center;
  }

  #person .person-portrait {
    grid-row: 1;
    grid-column: 1;
    position: relative;
    border-radius: 999px 999px 24px 24px;
    background: #efefec;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 14px 30px -18px;
    align-self: center;
    width: 100%;
  }

  #person .person-portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(1);
    -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent 98%);
    mask-image: linear-gradient(to bottom, #000 74%, transparent 98%);
  }

  #person .person-watermark,
  #person .person-portrait .portrait-initials,
  #person .person-portrait .deco-dot {
    display: none;
  }

  #person .person-pill {
    display: block;
    position: absolute;
    bottom: 12px;
    left: 10px;
    z-index: 3;
    background: #0a0a0a;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 9px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  }

  #person .lead {
    grid-row: 1;
    grid-column: 2;
    align-self: center;
    font-size: clamp(12.5px, 3.4vw, 14.5px);
    line-height: 1.48;
    margin: 0;
    color: var(--text-secondary);
  }

  #person .person-pills {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    width: 100%;
  }

  #person .person-pills span {
    display: inline-block;
    width: auto;
    max-width: 90%;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 9px 20px;
    border: 1px solid rgba(0, 0, 0, .14);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
  }

  #person .person-exp {
    display: none;
  }

  #person .person-script {
    grid-column: 1 / -1;
    text-align: center;
    font-family: var(--font-script);
    font-size: 26px;
    font-weight: 600;
    margin: 16px 0 0;
    color: var(--text);
  }

  #process .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  #process .process-step {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 22px;
    padding: 22px 14px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #process .step-num {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(44px, 12vw, 54px);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px #0a0a0a;
    margin-bottom: 12px;
  }

  #process .process-step h3 {
    font-size: 13.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
    color: #0a0a0a;
    line-height: 1.25;
  }

  #process .process-step p {
    font-size: 11px;
    line-height: 1.45;
    color: #666;
    margin: 0;
  }

  .phone-input-group select {
    flex: 0 0 115px;
    font-size: 12.5px;
    padding: 12px 6px;
  }

  .contact-form .btn-light {
    width: 100%;
    text-align: center;
  }

  .display,
  .service-card h3,
  .work-card h3 {
    overflow-wrap: anywhere;
  }

  .nav>.nav-cta,
  .btn,
  .scroll-hint,
  .work-arrow,
  .work-preview,
  .diff-btn,
  #resetGame,
  .footer-nav a,
  .footer-links a,
  .back-top {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .display {
    font-size: 46px;
  }

  .ticker-track span {
    font-size: 20px;
  }

  .tool-item {
    font-size: 20px;
    gap: 8px;
    padding: 2px 4px;
  }

  .tool-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  .tool-sep {
    margin: 0 10px;
    font-size: 11px;
  }

  .pipe-arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  .ticker-track,
  .marquee-track {
    animation: none;
  }

  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}