/* ================================================================
   TOKENS — editorial portfolio system
   ================================================================ */
:root {
  --cream: #FAF7F2;
  --cream-deep: #F2EDE5;
  --paper: #FDFCF9;
  --sage: #8FA888;
  --sage-deep: #6E8A68;
  --sage-wash: #E8EFE6;
  --sage-band: #EEF3EC;
  --lavender-wash: #EDE8F2;
  --peach-wash: #F3E9E1;
  --ink: #1A1917;
  --ink-soft: #3D3A36;
  --muted: #6F6A63;
  --faint: #A39E96;
  --line: rgba(26, 25, 23, 0.1);
  --line-faint: rgba(26, 25, 23, 0.06);

  --hero-font: "Alegreya", Georgia, serif;
  --quote-mark: "Playfair Display", Georgia, serif;
  --heading: "Manrope", system-ui, sans-serif;
  --body: "Chivo", system-ui, sans-serif;
  --script: "Ms Madi", cursive;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6rem;
  --space-8: 8rem;
  --space-9: 10rem;

  --width: 78rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --radius: 1.5rem;
  --radius-sm: 0.75rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.75s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: 5.5rem;
}

#workflow {
  scroll-margin-top: 3.5rem;
}

#work,
#tech-stack,
#ai-thinking {
  scroll-margin-top: 5.5rem;
}

body {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
  background: var(--cream);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }

/* ================================================================
   ATMOSPHERE
   ================================================================ */
.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.atmosphere__wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
}

.atmosphere__wash--sage {
  width: 55vw;
  height: 55vw;
  top: -20%;
  right: -15%;
  background: var(--sage);
}

.atmosphere__wash--lavender {
  width: 45vw;
  height: 45vw;
  bottom: 5%;
  left: -20%;
  background: #C8BED4;
}

/* ================================================================
   TYPOGRAPHY
   ================================================================ */
.label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: var(--space-3);
}

.label--center { text-align: center; }
.label--margin { margin-bottom: var(--space-2); }

.display {
  font-family: var(--heading);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-size: clamp(2.75rem, 6.5vw, 4.75rem);
}

.display--section {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  text-align: center;
  margin-bottom: var(--space-3);
}

.display--closing {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 700;
  text-align: center;
  max-width: none;
  margin: 0 auto var(--space-1);
  line-height: 1.25;
}

.annotation {
  font-family: var(--heading);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--sage-deep);
  margin-top: var(--space-3);
}

/* ================================================================
   REVEAL
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

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

.reveal--delay { transition-delay: 0.12s; }

/* ================================================================
   BUTTONS
   ================================================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.button--fill {
  background: var(--sage-deep);
  color: var(--paper);
}

.button--fill:hover,
.button--fill:focus-visible {
  background: #5A7356;
}

.button--line {
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
}

.button--line:hover,
.button--line:focus-visible {
  border-color: var(--ink-soft);
  background: var(--paper);
}

/* ================================================================
   HEADER
   ================================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-faint);
}

.header__nav {
  max-width: var(--width);
  margin: 0 auto;
  padding: var(--space-2) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.header__brand {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-transform: uppercase;
}

.header__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.header__links a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}

.header__links a:hover,
.header__links a:focus-visible,
.header__links a.is-active {
  color: var(--ink);
}

.header__cta {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft) !important;
}

.header__cta:hover {
  background: var(--paper);
}

.header__menu-btn {
  display: none;
  width: 2rem;
  height: 2rem;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.header__menu-btn span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}

/* ================================================================
   MAIN
   ================================================================ */
main {
  position: relative;
  z-index: 1;
}

/* ================================================================
   HERO — asymmetric editorial
   ================================================================ */
.hero {
  padding: var(--space-6) var(--gutter) var(--space-5);
  max-width: var(--width);
  margin: 0 auto;
}

.hero__stage {
  display: grid;
  grid-template-columns: 1fr minmax(0, 34rem);
  grid-template-rows: auto 1fr;
  column-gap: clamp(1.75rem, 4vw, 3rem);
  row-gap: var(--space-2);
  align-items: stretch;
}

.hero__copy {
  display: contents;
}

.hero__eyebrow {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
}

.hero__main {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-right: var(--space-2);
  min-height: 0;
}

.display--hero {
  font-family: var(--hero-font);
  font-weight: 500;
  font-size: clamp(2.35rem, 5.1vw, 3.95rem);
  margin-bottom: var(--space-1);
}

.hero__portrait-group {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.55fr;
  gap: var(--space-2);
  width: 100%;
  max-width: 34rem;
  margin-left: auto;
  min-height: 0;
  height: 100%;
}

