@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400&display=swap');

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

:root {
  --bg:                #161614;
  --text:              #ffffff;
  --accent:            #ddfea0;
  --card-bg:           #2d2d2c;
  --pill-hover:        #3e3e3d;
  --radius:            16px;
  --card-outer-radius: 24px;
  --side:              16px;
  --gap:               24px;
  --transition:        400ms ease;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', sans-serif;
  font-weight: 400;
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────── */

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 95px var(--side) 0;
  gap: 48px;
}

.bio {
  font-size: 26px;
  line-height: 1.3;
  max-width: 650px;
}

.email {
  font-size: 26px;
  line-height: 1.3;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--transition);
}

.email:hover {
  opacity: 0.6;
}

/* ─── Sections ───────────────────────────────────────── */

.section {
  padding: 128px var(--side) 0;
}

.section-label {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 16px;
}

/* ─── Card grid ──────────────────────────────────────── */

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

/* ─── Card ───────────────────────────────────────────── */

.card {
  border-radius: var(--card-outer-radius);
  overflow: hidden;
  background: transparent;
  transition: background var(--transition);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
}

.card:hover {
  background: var(--card-bg);
}

/* Cover */

.card-cover {
  position: relative;
  height: 378px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--card-bg);
}

.card-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.card-overlay--light {
  background: rgba(0, 0, 0, 0.4);
}

.card-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-logo img {
  max-width: 201px;
  max-height: 60px;
  object-fit: contain;
}

/* Description */

