:root {
    --paper: #FFFFFF;
    --ink: #141414;
    --gray: #6F6F6A;
    --hairline: #E4E4DF;
    --highlight: #FFE94A;
    --redpen: #E0442B;
    --max: 1080px;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Nunito Sans', sans-serif;
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }

  ::selection { background: var(--highlight); color: var(--ink); }

  a { color: inherit; }
  a:focus-visible, button:focus-visible {
    outline: 2px solid var(--redpen);
    outline-offset: 3px;
  }

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

  .mono {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
  }

  /* ---------- Nav ---------- */
  nav {
    border-bottom: 1px solid var(--hairline);
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(8px);
    z-index: 10;
  }
  .nav-inner {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 20px 24px;
    max-width: var(--max);
    margin: 0 auto;
  }
  .wordmark {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    font-size: 16px;
    text-decoration: none;
  }
  .nav-links { display: flex; gap: 28px; }
  .nav-links a {
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--gray);
    transition: color 0.15s ease;
  }
  .nav-links a:hover, .nav-links a.current { color: var(--ink); }

  /* ---------- Hero ---------- */
  header.hero { padding: 110px 0 96px; }

  .hero h1 {
    font-family: 'Archivo Black', sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-size: clamp(30px, 5vw, 58px);
    line-height: 1.12;
    letter-spacing: -0.015em;
    max-width: 16ch;
  }
  .hero h1.hero-intro { max-width: 20ch; }

  .edit-strike { position: relative; white-space: nowrap; }
  .edit-strike::after {
    content: "";
    position: absolute;
    left: 0;
    top: 54%;
    height: 3px;
    width: 0;
    background: var(--redpen);
    transform: rotate(-1.2deg);
    animation: strike 0.45s ease-out 1.1s forwards;
  }
  .edit-insert {
    font-style: italic;
    font-weight: 500;
    color: var(--redpen);
    opacity: 0;
    animation: fadeup 0.5s ease-out 1.7s forwards;
    display: inline-block;
  }
  .edit-highlight {
    background: linear-gradient(to right, var(--highlight) 0%, var(--highlight) 100%);
    background-repeat: no-repeat;
    background-size: 0% 88%;
    background-position: 0 12%;
    animation: swipe 0.6s ease-out 2.4s forwards;
    padding: 0 2px;
  }

  @keyframes strike { to { width: 100%; } }
  @keyframes fadeup { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes swipe { to { background-size: 100% 88%; } }

  @media (prefers-reduced-motion: reduce) {
    .edit-strike::after { animation: none; width: 100%; }
    .edit-insert { animation: none; opacity: 1; }
    .edit-highlight { animation: none; background-size: 100% 88%; }
    html { scroll-behavior: auto; }
  }

  .hero .dek {
    margin-top: 36px;
    max-width: 54ch;
    font-size: 19px;
    color: var(--gray);
  }
  .hero .dek strong { color: var(--ink); font-weight: 600; }
  .hero .mono { display: block; margin-bottom: 28px; }

  .client-strip {
    margin-top: 44px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.06em;
  }
  .client-strip span { white-space: nowrap; }

  /* ---------- Section scaffolding ---------- */
  section { border-top: 1px solid var(--hairline); padding: 84px 0; }
  .section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 48px;
  }
  .section-head h2 {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    font-size: 25px;
    letter-spacing: -0.01em;
  }

  /* ---------- AI section ---------- */
  .ai-lede {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    font-size: clamp(20px, 2.8vw, 30px);
    line-height: 1.35;
    letter-spacing: -0.01em;
    max-width: 30ch;
    margin-bottom: 48px;
  }
  .ai-lede .hl {
    background: linear-gradient(to right, var(--highlight), var(--highlight));
    background-repeat: no-repeat;
    background-size: 100% 82%;
    background-position: 0 14%;
    padding: 0 2px;
  }
  .ai-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
  .ai-cell .mono { display: block; margin-bottom: 14px; }
  .ai-cell h3 {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    font-size: 16px;
    margin-bottom: 8px;
  }
  .ai-cell p { color: var(--gray); font-size: 16px; }

  /* ---------- Work list ---------- */
  .work-list { display: flex; flex-direction: column; gap: 20px; }
  .work-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--hairline);
    border-radius: 14px;
    background: var(--paper);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  }
  .work-item:hover, .work-item:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(20,20,20,0.10);
    border-color: var(--ink);
  }
  .work-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    background: #F6F6F2;
    border: 1px solid var(--hairline);
  }
  .work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
  }
  .work-item:hover .work-thumb img { transform: scale(1.05); }
  .work-copy .meta { margin-bottom: 8px; }
  .work-item h3 {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    font-size: 21px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    display: inline;
    background: linear-gradient(to right, var(--highlight) 0%, var(--highlight) 100%);
    background-repeat: no-repeat;
    background-size: 0% 82%;
    background-position: 0 14%;
    transition: background-size 0.35s ease;
  }
  .work-item:hover h3, .work-item:focus-visible h3 { background-size: 100% 82%; }
  .work-item p { margin-top: 10px; color: var(--gray); max-width: 58ch; }
  .work-cta {
    display: inline-block;
    margin-top: 14px;
    color: var(--ink);
    font-weight: 700;
    transition: transform 0.18s ease, color 0.18s ease;
  }
  .work-item:hover .work-cta { color: var(--redpen); transform: translateX(4px); }
  .work-more {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--hairline);
    color: var(--gray);
    font-size: 15px;
    max-width: 70ch;
  }
  .work-more strong { color: var(--ink); font-weight: 600; }

  /* ---------- Practice ---------- */
  .practice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--hairline);
    border: 1px solid var(--hairline);
  }
  .practice-cell { background: var(--paper); padding: 36px 32px 44px; }
  .practice-cell .mono { display: block; margin-bottom: 18px; }
  .practice-cell h3 {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    font-size: 17px;
    margin-bottom: 10px;
  }
  .practice-cell p { color: var(--gray); font-size: 16px; }

  /* ---------- Case study pages ---------- */
  .case-hero { padding: 90px 0 56px; }
  .case-hero .crumbs { display: block; margin-bottom: 26px; }
  .case-hero .crumbs a { text-decoration: none; }
  .case-hero .crumbs a:hover { color: var(--ink); }
  .case-hero h1 {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    font-size: clamp(28px, 4.2vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.015em;
    max-width: 18ch;
  }
  .case-hero .case-intro {
    margin-top: 30px;
    font-size: 19px;
    color: var(--ink);
    max-width: 62ch;
    line-height: 1.6;
  }
  .case-facts {
    margin-top: 36px;
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
  }
  .case-facts .fact .mono { display: block; margin-bottom: 6px; }
  .case-facts .fact div:last-child { font-weight: 500; font-size: 15px; }

  .case-links { margin-top: 28px; display: flex; gap: 16px; flex-wrap: wrap; }
  .case-links a { font-size: 14px; }
  .case-links:empty { display: none; }

  .case-gallery {
    border-top: 1px solid var(--hairline);
    padding: 56px 0 72px;
  }
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--hairline);
    background: #FAFAF8;
  }
  .gallery-grid .full { grid-column: 1 / -1; }
  .gallery-heading {
    padding: 28px 0 4px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 4px;
  }
  .gallery-heading:first-child { padding-top: 0; }
  .placeholder {
    border: 1px dashed var(--hairline);
    background: repeating-linear-gradient(-45deg, #FCFCFA, #FCFCFA 12px, #F6F6F2 12px, #F6F6F2 24px);
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .placeholder span {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray);
    background: var(--paper);
    padding: 6px 12px;
    border: 1px solid var(--hairline);
  }

  .video-embed {
    aspect-ratio: 16 / 9;
    border: 1px solid var(--hairline);
    background: #000;
  }
  .video-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
  }

  .case-nav {
    border-top: 1px solid var(--hairline);
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .case-nav a {
    padding: 36px 24px;
    text-decoration: none;
    display: block;
  }
  .case-nav a + a { border-left: 1px solid var(--hairline); text-align: right; }
  .case-nav .mono { display: block; margin-bottom: 8px; }
  .case-nav .title {
    font-family: 'Archivo Black', sans-serif;
    font-size: 17px;
    display: inline;
    background: linear-gradient(to right, var(--highlight), var(--highlight));
    background-repeat: no-repeat;
    background-size: 0% 82%;
    background-position: 0 14%;
    transition: background-size 0.35s ease;
  }
  .case-nav a:hover .title { background-size: 100% 82%; }

  /* ---------- About page ---------- */
  .about-hero { padding: 100px 0 70px; }
  .about-hero h1 {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.2;
    letter-spacing: -0.015em;
    max-width: 22ch;
  }
  .about-hero h1 em { font-style: italic; }
  .about-body { max-width: 62ch; }
  .about-body p { margin-bottom: 20px; font-size: 18px; color: var(--ink); }
  .about-body p.muted { color: var(--gray); }

  .beyond-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--hairline);
    border: 1px solid var(--hairline);
  }
  .beyond-cell { background: var(--paper); padding: 32px; }
  .beyond-cell h3 {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    font-size: 16px;
    margin-bottom: 8px;
  }
  .beyond-cell p { color: var(--gray); font-size: 15px; }

  .edu-list { max-width: 62ch; }
  .edu-list .edu {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    border-top: 1px solid var(--hairline);
  }
  .edu-list .edu:first-child { border-top: none; }
  .edu-list .edu div:first-child { font-weight: 500; }
  .edu-list .edu div:last-child { color: var(--gray); white-space: nowrap; }

  /* ---------- Contact ---------- */
  .contact { padding: 110px 0 130px; }
  .contact h2 {
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    font-size: clamp(26px, 3.8vw, 42px);
    letter-spacing: -0.01em;
    max-width: 18ch;
  }
  .contact .btn {
    display: inline-block;
    margin-top: 36px;
    font-family: 'Archivo Black', sans-serif;
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0.01em;
    text-decoration: none;
    background: var(--ink);
    color: var(--paper);
    padding: 17px 34px;
    border-radius: 100px;
    box-shadow: 0 8px 20px rgba(20,20,20,0.18);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  }
  .contact .btn:hover {
    background: var(--redpen);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(224,68,43,0.32);
  }
  .contact .btn:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(20,20,20,0.2); }
  .contact .alt { margin-top: 18px; font-size: 14px; color: var(--gray); }
  .contact .alt a { color: var(--ink); }

  footer { border-top: 1px solid var(--hairline); padding: 28px 0; }
  .footer-inner {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
  }

  /* ---------- Responsive ---------- */
  @media (max-width: 760px) {
    header.hero { padding: 68px 0 60px; }
    .work-item { grid-template-columns: 1fr; gap: 8px; }
    .practice-grid, .ai-grid, .beyond-grid, .gallery-grid { grid-template-columns: 1fr; }
    .ai-grid { gap: 32px; }
    .nav-links { gap: 16px; }
    section { padding: 60px 0; }
    .case-nav { grid-template-columns: 1fr; }
    .case-nav a + a { border-left: none; border-top: 1px solid var(--hairline); text-align: left; }
  }