.hero__stats {
  display: grid;
  grid-template-rows: 1fr 1fr 2fr;
  gap: 0.75rem;
  height: 100%;
  min-height: 0;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  background: var(--paper);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  box-shadow: 0 8px 24px rgba(26, 25, 23, 0.04);
}

.stat-card__title {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.45;
  margin-bottom: 0.45rem;
}

.stat-card__line {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.5;
}

.stat-card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stat-card__list li {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.45;
  position: relative;
  padding-left: 0.85rem;
}

.stat-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage);
}

.hero__tagline {
  font-family: var(--script);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 400;
  color: var(--sage-deep);
  line-height: 1.2;
  margin-top: -1rem;
  margin-bottom: 0.15rem;
}

.hero__lede {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 32rem;
  margin-top: -0.85rem;
  margin-bottom: 0.85rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.hero__highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  max-width: 32rem;
}

.hero__highlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}

.hero__highlight-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: #D4E0D0;
  color: var(--sage-deep);
}

.hero__highlight-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.35;
}

.hero__figure {
  position: relative;
  height: 100%;
  margin: 0;
}

.hero__portrait {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  object-position: center top;
}

/* ================================================================
   PULL QUOTE
   ================================================================ */
.pullquote {
  max-width: var(--width);
  margin: 0 auto var(--space-4);
  padding: 0 var(--gutter);
}

.pullquote__card {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  width: 100%;
  padding: 0.9rem clamp(1.5rem, 3vw, 2.75rem);
  background: var(--sage-wash);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius);
  text-align: left;
}

.pullquote__mark {
  font-family: var(--quote-mark);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 400;
  line-height: 0.85;
  color: var(--sage);
  flex-shrink: 0;
  align-self: center;
  user-select: none;
}

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

.pullquote__text {
  font-family: var(--body);
  font-size: clamp(0.9rem, 1.35vw, 1.05rem);
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0 0 0.2rem;
}

.pullquote__support {
  font-family: var(--body);
  font-size: clamp(0.78rem, 1.1vw, 0.88rem);
  font-weight: 400;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
}

.pullquote__heart {
  display: flex;
  align-items: center;
  align-self: center;
  color: var(--sage-deep);
  flex-shrink: 0;
  margin-left: auto;
  padding-left: var(--space-2);
  line-height: 0;
}

.pullquote__heart svg {
  width: clamp(1.65rem, 2.75vw, 2rem);
  height: auto;
}

.pullquote__heart-ghost {
  opacity: 0.28;
  transform: translate(0.6px, 0.8px);
}

/* ================================================================
   PROCESS / TIMELINE
   ================================================================ */
.process {
  max-width: var(--width);
  margin: 0 auto;
  padding: var(--space-3) var(--gutter) var(--space-7);
}

.process__head {
  text-align: center;
  margin-bottom: var(--space-4);
  padding: var(--space-1) 0 0;
}

.process__head .label {
  margin-bottom: var(--space-3);
}

.process__title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: var(--space-3);
}

.process__intro {
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  color: var(--muted);
  max-width: 56rem;
  margin: 0 auto;
  line-height: 1.55;
  padding-bottom: var(--space-2);
}

.workflow-panel {
  background: var(--paper);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius);
  padding: var(--space-5) var(--space-4) var(--space-5);
  box-shadow: 0 12px 40px rgba(26, 25, 23, 0.05);
}

.workflow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-2);
}

.workflow__step {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-1);
}

.workflow__step:not(:last-child)::before {
  content: "›";
  position: absolute;
  top: 2.6rem;
  right: -0.35rem;
  font-size: 1.1rem;
  color: #D0CCC6;
  line-height: 1;
  z-index: 2;
}

.workflow__icon {
  width: 100%;
  aspect-ratio: 1;
  max-height: 5.5rem;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.workflow__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.workflow__heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: var(--space-2);
}

.workflow__num {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--paper);
  flex-shrink: 0;
}

