:root {
  --ink: #0b0b0c;
  --surface: #121214;
  --line: #26262b;
  --line-soft: #1c1c20;
  --text: #f5f3ef;
  --muted: #9b9ba1;
  --dim: #67676e;
  --accent: #ff5c35;
  --signal: #6fe39b;
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, sans-serif;
  --body: "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --code: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --rail: 392px;
  --pad: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, p {
  margin: 0;
}

.mono {
  font-family: var(--code);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.arrow {
  display: inline-block;
  transition: transform 0.25s ease;
}

/* Layout: sticky rail + scrolling content */
.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 40px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.rail-stack {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--code);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.mark-glyph {
  width: 26px;
  height: 26px;
  border-radius: 3px;
  background: var(--accent);
}

.name {
  margin-top: 56px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 52px;
  line-height: 46px;
  letter-spacing: -0.042em;
}

.role {
  margin-top: 20px;
  font-family: var(--code);
  font-size: 11px;
  line-height: 19px;
  letter-spacing: 0.07em;
  color: var(--muted);
  text-transform: uppercase;
}

.availability {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.availability i {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
}

.availability i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--signal);
  animation: ping 2.4s var(--ease-out) infinite;
}

@keyframes ping {
  0% { transform: scale(1); opacity: 0.5; }
  70%, 100% { transform: scale(3); opacity: 0; }
}

.index a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 15px;
}

.index a:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.index .n,
.index .c {
  font-family: var(--code);
  font-size: 11px;
  color: var(--dim);
  transition: color 0.2s ease;
}

.index .l {
  flex: 1;
}

.toolkit .mono {
  display: block;
  letter-spacing: 0.12em;
}

.tools {
  margin-top: 12px;
  font-size: 13px;
  line-height: 22px;
  color: var(--muted);
}

.links {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--muted);
}

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--code);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.rail-foot span:last-child {
  color: #3e3e44;
}

/* Content */
.content {
  min-width: 0;
}

section {
  padding: 0 var(--pad);
}

