/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Tokens ── */
:root {
  --bg:          oklch(98% 0.006 75);
  --bg-subtle:   oklch(94% 0.012 75);
  --bg-card:     oklch(100% 0.004 75);
  --text:        oklch(16% 0.012 55);
  --text-muted:  oklch(46% 0.010 55);
  --accent:      oklch(50% 0.16 28);
  --accent-dim:  oklch(50% 0.16 28 / 0.10);
  --accent-glow: oklch(50% 0.16 28 / 0.14);
  --border:      oklch(90% 0.010 75);

  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-6:  24px;
  --space-8:  32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
}

/* ── Base ── */
html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.65;
}

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

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.nav-name {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.nav-name:hover { color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  gap: var(--space-8);
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--text); }

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 57px);
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-16) var(--space-12);
  gap: var(--space-6);
  max-width: 560px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: var(--space-1) var(--space-3);
  border-radius: 3px;
}

.hero-name {
  font-size: clamp(3.5rem, 5.5vw + 1rem, 6.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero-positioning {
  font-size: clamp(1.05rem, 1.4vw + 0.5rem, 1.3rem);
  font-weight: 300;
  line-height: 1.45;
  color: var(--text-muted);
  max-width: 38ch;
}

.hero-desc {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 42ch;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: var(--space-2);
  transition: gap 0.2s ease;
}

.hero-cta:hover { gap: var(--space-4); }

.hero-photo {
  position: relative;
  overflow: hidden;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* ── Work section ── */
.work {
  padding: var(--space-24) var(--space-12);
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-8);
}

/* ── Case study cards ── */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.cs-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-8);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

a.cs-card:hover {
  box-shadow: 0 8px 32px var(--accent-glow);
  transform: translateY(-3px);
}

.cs-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: var(--space-2);
  flex-shrink: 0;
  outline: 1px solid var(--border);
}

.cs-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-card-icon-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.cs-card-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.cs-card-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px var(--space-3);
  border-radius: 3px;
}

.cs-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: var(--space-1);
}

.cs-card-hook {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
}

.cs-card-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: var(--space-2);
}

.cs-card-placeholder {
  opacity: 0.6;
  cursor: default;
}

.cs-card-soon {
  display: inline-flex;
  width: fit-content;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px var(--space-3);
  border-radius: 3px;
  margin-top: var(--space-2);
}

/* ── Case study page hero ── */
.cs-hero {
  padding: var(--space-16) var(--space-12) var(--space-12);
  max-width: 900px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: var(--space-8);
  transition: color 0.15s ease;
}

.cs-back:hover { color: var(--text); }

.cs-hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.cs-hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-title {
  font-size: clamp(3rem, 6vw + 1rem, 6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: var(--space-8);
}

.cs-hook {
  font-size: clamp(1rem, 1.4vw + 0.4rem, 1.3rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: var(--space-8);
}

.cs-meta-row {
  display: flex;
  gap: var(--space-12);
  flex-wrap: wrap;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cs-meta-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.cs-meta-value {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── Phone mockups ── */
.phones-section {
  background: var(--bg-subtle);
  padding: var(--space-16) var(--space-12);
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  overflow-x: auto;
}

.phone-frame {
  flex-shrink: 0;
  width: 176px;
  height: 360px;
  background: oklch(16% 0.012 55);
  border-radius: 30px;
  padding: 10px;
  box-shadow: 0 16px 48px oklch(0% 0 0 / 0.28);
  position: relative;
}

/* Dynamic island */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 18px;
  background: oklch(8% 0 0);
  border-radius: 9px;
  z-index: 2;
}

.phone-screen {
  background: var(--bg);
  width: 100%;
  height: 100%;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
}

.phone-screen-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  overflow: hidden;
}

.phone-screen-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-screen-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  padding: 0 var(--space-4);
}

/* ── Case study body ── */
.cs-body {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-12);
}

.cs-section {
  margin-bottom: var(--space-16);
}

.cs-section-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-6);
}

.cs-body p {
  font-size: 1rem;
  line-height: 1.78;
  color: var(--text);
  max-width: 66ch;
  margin-bottom: var(--space-6);
}

.cs-body p:last-child { margin-bottom: 0; }

.cs-body ul {
  margin: var(--space-4) 0 var(--space-6) var(--space-6);
}

.cs-body li {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: var(--space-2);
  max-width: 62ch;
}

.cs-body strong {
  font-weight: 600;
  color: var(--text);
}

/* ── Decision blocks ── */
.decisions-list {
  display: flex;
  flex-direction: column;
}

.decision {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 var(--space-6);
}

.decision:last-child { border-bottom: 1px solid var(--border); }

.decision-number {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 0.3rem;
}

.decision-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: var(--space-4);
}

.decision-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 60ch;
}

.decision-body p { margin-bottom: var(--space-4); }
.decision-body p:last-child { margin-bottom: 0; }

.decision-inner { grid-column: 2; }

/* ── About page ── */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-12);
}

.about-photo-wrap img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center 15%;
}

.about-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-6);
}

.about-name {
  font-size: clamp(2.5rem, 4vw + 0.5rem, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.about-tagline {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 34ch;
}

.about-body {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-12) var(--space-24);
  border-top: 1px solid var(--border);
}

.about-body p {
  font-size: 1rem;
  line-height: 1.78;
  max-width: 64ch;
  margin-bottom: var(--space-6);
}

.about-body h2 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: var(--space-12);
  margin-bottom: var(--space-6);
}

.career-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: var(--space-8);
}

.career-table tr { border-top: 1px solid var(--border); }

.career-table td {
  padding: var(--space-4) 0;
  vertical-align: top;
  line-height: 1.5;
}

.career-table td:first-child {
  color: var(--text-muted);
  width: 9rem;
  padding-right: var(--space-4);
  font-variant-numeric: tabular-nums;
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.skill-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: var(--space-1) var(--space-3);
  background: var(--bg-subtle);
  color: var(--text);
  border-radius: 4px;
}

.about-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: var(--space-8);
  transition: gap 0.2s ease;
}

.about-cta:hover { gap: var(--space-4); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: var(--space-8) var(--space-12);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

footer p,
footer a {
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 800px) {
  nav { padding: var(--space-4) var(--space-6); }
  .nav-links { gap: var(--space-6); }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-photo {
    order: -1;
    height: auto;
    aspect-ratio: 4/3;
  }

  .hero-photo img {
    object-position: center 38%;
  }

  .hero-text {
    padding: var(--space-8) var(--space-6);
    max-width: 100%;
  }

  .work {
    padding: var(--space-16) var(--space-6);
  }

  .cs-grid {
    grid-template-columns: 1fr;
  }

  .cs-hero {
    padding: var(--space-8) var(--space-6) var(--space-8);
  }

  .cs-body {
    padding: var(--space-12) var(--space-6);
  }

  .phones-section {
    padding: var(--space-12) var(--space-6);
    justify-content: flex-start;
  }

  .phone-frame {
    width: 148px;
    height: 300px;
  }

  .decision {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .decision-inner { grid-column: 1; }

  .about-hero {
    grid-template-columns: 1fr;
    padding: var(--space-8) var(--space-6);
    gap: var(--space-8);
  }

  .about-photo-wrap img {
    aspect-ratio: 16/9;
    object-position: center 20%;
  }

  .about-body {
    padding: var(--space-12) var(--space-6) var(--space-16);
  }

  footer {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
    padding: var(--space-8) var(--space-6);
  }
}