/* ChatGPT */
.workflow__step--yellow .workflow__num { background: #10A37F; }
.workflow__step--yellow .workflow__title { color: #10A37F; }
/* Gamma */
.workflow__step--orange .workflow__num { background: #8B5CF6; }
.workflow__step--orange .workflow__title { color: #7C3AED; }
/* Whimsical */
.workflow__step--green .workflow__num { background: #7C3AED; }
.workflow__step--green .workflow__title { color: #6D28D9; }
/* Figma */
.workflow__step--blue .workflow__num { background: #F24E1E; }
.workflow__step--blue .workflow__title { color: #F24E1E; }
/* Cursor */
.workflow__step--purple .workflow__num { background: #1A1917; }
.workflow__step--purple .workflow__title { color: #1A1917; }
/* Cloudflare */
.workflow__step--pink .workflow__num { background: #F38020; }
.workflow__step--pink .workflow__title { color: #F38020; }
/* Tester Hub */
.workflow__step--red .workflow__num { background: #F97316; }
.workflow__step--red .workflow__title { color: #EA580C; }

.workflow__title {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.25;
}

.workflow__desc {
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--muted);
  flex: 1;
  margin-bottom: var(--space-3);
}

.workflow__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--faint);
  margin-top: auto;
}

.workflow__tools-label {
  flex: 0 0 100%;
  font-weight: 600;
  color: var(--muted);
}

.workflow__tool {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tool-icon {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.2rem;
  object-fit: contain;
  flex-shrink: 0;
}

/* ================================================================
   WORK — App Store-style project cards
   ================================================================ */
.work {
  max-width: var(--width);
  margin: 0 auto;
  padding: var(--space-3) var(--gutter) var(--space-7);
}

.work .process__head {
  padding-top: var(--space-1);
  margin-bottom: var(--space-7);
}

.projects {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.projects__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.projects__row--featured {
  grid-template-columns: 1fr;
  margin-bottom: var(--space-1);
}

.project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  background: var(--paper);
  border: none;
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: 0 8px 28px rgba(26, 25, 23, 0.06);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(26, 25, 23, 0.1);
  outline: none;
}

.project-card.is-active {
  box-shadow: 0 14px 40px rgba(26, 25, 23, 0.12);
  transform: translateY(-2px);
}

.project-card--featured {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
}

.project-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  background: transparent;
  overflow: hidden;
}

.project-card--featured .project-card__media {
  min-height: 20rem;
}

.project-card__media img {
  width: 100%;
  height: auto;
  max-height: 14rem;
  object-fit: contain;
  object-position: center;
}

.project-card--featured .project-card__media img {
  max-height: clamp(20rem, 32vw, 26rem);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.project-card__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.project-card__title {
  font-family: var(--heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.project-card--featured .project-card__title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.project-card__status {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage-deep);
  background: var(--sage-wash);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.project-card__desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}

.project-card--featured .project-card__desc {
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
}

.project-card__tags li {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--cream-deep);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}

.project-panel {
  grid-column: 1 / -1;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.45s var(--ease), opacity 0.35s var(--ease), margin 0.35s var(--ease);
  margin-top: 0;
}

.project-panel.is-open {
  opacity: 1;
  margin-top: var(--space-2);
}

.project-panel:not(.is-open)[hidden] {
  display: none;
}

.project-panel__inner {
  background: var(--paper);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: 0 8px 28px rgba(26, 25, 23, 0.06);
  overflow: hidden;
}

.project-panel.is-open .project-panel__inner {
  box-shadow: 0 14px 40px rgba(26, 25, 23, 0.12);
}

.project-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.project-panel__intro {
  flex: 1;
  min-width: 0;
}

.project-panel__title {
  font-family: var(--heading);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.project-panel__status {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage-deep);
  background: var(--sage-wash);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  margin-bottom: var(--space-2);
}

.project-panel__copy {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 52rem;
}

.project-panel__case-study {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: var(--space-2);
}

.project-panel__case-study a {
  color: var(--sage-deep);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.project-panel__case-study a:hover,
.project-panel__case-study a:focus-visible {
  color: var(--ink);
}

.project-panel__close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--cream-deep);
  transition: color 0.2s, background 0.2s;
}

.project-panel__close:hover,
.project-panel__close:focus-visible {
  color: var(--ink);
  background: var(--sage-wash);
  outline: none;
}

.project-panel__gallery {
  display: grid;
  grid-template-columns: repeat(var(--gallery-cols, 1), minmax(0, 1fr));
  gap: var(--space-2);
  width: 100%;
}

.project-panel__gallery:empty {
  display: none;
}

.project-panel__thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.project-panel__thumb:hover,
.project-panel__thumb:focus-visible {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(26, 25, 23, 0.12);
  outline: none;
}

.project-panel__thumb img {
  display: block;
  width: 100%;
  height: clamp(7rem, 18vw, 11rem);
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius-sm);
  background: var(--paper);
  pointer-events: none;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 25, 23, 0.9);
}

.lightbox__figure {
  position: fixed;
  inset: clamp(3rem, 8vw, 5rem) var(--space-3) var(--space-3);
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  pointer-events: none;
}

.lightbox__img {
  max-width: min(100%, 1200px);
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.lightbox__close {
  position: fixed;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 202;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  color: var(--paper);
  background: rgba(26, 25, 23, 0.55);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background: var(--paper);
  color: var(--ink);
  outline: none;
}

body.lightbox-open {
  overflow: hidden;
}

/* ================================================================
   TOOLKIT — 4×2 card grid
   ================================================================ */
.toolkit {
  max-width: var(--width);
  margin: 0 auto;
  padding: var(--space-3) var(--gutter) var(--space-6);
}

.toolkit .process__head {
  padding-top: var(--space-1);
  margin-bottom: var(--space-7);
}

.toolkit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.toolkit-item {
  background: var(--paper);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  box-shadow: 0 6px 20px rgba(26, 25, 23, 0.03);
}

.toolkit-item h3 {
  font-family: var(--heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line-faint);
}

.toolkit-item__tools {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
}

.toolkit-item__tools li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--body);
  font-size: 0.84rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

.toolkit-item__icon {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
  object-fit: contain;
}

/* ================================================================
   PHILOSOPHY — split prose + flow card
   ================================================================ */
.philosophy {
  max-width: var(--width);
  margin: 0 auto;
  padding: var(--space-3) var(--gutter) var(--space-7);
}

.philosophy__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(22rem, 1.08fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.philosophy-flow {
  width: 100%;
  min-width: 0;
}

.philosophy__title {
  font-family: var(--heading);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.philosophy__lede {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: var(--space-2);
  max-width: 34rem;
}

.philosophy__insights {
  margin-top: var(--space-5);
  list-style: none;
}

.philosophy__insights li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: var(--space-2);
  align-items: center;
  padding: 1.35rem 0;
  border-top: 1px solid var(--line-faint);
}

.philosophy__insights li:first-child {
  border-top: none;
  padding-top: 0;
}

.philosophy__insights li:last-child {
  padding-bottom: 0;
}

.philosophy__num {
  font-family: var(--heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.2;
}

.philosophy__insight-body h3 {
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.philosophy__insight-body p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--muted);
}

.philosophy-flow__card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: 0 16px 48px rgba(26, 25, 23, 0.08);
}

.philosophy-flow__endpoint {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2);
  align-items: center;
}

.philosophy-flow__endpoint--ship {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-2);
}

.philosophy-flow__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--sage-wash);
  color: var(--sage-deep);
  flex-shrink: 0;
}

.philosophy-flow__icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.philosophy-flow__endpoint-copy h3 {
  font-family: var(--heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.philosophy-flow__endpoint-copy p {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 28rem;
}

.philosophy-flow__arrow {
  display: flex;
  justify-content: center;
  padding: 0.35rem 0;
  color: #C8C2BA;
}

.philosophy-flow__arrow svg {
  width: 14px;
  height: 14px;
}

.philosophy-flow__layer {
  background: rgba(143, 168, 136, 0.08);
  border: 1px solid rgba(143, 168, 136, 0.12);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  margin: 0;
}

.philosophy-flow__layer-head {
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line-faint);
}

.philosophy-flow__layer-head h3 {
  font-family: var(--heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.philosophy-flow__layer-head p {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
}

.philosophy-flow__steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.3rem 0;
}

.flow-step__track {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  flex-shrink: 0;
  align-self: stretch;
  position: relative;
}

.flow-step__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--line-faint);
  color: var(--sage-deep);
  flex-shrink: 0;
}

.flow-step__icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.flow-step__arrow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0.85rem;
  padding: 0.1rem 0;
  color: #C8C2BA;
  pointer-events: none;
}

.flow-step__arrow svg {
  width: 0.85rem;
  height: 0.85rem;
}

.flow-step:last-child .flow-step__arrow {
  display: none;
}

.flow-step__body {
  flex: 1;
  min-width: 0;
}

.flow-step__body h4 {
  font-family: var(--heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.flow-step__body p {
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--muted);
  max-width: 15rem;
}

.flow-step__tools {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-shrink: 0;
  align-self: center;
}

.flow-step__tool {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  background: #FFFFFF;
  border: 1px solid var(--line-faint);
  border-radius: 999px;
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
}

.flow-step__tool-icon {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.2rem;
  object-fit: contain;
  flex-shrink: 0;
}

/* ================================================================
   CLOSING / CONTACT
   ================================================================ */
.closing {
  padding: var(--space-5) var(--gutter) var(--space-7);
  text-align: center;
}

.closing__inner {
  max-width: var(--width);
  margin: 0 auto;
}

.closing .label {
  margin-bottom: var(--space-1);
}

.closing__copy {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 52rem;
  margin: 0 auto var(--space-2);
  line-height: 1.5;
}

.closing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  padding: var(--space-2) var(--gutter);
}

.footer__inner {
  max-width: var(--width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.footer__copy {
  font-size: 0.75rem;
  color: var(--muted);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}

.footer__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.footer__icon:hover,
.footer__icon:focus-visible {
  color: var(--ink-soft);
  background: var(--sage-wash);
}

.footer__icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.5rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 0.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.footer__icon:hover::after,
.footer__icon:focus-visible::after {
  opacity: 1;
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .project-card,
  .project-panel {
    transition: none;
  }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .hero__stage {
    grid-template-columns: 1fr;
  }

  .hero__portrait-group {
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
  }

  .workflow {
    grid-template-columns: repeat(4, 1fr);
    row-gap: var(--space-5);
  }

  .workflow__step:not(:last-child)::before {
    display: none;
  }

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

  .projects__row:not(.projects__row--featured) {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .header__menu-btn { display: flex; }

  .header__links {
    position: fixed;
    top: 4.25rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3);
    background: rgba(250, 247, 242, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-faint);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }

  .header__links.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .header__links a {
    padding: var(--space-2) 0;
  }

  .header__menu-btn[aria-expanded="true"] span:first-child {
    transform: translateY(3.75px) rotate(45deg);
  }

  .header__menu-btn[aria-expanded="true"] span:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
  }

  .hero__stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    row-gap: var(--space-4);
  }

  .hero__eyebrow,
  .hero__main,
  .hero__portrait-group {
    grid-column: 1;
    grid-row: auto;
  }

  .hero__highlights {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .hero__portrait-group {
    grid-template-columns: 1fr;
    max-width: 20rem;
    height: auto;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__figure {
    height: auto;
  }

  .hero__portrait {
    aspect-ratio: 3 / 4;
    height: auto;
  }

  .hero__stats {
    grid-template-rows: none;
    height: auto;
    gap: var(--space-2);
  }

  .workflow-panel {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

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

  .workflow__step {
    display: grid;
    grid-template-columns: 3rem 1fr;
    column-gap: 0.875rem;
    align-items: start;
    padding: var(--space-2);
    background: var(--paper);
    border: 1px solid var(--line-faint);
    border-radius: var(--radius-sm);
  }

  .workflow__step:last-child {
    padding-bottom: var(--space-2);
  }

  .workflow__icon {
    grid-column: 1;
    grid-row: 1 / 5;
    align-self: start;
    width: 3rem;
    max-height: none;
    max-width: none;
    margin-bottom: 0;
  }

  .workflow__heading,
  .workflow__desc,
  .workflow__tools {
    grid-column: 2;
  }

  .workflow__heading {
    margin-bottom: 0.3rem;
  }

  .workflow__desc {
    margin-bottom: var(--space-1);
  }

  .workflow__tools {
    margin-top: 0;
  }

  .work .process__head {
    margin-bottom: var(--space-3);
  }

  /* matches 1100px specificity (0-2-0) so it wins */
  .projects__row:not(.projects__row--featured) {
    grid-template-columns: 1fr;
  }

  .project-card {
    padding: var(--space-2);
  }

  .project-card--featured {
    grid-template-columns: 1fr;
    gap: var(--space-2);
    padding: var(--space-2);
  }

  .project-card__media {
    min-height: 0;
  }

  .project-card__media img {
    max-height: 11rem;
  }

  .project-card--featured .project-card__media {
    min-height: 0;
  }

  .project-card--featured .project-card__media img {
    max-height: clamp(12rem, 55vw, 17rem);
  }

  .project-panel__gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-panel__thumb img {
    height: clamp(6rem, 28vw, 9rem);
  }

  .lightbox__figure {
    inset: clamp(2.5rem, 12vw, 4rem) var(--space-2) var(--space-2);
  }

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

  .philosophy-flow__card {
    padding: var(--space-3) var(--space-2);
  }

  .philosophy-flow__endpoint--ship {
    grid-template-columns: auto 1fr;
    row-gap: var(--space-2);
  }

  .philosophy-flow__endpoint--ship .flow-step__tool {
    grid-column: 1 / -1;
    justify-self: start;
    margin-left: 4.25rem;
    align-self: start;
  }

  .flow-step {
    flex-wrap: wrap;
    row-gap: var(--space-2);
  }

  .flow-step__tools {
    margin-left: 3.35rem;
    align-self: flex-start;
  }

  .closing__actions {
    flex-direction: column;
    align-items: stretch;
  }
}
