/* ---------- Tokens ---------- */
:root {
  --bg: #F4F4F1;
  --bg-alt: #E9E9E4;
  --panel: #FFFFFF;
  --ink: #111110;
  --ink-soft: #55534C;
  --ink-faint: #96948A;
  --line: #D9D8D0;
  --accent: #111110;
  --accent-soft: #E9E9E4;
  --dark: #0A0A09;
  --dark-ink: #F4F4F1;
  --dark-line: #2A2A27;

  --serif: "Archivo", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1140px;
  --gutter: clamp(24px, 5vw, 64px);
  --section-pad: clamp(64px, 10vw, 128px);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; background: none; border: none; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}
.section--tight { padding-top: calc(var(--section-pad) * 0.5); padding-bottom: calc(var(--section-pad) * 0.5); }
.section--alt { background: var(--bg-alt); }
.section--border-top { border-top: 1px solid var(--line); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.reveal {
  opacity: 1;
}
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.nav__name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}
.nav__links a {
  font-size: 14px;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav__links a:hover { color: var(--accent); }
.nav__email {
  font-size: 14px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  white-space: nowrap;
}
.nav__email:hover { border-color: var(--accent); color: var(--accent); }
.nav__back {
  font-size: 14px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav__back:hover { color: var(--accent); }

@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(56px, 9vw, 108px);
  padding-bottom: clamp(56px, 9vw, 108px);
}
.hero__eyebrow { margin-bottom: 20px; }
.hero__eyebrow::before { content: "( "; }
.hero__eyebrow::after { content: " )"; }
.hero__headline {
  font-size: clamp(32px, 4.8vw, 64px);
  max-width: 20ch;
  margin-bottom: 32px;
}
.hero__sub {
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--ink-soft);
  max-width: 56ch;
}
.hero__actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.btn--primary {
  background: var(--ink);
  color: var(--bg);
}
.btn--primary:hover { background: var(--ink-soft); }
.btn--ghost {
  border: 2px solid var(--ink);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--bg); }

/* ---------- Clients marquee ---------- */
.clients {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 40px 0;
  overflow: hidden;
}
.clients__label {
  text-align: center;
  margin-bottom: 28px;
}
.marquee {
  display: flex;
  width: max-content;
  animation: marquee 130s linear infinite;
}
.marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  padding-right: clamp(40px, 6vw, 88px);
}
.marquee__group img {
  height: clamp(20px, 2.6vw, 28px);
  width: auto;
  filter: grayscale(1) contrast(1.3);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.marquee__group img:hover {
  opacity: 1;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
}

/* ---------- Two-col editorial layout ---------- */
.split {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--gutter);
}
@media (max-width: 720px) {
  .split { grid-template-columns: 1fr; gap: 16px; }
}
.split__label { padding-top: 6px; }
.split__body h2 {
  font-size: clamp(24px, 2.8vw, 34px);
  max-width: 22ch;
  margin-bottom: 20px;
}
.split__body p {
  color: var(--ink-soft);
  max-width: 62ch;
}
.split__body p + p { margin-top: 16px; }

