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

/* ── TOKENS ── */
:root {
  --ink:       #111110;
  --sans:      'DM Sans', system-ui, sans-serif;
  --sidebar-w: 220px;
}

/* ── BASE ── */
html {
  font-size: 20px; /* ← change this one number to scale everything */
  scroll-behavior: smooth;
}

body {
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 4px;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-name {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0 10px;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}


.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.sidebar-nav a {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 0;
  transition: background 0.15s;
}

.sidebar-nav a:hover { background: #eaecee; }
.sidebar-nav a.active { font-weight: 500; }

.sidebar-contact {
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-contact a {
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 0;
  transition: background 0.15s;
}

.sidebar-contact a:hover { background: #eaecee; }

.sidebar-contact a::before {
  content: '↗';
  font-size: 12px;
  color: var(--ink);
}

.cv-link { font-size: 1rem }

/* ── MAIN ── */
.main { margin-left: var(--sidebar-w); }

.content {
  padding: 2.5rem 4px 6rem;
}

/* ── HERO ── */
.hero-location {
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.25rem;
  padding: 0 10px;
}

.hero-headline {
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 300;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 1.5rem;
  padding: 0 10px;
  max-width: 1000px;
  letter-spacing: -0.02em;
}

.hero-headline strong { font-weight: 500; }

.hero-sub {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 1.5rem;
  padding: 0 10px;
}

/* ── TAGS ── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px;
}

.tag {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 3px 9px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.tag.accent {
  font-weight: 500;
}

/* ── SECTIONS ── */
.rule { display: none; }
.section { padding-top: 2.5rem; }
.section-title {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  padding: 0 10px;
  margin-bottom: 0.5rem;
}

/* ── PROJECT CARDS ── */
.project-card {
  display: flex;
  gap: 0;
  align-items: stretch;
  transition: background 0.15s;
  margin-bottom: 3rem;
}



/* left column — 1/4 width */
.project-text {
  flex: 0 0 25%;
  padding: 1rem 10px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* right column — 3/4 width */
.project-right {
  flex: 0 0 75%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* meta + link bar above image */
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 10px 0.5rem;
}

.project-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8e8e6;
}

.project-meta {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
  display: inline-block;
  padding: 10px 16px;
  transition: background 0.15s;
}

.project-link::after {
  content: ' ↗';
  font-size: 11px;
}

.project-link:hover { background: #eaecee; }

/* image fills remaining height */
.project-image {
  background: #f2f2f0;
  aspect-ratio: 16 / 9;
}

.highlights { list-style: none; }

.highlights li {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
  padding: 4px 0 4px 16px;
  position: relative;
}

.highlights li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-size: 16px;
  top: 6px;
}

/* ── ABOUT ── */
.about-intro {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 1rem;
  padding: 0 10px;
  letter-spacing: -0.01em;
}

.about-intro strong { font-weight: 500; }

.about-body {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.75;
  margin-bottom: 0.75rem;
  padding: 0 10px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 1200px;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 1.5rem;
}

.why-card { background: #fff; padding: 0.9rem 10px; }

.why-card-label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 5px;
}

.why-card p {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
}

/* ── FOOTER ── */
footer {
  margin-top: 3rem;
  padding: 1.5rem 10px 0;
  font-size: 0.6875rem;
  font-weight: 300;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

footer > span {
  white-space: nowrap;
}

/* ── FOOTER ── */
.footer-contact { display: none; }

.footer-contact a {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  transition: background 0.15s;
}

.footer-contact a:hover { background: #eaecee; }

.footer-contact a::before {
  content: '↗';
  font-size: 12px;
}

/* ── ANIMATIONS ── */
.fade { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade.in { opacity: 1; transform: translateY(0); }


/* ── CASE STUDY ── */

/* ── CASE STUDY SIDEBAR ADDITIONS ── */
.sidebar-nav .nav-projects {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 1px;
}

.sidebar-nav .nav-projects a {
  font-size: 0.75rem;
  font-weight: 300;
  padding: 5px 10px 5px 20px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s;
}

.sidebar-nav .nav-projects a:hover { background: #eaecee; }
.sidebar-nav .nav-projects a.active { font-weight: 500; }

/* ── CASE STUDY LAYOUT ── */
.cs-content {
  padding: 2.5rem 4px 6rem;
  max-width: 860px;
}

/* HEADER */
.cs-header {
  padding: 0 10px;
  margin-bottom: 3rem;
}

.cs-eyebrow {
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.cs-title {
  font-size: clamp(1.375rem, 3vw, 2rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.cs-title strong { font-weight: 500; }

.cs-subtitle {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.65;
}

/* META ROW */
.cs-meta-row {
  display: flex;
  gap: 0;
  border-top: 1px solid #e8e8e6;
  border-bottom: 1px solid #e8e8e6;
  margin-bottom: 3rem;
}

.cs-meta-item {
  flex: 1;
  padding: 0.75rem 10px;
  border-right: 1px solid #e8e8e6;
}

.cs-meta-item:last-child { border-right: none; }

.cs-meta-label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 3px;
}

.cs-meta-value {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.4;
}

/* SECTIONS */
.cs-section {
  margin-bottom: 3rem;
  padding: 0 10px;
}

.cs-section-label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8e8e6;
}

.cs-body {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

/* STAT ROW */
.cs-stats {
  display: flex;
  gap: 0;
  border: 1px solid #e8e8e6;
  margin: 1.5rem 0;
}

.cs-stat {
  flex: 1;
  padding: 1rem 10px;
  border-right: 1px solid #e8e8e6;
}

.cs-stat:last-child { border-right: none; }

.cs-stat-num {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

.cs-stat-label {
  font-size: 0.6875rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.4;
}

/* PHASES */
.cs-phase {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e8e8e6;
}

.cs-phase:first-of-type { border-top: none; padding-top: 0; }

.cs-phase-num {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink);
  flex-shrink: 0;
  width: 20px;
  padding-top: 2px;
}

.cs-phase-body { flex: 1; }

.cs-phase-body p {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink);
}

.cs-phase-body strong { font-weight: 500; }

/* IMAGE PLACEHOLDER */
.cs-image {
  background: #f2f2f0;
  aspect-ratio: 16 / 9;
  margin: 1.5rem 0;
  width: 100%;
}


.cs-image-caption {
  font-size: 0.6875rem;
  font-weight: 300;
  color: var(--ink);
  padding: 0 10px;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

/* FINDINGS GRID */
.cs-findings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #e8e8e6;
  border: 1px solid #e8e8e6;
  margin: 1.5rem 0;
}

.cs-finding {
  background: #fff;
  padding: 1rem 10px;
}

.cs-finding-label {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 6px;
}

.cs-finding p {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
}

/* QUOTE */
.cs-quote {
  border-left: 1px solid var(--ink);
  padding: 0.5rem 10px 0.5rem 1rem;
  margin: 1.5rem 0;
}

.cs-quote p {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 4px;
}

.cs-quote-source {
  font-size: 0.6875rem;
  font-weight: 300;
  color: var(--ink);
  letter-spacing: 0.02em;
}

/* OUTCOME */
.cs-outcomes {
  display: flex;
  gap: 0;
  border: 1px solid #e8e8e6;
  margin: 1.5rem 0;
}

.cs-outcome {
  flex: 1;
  padding: 1rem 10px;
  border-right: 1px solid #e8e8e6;
}

.cs-outcome:last-child { border-right: none; }

.cs-outcome-num {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.cs-outcome-label {
  font-size: 0.6875rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.4;
}

/* MVP STEPS */
.cs-mvp {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 1rem;
}

.cs-mvp-step {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid #e8e8e6;
  padding: 3px 9px;
}

.cs-mvp-arrow {
  font-size: 0.6875rem;
  color: var(--ink);
}

/* NEXT CASE STUDY */
.cs-next {
  display: flex;
  flex-direction: column; /* ← change from row to column */
  gap: 4px;              /* ← replace justify-content and align-items */
  padding: 1.5rem 10px;
  border-top: 1px solid #e8e8e6;
  margin-top: 3rem;
}

.cs-next-label {
  font-size: 0.6875rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.cs-next-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s;
  padding: 6px 10px 6px 6px;
  margin-left: -6px;
}

.cs-next-link::after { content: ' ↗'; font-size: 11px; }
.cs-next-link:hover { background: #eaecee; }

/* TENSION GRID (SDS) */
.cs-tension {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #e8e8e6;
  border: 1px solid #e8e8e6;
  margin: 1.5rem 0;
}

.cs-tension-item {
  background: #fff;
  padding: 1rem 10px;
}

.cs-tension-label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 6px;
}

.cs-tension-body {
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.6;
}

/* STORY GRID (SDS) */
.cs-story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #e8e8e6;
  border: 1px solid #e8e8e6;
  margin: 1.5rem 0;
}

.cs-story-item {
  background: #fff;
  padding: 1rem 10px;
}

.cs-story-num {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  color: var(--ink);
  margin-bottom: 4px;
}

.cs-story-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.3;
}

.cs-story-body {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.55;
}

/* INLINE LINK */
.cs-inline-link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 400;
}

.cs-inline-link:hover { opacity: 0.6; }


/* ── RESPONSIVE ── */

/* ── MID: stack project cards, keep the sidebar ── */
@media (max-width: 1220px) {
  .project-card { flex-direction: column; }
  .project-text { flex: none; width: 100%; }
  .project-right { flex: none; width: 100%; }
}

/* ── MID: stack project cards, sidebar moves to top ── */
@media (max-width: 799px) {

  /* Sidebar becomes a top bar */
  .sidebar {
    position: static;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 4px 0;
    border-right: none;
    overflow: visible;
  }

  /* Name and role stay on top row */
  .sidebar-name { margin-bottom: 0; }
  .sidebar-role { margin-bottom: 0; }

  /* Nav links run horizontally on the second row */
  .sidebar-nav {
    flex-direction: row;
    flex: none;
    gap: 0;
    margin-top: 0;
  }

  /* Hide project sub-links in the top bar */
  .sidebar-nav .nav-projects { display: none; }

  /* Contact links hidden from sidebar — moved to page footer */
  .sidebar-contact { display: none; }

  /* Main content fills full width */
  .main { margin-left: 0; }
  .content { padding: 1.5rem 4px 4rem; }
  .cs-content { padding: 1.5rem 4px 4rem; }

  /* Show contact links in footer instead */
  .footer-contact { display: flex; gap: 0; }
  .why-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 0; }
  .cs-findings { grid-template-columns: 1fr 1fr; }
  .project-card { flex-direction: column; }
  .project-text { flex: none; width: 100%; }
  .project-right { flex: none; width: 100%; }
  .project-image { min-height: 180px; aspect-ratio: unset; }
  .cs-meta-row { flex-wrap: wrap; }
  .cs-meta-item { flex: 0 0 50%; border-bottom: 1px solid #e8e8e6; }
  .cs-findings { grid-template-columns: 1fr; }
  .cs-story-grid { grid-template-columns: 1fr 1fr; }
  .cs-outcomes { flex-wrap: wrap; }
  .cs-outcome { flex: 0 0 50%; border-bottom: 1px solid #e8e8e6; }
}

.project-image img,
.project-image video,
.cs-image img,
.cs-image video {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ── TOOLCHAIN DIAGRAM (ARD) ── */
.cs-diagram {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) 1.5rem minmax(0, 1.2fr) 1.5rem minmax(0, 1.2fr) 1.5rem minmax(0, 0.9fr);
  row-gap: 0.5rem;
  margin: 0 0 1.5rem;
}

.tc-label {
  grid-column: 1 / -1;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
}

.tc-label:not(:first-child) { margin-top: 1rem; }

.tc-node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  border: 1px solid #e8e8e6;
}

.tc-ai { background: #f2f2f0; border-color: #f2f2f0; }
.tc-wide { grid-column: 3 / 6; }

.tc-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

.tc-sub {
  font-size: 0.6875rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.45;
}

.tc-nowrap { white-space: nowrap; }

.tc-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--ink);
}

@media (max-width: 799px) {
  .cs-diagram { grid-template-columns: 1fr; }
  .tc-wide { grid-column: auto; }
  .tc-arrow { transform: rotate(90deg); height: 1.25rem; }
}