.hero {
  padding-top: 48px;
  padding-bottom: 64px;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.statement {
  margin-top: 72px;
  max-width: 820px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 60px;
  line-height: 59px;
  letter-spacing: -0.04em;
}

.statement .line {
  display: block;
}

.statement .rule-line {
  display: flex;
  align-items: center;
  gap: 18px;
}

.statement .rule {
  flex: 1;
  height: 2px;
  background: var(--accent);
  transform-origin: left;
  animation: draw 1s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes draw {
  from { transform: scaleX(0); }
}

.statement .accent {
  color: var(--accent);
}

.intro {
  margin-top: 40px;
  max-width: 660px;
  font-size: 17px;
  line-height: 27px;
  color: var(--muted);
}

.stats {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding-right: 24px;
}

.stat b {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 34px;
  line-height: 37px;
  letter-spacing: -0.03em;
}

.stat span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
}

.work,
.experience,
.contact {
  scroll-margin-top: 0;
}

.work {
  padding-bottom: 72px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.section-head .num {
  color: var(--accent);
}

.section-head .title {
  flex: 1;
  color: var(--text);
}

.shot {
  display: block;
  width: 100%;
  margin-top: 40px;
  height: 372px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface) center / contain no-repeat;
  cursor: pointer;
  transition: border-color 0.25s ease;
}

.featured {
  margin-top: 36px;
  display: flex;
  gap: 72px;
  align-items: flex-start;
}

.narrative {
  flex: 1;
  min-width: 0;
}

.eyebrow {
  font-family: var(--code);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.featured h3 {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 38px;
  line-height: 37px;
  letter-spacing: -0.04em;
}

.deck {
  margin-top: 22px;
  max-width: 560px;
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
}

.cta {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.cta .arrow {
  color: var(--accent);
}

.spec {
  width: 280px;
  flex-shrink: 0;
  margin: 0;
}

.spec div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}

.spec dt {
  font-family: var(--code);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--dim);
}

.spec dd {
  margin: 0;
  font-size: 13px;
  text-align: right;
}

.index-head {
  margin-top: 64px;
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
}

.project {
  display: grid;
  grid-template-columns: 26px 216px minmax(0, 1fr) 40px;
  gap: 0 32px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

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

.project:focus-visible,
.shot:focus-visible,
.back:focus-visible,
.next-link:focus-visible,
.cta:focus-visible,
.channel:focus-visible,
.mail:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.project .pnum {
  padding-top: 2px;
  font-family: var(--code);
  font-size: 11px;
  color: var(--dim);
}

.thumb {
  width: 216px;
  height: 132px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface) center / cover no-repeat;
}

.project .pbody h3 {
  margin-top: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.project .pbody p {
  margin-top: 14px;
  max-width: 520px;
  font-size: 14px;
  line-height: 22px;
  color: var(--muted);
}

.pmeta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  font-family: var(--code);
  font-size: 11px;
  color: var(--dim);
}

.pmeta .arrow {
  color: var(--muted);
  font-size: 13px;
}

.experience {
  padding-bottom: 80px;
}

.job {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 64px;
  padding: 30px 0;
  border-top: 1px solid var(--line-soft);
}

.experience .section-head+.job {
  margin-top: 44px;
  border-top: 0;
  padding-top: 30px;
}

.job h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.job .jrole {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.job .jdates {
  margin-top: 8px;
  display: block;
}

.job .jdesc {
  max-width: 606px;
  font-size: 15px;
  line-height: 25px;
  color: var(--muted);
}

.chips {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.chips li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--code);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.jmedia {
  margin: 24px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.jmedia img {
  display: block;
  width: 100%;
  height: auto;
}

.contact {
  padding-bottom: 80px;
}

.split {
  margin-top: 56px;
  display: flex;
  justify-content: space-between;
  gap: 72px;
  align-items: flex-start;
}

.pitch {
  max-width: 508px;
}

.pitch h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 60px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.pitch p {
  margin-top: 26px;
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
}

.mail {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-radius: 3px;
  background: var(--accent);
  color: #140a06;
  font-size: 15px;
  font-weight: 500;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.channels {
  width: 340px;
  flex-shrink: 0;
  margin-top: 4px;
}

.channel {
  display: grid;
  grid-template-columns: 112px 1fr auto;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
}

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

.channel .arrow {
  color: var(--dim);
  font-size: 11px;
}

.site-foot {
  display: flex;
  justify-content: space-between;
  padding: 22px var(--pad) 22px;
  border-top: 1px solid var(--line);
}

.site-foot a {
  color: var(--muted);
}

.mobile-foot {
  display: none;
}

/* Tablet: rail narrows */
@media (max-width: 1200px) {
  :root {
    --rail: 320px;
    --pad: 44px;
  }

  .rail {
    padding: 40px 28px;
  }

  .name {
    font-size: 44px;
    line-height: 40px;
  }

  .statement {
    font-size: 50px;
    line-height: 50px;
  }

  .featured {
    gap: 40px;
  }

  .split {
    gap: 40px;
  }

  .project {
    grid-template-columns: 22px 180px minmax(0, 1fr) 40px;
    gap: 0 24px;
  }

  .thumb {
    width: 180px;
    height: 112px;
  }
}

/* Mobile: rail becomes a header, index/toolkit move to the footer */
@media (max-width: 900px) {
  :root {
    --pad: 24px;
  }

  .shell {
    display: block;
  }

  .rail {
    position: static;
    height: auto;
    padding: 20px 24px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .rail-stack {
    gap: 0;
  }

  .rail-top {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .name,
  .role {
    display: none;
  }

  .availability {
    margin: 0;
    padding: 5px 10px;
    font-size: 11px;
    gap: 7px;
  }

  .index,
  .rail-bottom,
  .rail-foot {
    display: none;
  }

  .rail {
    padding-bottom: 20px;
  }

  .hero {
    padding-top: 32px;
  }

  .meta {
    flex-direction: column;
    gap: 4px;
  }

  .statement {
    margin-top: 28px;
    font-size: 40px;
    line-height: 41px;
  }

  .statement .rule-line {
    gap: 12px;
  }

  .intro {
    margin-top: 26px;
    font-size: 16px;
    line-height: 25px;
  }

  .stats {
    margin-top: 36px;
    grid-template-columns: 1fr 1fr;
    gap: 28px 0;
  }

  .work {
    padding-bottom: 56px;
  }

  .shot {
    margin-top: 28px;
    height: 184px;
  }

  .featured {
    flex-direction: column;
    gap: 30px;
    margin-top: 26px;
  }

  .featured h3 {
    font-size: 30px;
    line-height: 32px;
  }

  .spec {
    width: 100%;
  }

  .index-head {
    margin-top: 44px;
  }

  .project {
    grid-template-columns: 1fr auto;
    gap: 14px 16px;
  }

  .project .pnum {
    display: none;
  }

  .thumb {
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .pmeta {
    flex-direction: row;
    align-items: baseline;
    grid-row: 2;
    grid-column: 2;
  }

  .project .pbody {
    grid-row: 2;
    grid-column: 1;
  }

  .job {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .split {
    flex-direction: column;
    gap: 40px;
    margin-top: 40px;
  }

  .pitch h2 {
    font-size: 44px;
  }

  .mail {
    display: flex;
    justify-content: space-between;
  }

  .channels {
    width: 100%;
  }

  .contact {
    padding-bottom: 48px;
  }

  .mobile-foot {
    display: block;
    padding: 36px var(--pad);
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .mobile-foot .links {
    margin-top: 24px;
  }

  .mobile-foot .fine {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--code);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--dim);
  }
}

/* Case study pages */
.cs-head {
  padding: 48px var(--pad) 56px;
}

.back {
  display: inline-flex;
  gap: 10px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.back .arrow {
  transition: transform 0.25s ease;
}

.domain {
  color: var(--accent);
}

.cs-title {
  margin-top: 48px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.cs-deck {
  margin-top: 22px;
  max-width: 760px;
  font-size: 17px;
  line-height: 27px;
  color: var(--muted);
}

.spec-strip {
  margin: 40px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
}

.spec-strip dt {
  font-family: var(--code);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--dim);
}

.spec-strip dd {
  margin: 6px 0 0;
  font-size: 13px;
}

.cs-hero {
  padding: 0 var(--pad);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cs-hero img {
  display: block;
  width: 100%;
  height: 560px;
  object-fit: contain;
}

.cs-body {
  padding-top: 64px;
  padding-bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.cs-block p {
  margin-top: 16px;
  max-width: 760px;
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
}

.cs-block .chips {
  margin-top: 20px;
}

.chips.lg li {
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text);
}

.screens {
  padding-bottom: 72px;
}

.screens .grid {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.screens figure {
  margin: 0;
  padding: 0 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.screens img {
  display: block;
  width: 100%;
  max-height: 640px;
  object-fit: contain;
}

.next-bar {
  display: flex;
  justify-content: space-between;
  padding: 22px var(--pad);
  border-top: 1px solid var(--line);
}

.next-link {
  color: var(--text);
  display: inline-flex;
  gap: 10px;
}

@media (max-width: 1200px) {
  .cs-title { font-size: 48px; }
}

@media (max-width: 900px) {
  .cs-head { padding-top: 32px; padding-bottom: 32px; }
  .cs-title { margin-top: 32px; font-size: 40px; }
  .cs-deck { font-size: 16px; line-height: 25px; }
  .spec-strip { gap: 18px 32px; }
  .cs-hero img { height: 240px; }
  .cs-body { padding-top: 40px; padding-bottom: 40px; gap: 36px; }
  .next-bar { flex-direction: column; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Motion ---------- */
@view-transition {
  navigation: auto;
}

.rail {
  view-transition-name: rail;
}

::view-transition-group(root) {
  animation-duration: 220ms;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-timing-function: var(--ease-out);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
}

@keyframes reveal-clip {
  from { clip-path: inset(0 0 100% 0); }
}

/* Load entrance: hero + rail on home, header on case studies */
.home .rail-top > *,
.home .index a,
.home .hero .meta,
.home .hero .statement .line,
.home .hero .intro,
.home .hero .stat,
.cs-head .meta,
.cs-title,
.cs-deck,
.spec-strip {
  animation: rise 560ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}

.home .rail-top > :nth-child(2) { --i: 1; }
.home .rail-top > :nth-child(3) { --i: 2; }
.home .rail-top > :nth-child(4) { --i: 3; }
.home .index a:nth-child(1) { --i: 4; }
.home .index a:nth-child(2) { --i: 5; }
.home .index a:nth-child(3) { --i: 6; }
.home .index a:nth-child(4) { --i: 7; }
.home .hero .statement .line:nth-child(1) { --i: 1; }
.home .hero .statement .line:nth-child(2) { --i: 2; }
.home .hero .statement .line:nth-child(3) { --i: 3; }
.home .hero .intro { --i: 5; }
.home .hero .stat:nth-child(1) { --i: 6; }
.home .hero .stat:nth-child(2) { --i: 7; }
.home .hero .stat:nth-child(3) { --i: 8; }
.home .hero .stat:nth-child(4) { --i: 9; }
.cs-title { --i: 1; }
.cs-deck { --i: 2; }
.spec-strip { --i: 3; }

.cs-hero img {
  animation: reveal-clip 900ms 250ms var(--ease-in-out) both;
}

/* Scroll reveal (classes added by JS, removed once settled) */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* Press feedback */
.cta,
.mail {
  transition: transform 160ms var(--ease-out), filter 200ms ease;
}

.cta:active,
.mail:active {
  transform: scale(0.97);
}

.index .l {
  transition: transform 250ms var(--ease-out);
}

.index a.active .n {
  color: var(--accent);
}

.index a.active .l {
  transform: translateX(6px);
}

.thumb {
  transition: transform 300ms var(--ease-out), border-color 200ms ease;
}

.project .arrow,
.channel .arrow {
  transition: transform 250ms var(--ease-out), color 200ms ease;
}

/* Hover only where hover exists */
@media (hover: hover) and (pointer: fine) {
  .index a:hover .n { color: var(--accent); }
  .index a:hover .l { transform: translateX(6px); }
  .links a:hover,
  .site-foot a:hover,
  .back:hover { color: var(--text); }
  .shot:hover { border-color: #3a3a41; }
  .project:hover { background: rgba(255, 255, 255, 0.015); }
  .project:hover .thumb { transform: scale(1.025); border-color: #3a3a41; }
  .cta:hover .arrow,
  .project:hover .arrow,
  a.channel:hover .arrow { transform: translate(2px, -2px); }
  a.channel:hover .arrow { color: var(--accent); }
  .mail:hover { filter: brightness(1.08); }
  .back:hover .arrow { transform: translateX(-3px); }
  .next-link:hover .arrow { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