/* ---------- Approach list ---------- */
.approach-list {
  margin-top: 48px;
  border-top: 1px solid var(--line);
}
.approach-item {
  display: grid;
  grid-template-columns: 60px 220px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.approach-item__num {
  font-family: var(--serif);
  font-weight: 900;
  color: var(--ink-faint);
  font-size: 15px;
}
.approach-item__title {
  font-weight: 700;
  font-size: 16px;
}
.approach-item__desc {
  color: var(--ink-soft);
  font-size: 15px;
}
@media (max-width: 720px) {
  .approach-item { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
}

/* ---------- Cards grid ---------- */
.cards {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card {
  background: var(--bg);
  padding: 36px 28px;
}
.card__tag { margin-bottom: 16px; }
.card h3 { font-size: 21px; margin-bottom: 12px; }
.card p { color: var(--ink-soft); font-size: 14.5px; }
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
}

/* ---------- Skills table ---------- */
.skills {
  margin-top: 48px;
}
.skills__row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--gutter);
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.skills__row:last-child { border-bottom: 1px solid var(--line); }
.skills__cat {
  font-weight: 600;
  font-size: 15px;
}
.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skills__tags span {
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
}
@media (max-width: 720px) {
  .skills__row { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- Case study preview cards ---------- */
.cs-grid {
  margin-top: 48px;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.cs-card {
  background: var(--bg);
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 32px;
  transition: background 0.25s ease;
}
.cs-card:hover { background: var(--panel); }
.cs-card__tag { grid-column: 1; }
.cs-card__title { font-size: clamp(19px, 2vw, 24px); margin-bottom: 10px; }
.cs-card__desc { color: var(--ink-soft); font-size: 14.5px; max-width: 56ch; }
.cs-card__arrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-card:hover .cs-card__arrow { gap: 12px; }
.cs-card__arrow { transition: gap 0.2s ease; }
@media (max-width: 860px) {
  .cs-card { grid-template-columns: 1fr; gap: 12px; }
  .cs-card__arrow { margin-top: 8px; }
}

/* ---------- Experience / education tables ---------- */
.timeline-row {
  display: grid;
  grid-template-columns: 1fr 1fr 170px;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.timeline-row:last-child { border-bottom: 1px solid var(--line); }
.timeline-row__org { font-weight: 600; }
.timeline-row__role { color: var(--ink-soft); }
.timeline-row__date { color: var(--ink-faint); white-space: nowrap; }
@media (max-width: 640px) {
  .timeline-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- About ---------- */
.about p { color: var(--ink-soft); max-width: 62ch; }
.about p + p { margin-top: 16px; }

/* ---------- Footer CTA ---------- */
.footer-cta {
  background: var(--dark);
  color: var(--dark-ink);
  padding: var(--section-pad) 0 48px;
}
.footer-cta h2 {
  font-size: clamp(28px, 4vw, 44px);
  max-width: 18ch;
  margin-bottom: 40px;
}
.footer-cta__row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--dark-line);
}
.footer-cta__contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}
.footer-cta__contact a { color: var(--dark-ink); }
.footer-cta__contact a:hover { color: var(--accent-soft); }
.footer-cta__label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #79725F;
  margin-bottom: 10px;
}
.footer-cta__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 28px;
  font-size: 13px;
  color: #79725F;
}

/* ---------- Case study page ---------- */
.cs-header {
  padding-top: clamp(48px, 8vw, 88px);
  padding-bottom: clamp(40px, 6vw, 64px);
}
.cs-header__title {
  font-size: clamp(28px, 4.4vw, 48px);
  max-width: 20ch;
  margin: 20px 0 24px;
}
.cs-header__sub {
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: 44px;
}
.cs-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.cs-meta__label {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.cs-meta__value { font-size: 14.5px; }
@media (max-width: 720px) {
  .cs-meta { grid-template-columns: 1fr; gap: 16px; }
}

.cs-image {
  margin: 0 0 var(--section-pad);
}
.cs-image img, .cs-image video {
  border-radius: 6px;
  border: 1px solid var(--line);
}
.cs-image__caption {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--ink-faint);
  font-style: italic;
}

.cs-inline-images {
  margin-top: 40px;
}
.cs-inline-images .cs-image:last-child {
  margin-bottom: 0;
}

.cs-list {
  margin-top: 16px;
}
.cs-list li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
  margin-top: 10px;
}
.cs-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.cs-stats {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.cs-stat {
  background: var(--bg);
  padding: 28px 24px;
}
.cs-stat__num {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 32px);
  color: var(--accent);
  margin-bottom: 8px;
}
.cs-stat__label {
  font-size: 13px;
  color: var(--ink-soft);
}
@media (max-width: 860px) {
  .cs-stats { grid-template-columns: 1fr 1fr; }
}

.cs-nextfooter {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
.cs-nextfooter .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.cs-nextfooter__next {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px);
}
.cs-nextfooter__label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