.card-description {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-title {
  font-size: 20px;
  line-height: normal;
}

.card-details {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: normal;
}

/* ─── Pill ───────────────────────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 30px;
  background: var(--card-bg);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition);
}

.pill:hover {
  background: var(--pill-hover);
}

.pill-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ─── Case study page ────────────────────────────────── */


.cs-page {
  overflow-x: hidden;
}

.cs-nav {
  padding: 32px var(--side) 0;
}

.cs-nav-link {
  font-size: 26px;
  line-height: 1.3;
  color: var(--text);
  text-decoration: none;
  transition: opacity var(--transition);
}

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

/* Hero */

.cs-hero {
  margin-top: 24px;
  height: 810px;
  overflow: hidden;
}

.cs-hero img,
.cs-hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Meta bar */

.cs-meta-bar {
  display: flex;
  justify-content: space-between;
  padding: 24px var(--side) 0;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: normal;
}

/* Content row: body | projects | graphic */

.cs-content-row {
  display: grid;
  grid-template-columns: 397px 254px 1fr;
  gap: 38px 38px;
  padding: 16px var(--side) 0;
  align-items: start;
}

.cs-content-row--two-col {
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.cs-content-row--single {
  display: block;
  padding: 16px var(--side) 0;
}

.cs-content-row--single .cs-body-text {
  max-width: 691px;
}

.cs-body + .cs-body {
  margin-top: 16px;
}

.cs-title {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 16px;
}

.cs-body {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

/* Projects */

.cs-projects-label {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: normal;
  margin-bottom: 16px;
}

.cs-projects-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.cs-project-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  text-decoration: none;
  padding: 2px 8px;
  border-radius: 30px;
  background: var(--card-bg);
  transition: background var(--transition);
}

.cs-project-link:hover {
  background: var(--pill-hover);
}

.cs-arrow-icon {
  flex-shrink: 0;
}

.cs-project-item--pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 30px;
  background: var(--card-bg);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
}

.cs-pill {
  background: var(--accent);
  color: #000000;
  font-size: 8px;
  line-height: 1.5;
  padding: 2px 8px;
  border-radius: 30px;
  white-space: nowrap;
}

/* Illustration panel (brand-coloured bg, centred Lottie/image) */

.cs-illustration {
  border-radius: var(--radius);
  height: 783px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-illustration lottie-player {
  width: 100%;
  height: 100%;
}

/* Collaborators */

.cs-collaborators {
  margin-top: 48px;
}

.cs-collaborators-list {
  list-style: none;
  font-size: 12px;
  line-height: 2.2;
}

/* Intelligence graphic */

.cs-intelligence {
  background: #090909;
  border-radius: var(--radius);
  height: 783px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-intelligence img,
.cs-intelligence lottie-player {
  width: 100%;
  height: 100%;
}

/* Full-width panels */

.cs-panel {
  margin: var(--gap) var(--side) 0;
  border-radius: var(--radius);
  height: 783px;
  overflow: hidden;
}

.cs-panel img,
.cs-panel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Two-column media row */

.cs-media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin: var(--gap) var(--side) 0;
}

.cs-media-item {
  border-radius: var(--radius);
  height: 783px;
  overflow: hidden;
}

.cs-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Next project */

.cs-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin: var(--gap) var(--side) 0;
  height: 783px;
}

.cs-next-left {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: var(--radius);
  background: var(--card-bg);
  transition: background var(--transition);
}

.cs-next-left:hover {
  background: var(--pill-hover);
}

.cs-next-label {
  font-size: 48px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.1;
}

.cs-next-right {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.cs-next-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-next-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.cs-next-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26%;
  max-width: 180px;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

/* ─── Modal ──────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px var(--side);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  background: var(--card-bg);
  border-radius: 20px;
  width: 100%;
  max-width: 942px;
  padding: 40px;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
}

.modal-title {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 8px;
}

.modal-date {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: normal;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text);
  font-family: 'Geist', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.modal-close:hover {
  opacity: 0.6;
}

.modal-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
}

.modal-body-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.modal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.modal-section-title {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 24px;
}

.modal-stats-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-stat-label {
  font-size: 16px;
  line-height: 1.5;
}

.modal-stat-values {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 1.5;
}

.modal-stat-before {
  color: rgba(255, 255, 255, 0.5);
}

.modal-stat-arrow {
  flex-shrink: 0;
}

.modal-stat-after {
  color: var(--text);
}

.modal-stat-note {
  color: rgba(255, 255, 255, 0.5);
}

.modal-collaborators-list {
  list-style: none;
  font-size: 12px;
  line-height: 2.2;
}

/* ─── Footer ─────────────────────────────────────────── */

footer {
  padding: 80px var(--side) 40px;
  display: flex;
  justify-content: flex-end;
}

.footer-text {
  font-size: 8px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text);
}

/* ─── Responsive ─────────────────────────────────────── */

@media (max-width: 768px) {

  /* Header */

  .header {
    flex-direction: column;
    padding: 48px var(--side) 0;
    gap: 16px;
  }

  .bio,
  .email {
    font-size: 20px;
  }

  .bio {
    max-width: none;
  }

  /* Sections */

  .section {
    padding: 56px var(--side) 0;
  }

  .section-label {
    font-size: 20px;
  }

  /* Card grid */

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

  .card-cover {
    height: 240px;
  }

  /* Footer */

  footer {
    padding: 48px var(--side) 32px;
  }

  /* ─── Case study ─── */

  .cs-nav {
    padding: 24px var(--side) 0;
  }

  .cs-nav-link {
    font-size: 20px;
  }

  .cs-hero {
    height: 280px;
    margin-top: 16px;
  }

  .cs-meta-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 16px;
  }

  .cs-title {
    font-size: 22px;
  }

  /* Content rows: collapse to single column */

  .cs-content-row,
  .cs-content-row--two-col {
    grid-template-columns: 1fr;
  }

  .cs-content-row--single .cs-body-text {
    max-width: none;
  }

  /* Illustration + intelligence panels */

  .cs-intelligence,
  .cs-illustration {
    height: 360px;
  }

  /* Collaborators */

  .cs-collaborators {
    margin-top: 32px;
  }

  /* Full-width panels */

  .cs-panel {
    height: 280px;
  }

  /* Two-column media row */

  .cs-media-row {
    grid-template-columns: 1fr;
  }

  .cs-media-item {
    height: 280px;
  }

  /* Next project */

  .cs-next {
    grid-template-columns: 1fr;
    height: auto;
  }

  .cs-next-left {
    height: 160px;
  }

  .cs-next-right {
    height: 260px;
  }

  .cs-next-label {
    font-size: 32px;
  }

  /* Modal */

  .modal-overlay {
    padding: 24px var(--side);
  }

  .modal-panel {
    padding: 24px;
  }

  .modal-header {
    margin-bottom: 24px;
  }

  .modal-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

}