/* ---------- Waving hand (About) ---------- */
.wave {
  display: inline-block;
  transform-origin: 70% 70%;
  animation: wave 2.4s ease-in-out infinite;
}
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wave { animation: none; }
}

/* ---------- Case study links as buttons ---------- */
.case-links a {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 100px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  font-size: 15px !important;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(20,20,20,0.16);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.case-links a:hover {
  background: var(--redpen);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(224,68,43,0.3);
}
.case-links a:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(20,20,20,0.2); }

/* ---------- Work cards: mobile stack ---------- */
@media (max-width: 760px) {
  .work-item { grid-template-columns: 1fr; gap: 16px; }
  .work-thumb { aspect-ratio: 16 / 9; }
}

/* ---------- About intro: big/bold first half, smaller second ---------- */
.about-hero h1.about-intro {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 34ch;
}
.about-sub {
  color: var(--gray);
  font-size: 17px;
  line-height: 1.65;
  max-width: 64ch;
}

/* ---------- Password gate ---------- */
.gate { padding: 130px 0 150px; }
.gate h1 {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  font-size: clamp(26px, 4vw, 44px);
  margin: 18px 0 10px;
}
.gate-note { color: var(--gray); max-width: 46ch; }
.gate-note a { color: var(--ink); font-weight: 700; }
.gate-row { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.gate-row input {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 16px;
  padding: 14px 18px;
  border: 1.5px solid var(--hairline);
  border-radius: 100px;
  outline: none;
  min-width: 240px;
}
.gate-row input:focus { border-color: var(--ink); }
.gate-row button {
  font-family: 'Archivo Black', sans-serif;
  font-weight: 400;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 100px;
  border: none;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(20,20,20,0.16);
  transition: transform 0.16s ease, background 0.16s ease;
}
.gate-row button:hover { background: var(--redpen); transform: translateY(-2px); }
.gate-err { color: var(--redpen); margin-top: 14px; }
